pp_directives_len can be uint8_t
authorH. Peter Anvin <hpa@zytor.com>
Sun, 22 Jun 2008 01:18:41 +0000 (18:18 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 22 Jun 2008 01:18:41 +0000 (18:18 -0700)
Save a few hundred bytes...

pptok.pl
preproc.h

index 930030a..117c528 100755 (executable)
--- a/pptok.pl
+++ b/pptok.pl
@@ -162,7 +162,7 @@ if ($what eq 'c') {
     }
     print OUT  "};\n";
 
-    printf OUT "const int pp_directives_len[%d] = {\n", scalar(@pptok);
+    printf OUT "const uint8_t pp_directives_len[%d] = {\n", scalar(@pptok);
     foreach $d (@pptok) {
        printf OUT "    %d,\n", defined($d) ? length($d)+1 : 0;
     }
index 1c52682..a0f1a70 100644 (file)
--- a/preproc.h
+++ b/preproc.h
@@ -12,7 +12,7 @@
 #include "pptok.h"
 
 extern const char * const pp_directives[];
-extern const int pp_directives_len[];
+extern const uint8_t pp_directives_len[];
 
 /* Pointer to a macro chain */
 typedef const char macros_t;