httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@collab.net
Subject [PATCH] Columnar character test table output.
Date Thu, 09 Jan 2003 18:00:11 GMT
This is a really minor thing, but this patch has been helpful to me
while debugging some stuff today.  Negligible cost, profitable gain,
yes?

------

* httpd-2.0/server/gen_test_char.c
  (main): Ensure columnar output of character test table data, and
    wrap lines at every 16 items instead of 20.

Index: server/gen_test_char.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/gen_test_char.c,v
retrieving revision 1.14
diff -u -r1.14 gen_test_char.c
--- server/gen_test_char.c	9 Apr 2002 11:12:10 -0000	1.14
+++ server/gen_test_char.c	9 Jan 2003 17:54:45 -0000
@@ -87,7 +87,7 @@
            "#define T_HTTP_TOKEN_STOP      (%u)\n"
            "\n"
            "static const unsigned char test_char_table[256] = {\n"
-           "    0,",
+           "      0,",
            T_ESCAPE_SHELL_CMD,
            T_ESCAPE_PATH_SEGMENT,
            T_OS_ESCAPE_PATH,
@@ -98,7 +98,7 @@
 
     for (c = 1; c < 256; ++c) {
         flags = 0;
-        if (c % 20 == 0)
+        if (c % 16 == 0)
             printf("\n    ");
 
         /* escape_shell_cmd */
@@ -135,7 +135,7 @@
             flags |= T_HTTP_TOKEN_STOP;
         }
 
-        printf("%u%c", flags, (c < 255) ? ',' : ' ');
+        printf("%3u%c", flags, (c < 255) ? ',' : ' ');
 
     }
 

Mime
View raw message