Hello,

In lex(1) the function action_m4_define() would raise a fatal
error if called. I couldn't see anything calling it though,
and the program builds without it.

- Michael


Index: misc.c
===================================================================
RCS file: /cvs/src/usr.bin/lex/misc.c,v
retrieving revision 1.19
diff -u -p -u -r1.19 misc.c
--- misc.c      19 Nov 2015 23:34:56 -0000      1.19
+++ misc.c      27 Aug 2017 10:27:34 -0000
@@ -116,28 +116,6 @@ action_define(defname, value)
        buf_append(&defs_buf, &cpy, 1);
 }
 
-
-/** Append "m4_define([[defname]],[[value]])m4_dnl\n" to the running buffer.
- *  @param defname The macro name.
- *  @param value The macro value, can be NULL, which is the same as the empty 
string.
- */
-void 
-action_m4_define(const char *defname, const char *value)
-{
-       char buf[MAXLINE];
-
-       flexfatal("DO NOT USE THIS FUNCTION!");
-
-       if ((int) strlen(defname) > MAXLINE / 2) {
-               format_pinpoint_message(_
-                   ("name \"%s\" ridiculously long"),
-                   defname);
-               return;
-       }
-       snprintf(buf, sizeof(buf), "m4_define([[%s]],[[%s]])m4_dnl\n", defname, 
value ? value : "");
-       add_action(buf);
-}
-
 /* Append "new_text" to the running buffer. */
 void 
 add_action(new_text)

Reply via email to