/[m4]/m4/m4/utility.c
ViewVC logotype

Diff of /m4/m4/utility.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by akim, Sat Oct 13 08:54:18 2001 UTC revision 1.20 by akim, Sat Oct 13 08:54:53 2001 UTC
# Line 99  m4_token_func (m4_token *name) Line 99  m4_token_func (m4_token *name)
99    
100    
101  /* Give friendly warnings if a builtin macro is passed an  /* Give friendly warnings if a builtin macro is passed an
102     inappropriate number of arguments.  NAME is macro name for     inappropriate number of arguments.  ARGC/ARGV are the arguments,
103     messages, ARGC is actual number of arguments, MIN is the minimum     MIN is the minimum number of acceptable arguments, negative if not
104     number of acceptable arguments, negative if not applicable, MAX is     applicable, MAX is the maximum number, negative if not applicable.
105     the maximum number, negative if not applicable.  ARGC, MIN, and MAX     ARGC, MIN, and MAX count ARGV[0], the name of the macro.  */
    count ARGV[0], the name of the macro.  */  
106  boolean  boolean
107  m4_bad_argc (m4_token *token, int argc, int min, int max)  m4_bad_argc (int argc, m4_token **argv, int min, int max)
108  {  {
109    if (min > 0 && argc < min)    if (min > 0 && argc < min)
110      {      {
111        M4WARN ((warning_status, 0,        M4WARN ((warning_status, 0,
112                 _("Warning: %s: too few arguments: %d < %d"),                 _("Warning: %s: too few arguments: %d < %d"),
113                 TOKEN_TEXT (token), argc - 1, min - 1));                 M4ARG (0), argc - 1, min - 1));
114        return TRUE;        return TRUE;
115      }      }
116    
# Line 119  m4_bad_argc (m4_token *token, int argc, Line 118  m4_bad_argc (m4_token *token, int argc,
118      {      {
119        M4WARN ((warning_status, 0,        M4WARN ((warning_status, 0,
120                 _("Warning: %s: too many arguments (ignored): %d > %d"),                 _("Warning: %s: too many arguments (ignored): %d > %d"),
121                 TOKEN_TEXT (token), argc - 1, max - 1));                 M4ARG (0), argc - 1, max - 1));
122        /* Return FALSE, otherwise it is not exactly `ignored'. */        /* Return FALSE, otherwise it is not exactly `ignored'. */
123        return FALSE;        return FALSE;
124      }      }

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26