X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/698f9cfa8e4c5a97a3e0b492308f4ec6d62ce12e..54b3847305718394e886272edd49f8dcd2bcfc29:/uip/fmtdump.c diff --git a/uip/fmtdump.c b/uip/fmtdump.c index 9a6e351c..57968f0e 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -1,6 +1,4 @@ - -/* - * fmtdump.c -- compile format file and dump out instructions +/* fmtdump.c -- compile format file and dump out instructions * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -11,6 +9,7 @@ #include #include #include +#include #define FMTDUMP_SWITCHES \ X("form formatfile", 0, FORMSW) \ @@ -266,6 +265,7 @@ dumpone(struct format *fmt) case FT_IF_MATCH: case FT_IF_AMATCH: printf(" continue else goto"); + /* FALLTHRU */ case FT_GOTO: i = findlabel(fmt + fmt->f_skip); printf(" L%d", i); @@ -409,6 +409,7 @@ f_typestr(int t) case FT_LS_FRIENDLY: return("LS_FRIENDLY"); case FT_LV_HOSTTYPE: return("LV_HOSTTYPE"); case FT_LV_INGRPF: return("LV_INGRPF"); + case FT_LS_UNQUOTE: return("LS_UNQUOTE"); case FT_LV_NOHOSTF: return("LV_NOHOSTF"); case FT_LOCALDATE: return("LOCALDATE"); case FT_GMTDATE: return("GMTDATE"); @@ -439,7 +440,7 @@ f_typestr(int t) case FT_V_MATCH: return("V_MATCH"); case FT_V_AMATCH: return("V_AMATCH"); default: - printf(buf, "/* ??? #%d */", t); + snprintf(buf, sizeof buf, "/* ??? #%d */", t); return(buf); } } @@ -457,7 +458,7 @@ c_typestr(int t) buf[0] = '\0'; if (t & ~(CT_ADDR|CT_DATE)) - printf(buf, "0x%x ", t); + snprintf(buf, sizeof buf, "0x%x ", t); strcat(buf, "<"); i = 0; FNORD(CT_ADDR, "ADDR"); @@ -474,7 +475,7 @@ c_flagsstr(int t) buf[0] = '\0'; if (t & ~(CF_TRUE|CF_PARSED|CF_DATEFAB|CF_TRIMMED)) - printf(buf, "0x%x ", t); + snprintf(buf, sizeof buf, "0x%x ", t); strcat(buf, "<"); i = 0; FNORD(CF_TRUE, "TRUE");