X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Flexer%2Fsubcommand-list.c;h=289179b239eef2029662eb1060ecaf7153420ae2;hb=bd0fbcb4295cf0fbcfa5c2a8fc607842c958ad65;hp=5cec533c965756a80782eff1ae753ffe99fa33fd;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/language/lexer/subcommand-list.c b/src/language/lexer/subcommand-list.c index 5cec533c96..289179b239 100644 --- a/src/language/lexer/subcommand-list.c +++ b/src/language/lexer/subcommand-list.c @@ -1,5 +1,5 @@ /* 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 @@ -16,9 +16,13 @@ #include -#include "subcommand-list.h" +#include "language/lexer/subcommand-list.h" #include -#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 */ @@ -107,3 +111,10 @@ subc_list_int_destroy(subc_list_int *l) { 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); +}