Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

r234 - in cherokee: . cherokee doc

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


alo at alobbs

Mar 28, 2006, 1:55 AM

Post #1 of 1 (66 views)
Permalink
r234 - in cherokee: . cherokee doc

Author: alo
Date: 2006-03-28 10:55:04 +0200 (Tue, 28 Mar 2006)
New Revision: 234

Modified:
cherokee/ChangeLog
cherokee/cherokee/buffer.c
cherokee/doc/Makefile.am
Log:


Modified: cherokee/ChangeLog
===================================================================
--- cherokee/ChangeLog 2006-03-27 07:54:24 UTC (rev 233)
+++ cherokee/ChangeLog 2006-03-28 08:55:04 UTC (rev 234)
@@ -1,3 +1,8 @@
+2006-03-28 Alvaro Lopez Ortega <alvaro at alobbs.com>
+
+ * cherokee/buffer.c (cherokee_buffer_print_debug): Improved by
+ olivier-ml1 at oleastre.be.
+
2006-03-26 Alvaro Lopez Ortega <alvaro at alobbs.com>

* cherokee/handler_fcgi.c (cherokee_handler_fcgi_free): Memory

Modified: cherokee/cherokee/buffer.c
===================================================================
--- cherokee/cherokee/buffer.c 2006-03-27 07:54:24 UTC (rev 233)
+++ cherokee/cherokee/buffer.c 2006-03-28 08:55:04 UTC (rev 234)
@@ -569,43 +569,47 @@
cherokee_buffer_print_debug (cherokee_buffer_t *buf, int len)
{
int i, length;
- char text[17];
+ char text[67];
+ char* hex_text;
+ char* ascii_text;
unsigned char tmp;
-
+
if ((len == -1) || (buf->len <= len)) {
length = buf->len;
} else {
length = len;
}
-
+
if (length <= 0)
return ret_ok;
-
- text [16] = 0;
+
+ memset(text, 0, 67);
for (i=0; i < length; i++) {
if (i%16 == 0) {
- printf ("%08x ", i);
+ if (text[0] != 0){
+ printf ("%s%s", text, CRLF);
+ }
+ sprintf (text, "%08x%57c", i, ' ');
+ hex_text = text + 9;
+ ascii_text = text + 49;
}
-
+
tmp = buf->buf[i];
- printf ("%02x", tmp & 0xFF);
-
+ sprintf (hex_text, "%02x", tmp & 0xFF);
+ hex_text += 2;
+ *hex_text = ' ';
+ if ((i+1)%2 == 0) {
+ hex_text++;
+ }
+
if ((tmp > ' ') && (tmp < 128))
- text [i%16] = tmp;
+ *ascii_text = tmp;
else
- text [i%16] = '.';
-
- if ((i+1)%2 == 0) {
- printf (" ");
- }
-
- if ((i+1)%16 == 0) {
- printf ("%s\n", text);
- }
-
- fflush(stdout);
+ *ascii_text = '.';
+ ascii_text += 1;
}
- printf (CRLF);
+ printf ("%s%s", text, CRLF);
+ fflush(stdout);

return ret_ok;
}

Modified: cherokee/doc/Makefile.am
===================================================================
--- cherokee/doc/Makefile.am 2006-03-27 07:54:24 UTC (rev 233)
+++ cherokee/doc/Makefile.am 2006-03-28 08:55:04 UTC (rev 234)
@@ -29,6 +29,7 @@
Htdigest_validator.html \
Htpasswd_validator.html \
Icons_configuration.html \
+Jaws_and_Cherokee_with_FastCGI.html \
Logging_system.html \
Mime_types_configuration.html \
NCSA_logger.html \

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.