#define PUTC(c) do { NEW(FT_CHAR,0,0); fp->f_char = (c); } while (0)
static char *format_string;
-static unsigned char *usr_fstring; /* for CERROR */
+static char *usr_fstring; /* for CERROR */
#define CERROR(str) compile_error (str, cp)
for (i = errpos-errctx; i < errpos; i++) {
#ifdef LOCALE
- if (iscntrl(usr_fstring[i]))
+ if (iscntrl((unsigned char) usr_fstring[i]))
#else
if (usr_fstring[i] < 32)
#endif
free_comptable();
}
+/*
+ * Free just the text strings from all of the component hash table entries
+ */
+
+void
+fmt_freecomptext(void)
+{
+ unsigned int i;
+ struct comp *cm;
+
+ for (i = 0; i < sizeof(wantcomp)/sizeof(wantcomp[0]); i++)
+ for (cm = wantcomp[i]; cm; cm = cm->c_next)
+ if (cm->c_text) {
+ free(cm->c_text);
+ cm->c_text = NULL;
+ }
+}
+
/*
* Find a component in our hash table. This is just a public interface to
* the FINDCOMP macro, so we don't have to expose our hash table.