fprintf (stderr, "%s: %s: remove: %s\n", pgmname, ofn, strerror (errno));
}
-#if __GNUC__ >= 2
-void hcf (void) __attribute__ ((noreturn));
-#endif
+void hcf (void) NO_RETURN;
/* Terminate unsuccessfully. */
void
exit (EXIT_FAILURE);
}
-#if __GNUC__ >= 2
-int fail (const char *, ...) __attribute__ ((format (printf, 1, 2)));
-int error (const char *, ...) __attribute__ ((format (printf, 1, 2)));
-#endif
+int fail (const char *, ...) PRINTF_FORMAT (1, 2);
+int error (const char *, ...) PRINTF_FORMAT (1, 2);
/* Output an error message and terminate unsuccessfully. */
int
/* Size of the indent from the left margin. */
int indent;
-#if __GNUC__ >= 2
-void dump (int, const char *, ...) __attribute__ ((format (printf, 2, 3)));
-#endif
+void dump (int, const char *, ...) PRINTF_FORMAT (2, 3);
/* Write line FORMAT to the output file, formatted as with printf,
indented `indent' characters from the left margin. If INDENTION is
dump (0, "long n_%s;", st_lower (sbc->name));
break;
+ case SBC_DBL:
+ dump (0, "double n_%s;", st_lower (sbc->name));
+ break;
+
default:;
/* nothing */
}
if (sbc->restriction)
dump (-1, "}");
}
+ else if (sbc->type == SBC_DBL)
+ {
+ dump (1, "if (!lex_force_num ())");
+ dump (0, "goto lossage;");
+ dump (-1, "p->n_%s = lex_double ();", st_lower (sbc->name));
+ dump (0, "lex_get();");
+ }
else if (sbc->type == SBC_INT)
{
dump (1, "if (!lex_force_int ())");
dump (0, "goto lossage;");
dump (-1, "p->n_%s = lex_integer ();", st_lower (sbc->name));
+ dump (0, "lex_get();");
}
else if (sbc->type == SBC_PINT)
{
loctime = localtime (&curtime);
timep = asctime (loctime);
timep[strlen (timep) - 1] = 0;
- dump (0, "/* %s", ofn);
+ dump (0, "/* %s\t\t-*- mode: c; buffer-read-only: t -*-", ofn);
dump (0, nullstr);
dump (0, " Generated by q2c from %s on %s.", ifn, timep);
dump (0, " Do not modify!");
dump (0, "static void");
dump (0, "free_%s (struct cmd_%s *p%s)", make_identifier (cmdname),
- make_identifier (cmdname), used ? "" : " unused");
+ make_identifier (cmdname), used ? "" : " UNUSED");
dump (1, "{");
for (sbc = subcommands; sbc; sbc = sbc->next)