diff --git a/libtcc.c b/libtcc.c index d5a33d56..de8343f5 100644 --- a/libtcc.c +++ b/libtcc.c @@ -2161,23 +2161,21 @@ LIBTCCAPI void tcc_set_options(TCCState *s, const char *r) PUB_FUNC void tcc_print_stats(TCCState *s1, unsigned total_time) { - if (total_time < 1) + if (!total_time) total_time = 1; - if (total_bytes < 1) - total_bytes = 1; - fprintf(stderr, "* %d idents, %d lines, %d bytes\n" - "* %0.3f s, %u lines/s, %0.1f MB/s\n", + fprintf(stderr, "# %d idents, %d lines, %u bytes\n" + "# %0.3f s, %u lines/s, %0.1f MB/s\n", total_idents, total_lines, total_bytes, (double)total_time/1000, (unsigned)total_lines*1000/total_time, (double)total_bytes/1000/total_time); - fprintf(stderr, "* text %u, data.rw %u, data.ro %u, bss %u bytes\n", + fprintf(stderr, "# text %u, data.rw %u, data.ro %u, bss %u bytes\n", s1->total_output[0], s1->total_output[1], s1->total_output[2], s1->total_output[3] ); #ifdef MEM_DEBUG - fprintf(stderr, "* %d bytes memory used\n", mem_max_size); + fprintf(stderr, "# %d bytes memory used\n", mem_max_size); #endif } diff --git a/tcc.h b/tcc.h index 8fb682b7..97024647 100644 --- a/tcc.h +++ b/tcc.h @@ -1001,7 +1001,7 @@ struct TCCState { /* benchmark info */ int total_idents; int total_lines; - int total_bytes; + unsigned int total_bytes; unsigned int total_output[4]; /* option -dnum (for general development purposes) */