{
dump (0, "if ( p->sbc_%s > MAXLISTS)",st_lower(sbc->name));
dump (1, "{");
- dump (0, "msg (SE, \"No more than %%d %s subcommands allowed\",MAXLISTS);",st_lower(sbc->name));
+ dump (0, "subc_list_error (lexer, \"%s\", MAXLISTS);",
+ st_lower(sbc->name));
dump (0, "goto lossage;");
dump (-1,"}");
/* PSPP - a program for statistical analysis.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <config.h>
-#include "subcommand-list.h"
+#include "language/lexer/subcommand-list.h"
#include <stdlib.h>
-#include "xalloc.h"
+#include "language/lexer/lexer.h"
+#include "gl/xalloc.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
/* I call these objects `lists' but they are in fact simple dynamic arrays */
{
free(l->data);
}
+
+void
+subc_list_error (struct lexer *lexer, const char *sbc, int max_list)
+{
+ lex_error (lexer, _("No more than %d %s subcommands allowed."),
+ max_list, sbc);
+}
/* PSPP - a program for statistical analysis.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
It is intended for use by the command line parser for list subcommands
*/
+struct lexer;
struct subc_list_double {
double *data ;
void subc_list_double_destroy(subc_list_double *l) ;
void subc_list_int_destroy(subc_list_int *l) ;
+void subc_list_error (struct lexer *, const char *sbc, int max_list);
#endif