X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Ftoken.c;h=08a6802826cb70572afcae87bf6816990cf4b7ea;hp=f375065c625fbda34aadadce6d034d6e1bfca673;hb=6708d7f169e6675203bf63568d40e888a4f4e209;hpb=42f44eb5bf4ecd36e26e051fada79d861d0f92d2 diff --git a/src/token.c b/src/token.c index f375065..08a6802 100644 --- a/src/token.c +++ b/src/token.c @@ -199,12 +199,12 @@ void psi_token_dump(int fd, struct psi_token *t) { size_t i; - dprintf(fd, "TOKEN %p (%d) ", t, t->type); + dprintf(fd, "TOKEN %p (%u) ", t, t->type); if (t->type == PSI_T_EOF) { dprintf(fd, "EOF"); } else { dprintf(fd, "\""); - for (i = 0; i < MIN(t->size, 16); ++i) { + for (i = 0; i < t->size; ++i) { switch (t->text[i]) { case '\0': dprintf(fd, "\\0"); @@ -242,7 +242,7 @@ void psi_token_dump(int fd, struct psi_token *t) break; } } - dprintf(fd, "%s\"", t->size > 16 ? "..." : ""); + dprintf(fd, "\""); } dprintf(fd, " at col %u in %s on line %u\n", t->col, t->file, t->line); }