Ditch longs and long longs in favor of stdint.h types, which has cascading
effects throughout, including use of inttypes.h/PRI[ud]64 because printf() is still stuck in a long world, conversion of %lu to %zu for printing values of type size_t, and changing/renaming the g_check_cmp* family of functions.
This commit is contained in:
parent
f0a24ee4d0
commit
c8fc061ea6
15 changed files with 64 additions and 52 deletions
|
|
@ -15,6 +15,7 @@
|
|||
#include "../src/hammer.h"
|
||||
#include "../src/glue.h"
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
///
|
||||
|
|
@ -158,12 +159,12 @@ int main(int argc, char **argv)
|
|||
parser = init_parser();
|
||||
|
||||
inputsize = fread(input, 1, sizeof(input), stdin);
|
||||
fprintf(stderr, "inputsize=%lu\ninput=", inputsize);
|
||||
fprintf(stderr, "inputsize=%zu\ninput=", inputsize);
|
||||
fwrite(input, 1, inputsize, stderr);
|
||||
result = h_parse(parser, input, inputsize);
|
||||
|
||||
if(result) {
|
||||
fprintf(stderr, "parsed=%lld bytes\n", result->bit_length/8);
|
||||
fprintf(stderr, "parsed=%" PRId64 " bytes\n", result->bit_length/8);
|
||||
h_pprint(stdout, result->ast, 0, 0);
|
||||
return 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue