Improve macro error messages.
[pspp] / src / language / lexer / lexer.c
index 67ecfee07d00bb235cfbb38654075966168795f7..1025414a7c4407bf265519af144b255c1d836629 100644 (file)
@@ -1480,8 +1480,8 @@ lex_source_get_syntax__ (const struct lex_source *src, int n0, int n1)
   return ds_steal_cstr (&s);
 }
 
-static void
-lex_ellipsize__ (struct substring in, char *out, size_t out_size)
+void
+lex_ellipsize (struct substring in, char *out, size_t out_size)
 {
   size_t out_maxlen;
   size_t out_len;
@@ -1555,14 +1555,14 @@ lex_source_error_valist (struct lex_source *src, int n0, int n1,
       /* Get the syntax that caused the error. */
       char *syntax = lex_source_get_syntax__ (src, n0, n1);
       char syntax_cstr[64];
-      lex_ellipsize__ (ss_cstr (syntax), syntax_cstr, sizeof syntax_cstr);
+      lex_ellipsize (ss_cstr (syntax), syntax_cstr, sizeof syntax_cstr);
       free (syntax);
 
       /* Get the macro call(s) that expanded to the syntax that caused the
          error. */
       char call_cstr[64];
       struct substring call = lex_source_get_macro_call (src, n0, n1);
-      lex_ellipsize__ (call, call_cstr, sizeof call_cstr);
+      lex_ellipsize (call, call_cstr, sizeof call_cstr);
 
       if (syntax_cstr[0])
         {