/[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.28 by gary, Fri Jun 20 15:43:20 2003 UTC revision 1.29 by gary, Thu Jun 26 14:57:32 2003 UTC
# Line 29  static int dumpdef_cmp (const void *s1, Line 29  static int dumpdef_cmp (const void *s1,
29  /* Exit code from last "syscmd" command.  */  /* Exit code from last "syscmd" command.  */
30  int m4_sysval = 0;  int m4_sysval = 0;
31    
 /* input syntax table. */  
 unsigned short m4_syntax_table[256];  
   
 /* Quote chars.  */  
 m4_string rquote;  
 m4_string lquote;  
   
 /* Comment chars.  */  
 m4_string bcomm;  
 m4_string ecomm;  
   
32    
33  /* Give friendly warnings if a builtin macro is passed an  /* Give friendly warnings if a builtin macro is passed an
34     inappropriate number of arguments.  ARGC/ARGV are the arguments,     inappropriate number of arguments.  ARGC/ARGV are the arguments,
# Line 70  m4_bad_argc (m4 *context, int argc, m4_s Line 59  m4_bad_argc (m4 *context, int argc, m4_s
59  }  }
60    
61  const char *  const char *
62  m4_skip_space (const char *arg)  m4_skip_space (m4 *context, const char *arg)
63  {  {
64    while (M4_IS_SPACE(*arg))    while (M4_IS_SPACE (M4SYNTAX, *arg))
65      arg++;      arg++;
66    return arg;    return arg;
67  }  }
# Line 87  m4_numeric_arg (m4 *context, int argc, m Line 76  m4_numeric_arg (m4 *context, int argc, m
76    char *endp;    char *endp;
77    
78    if (*M4ARG (arg) == 0    if (*M4ARG (arg) == 0
79        || (*valuep = strtol (m4_skip_space (M4ARG (arg)), &endp, 10),        || (*valuep = strtol (m4_skip_space (context, M4ARG (arg)), &endp, 10),
80            *m4_skip_space (endp) != 0))            *m4_skip_space (context, endp) != 0))
81      {      {
82        M4WARN ((m4_get_warning_status_opt (context), 0,        M4WARN ((m4_get_warning_status_opt (context), 0,
83                 _("Warning: %s: argument %d non-numeric: %s"),                 _("Warning: %s: argument %d non-numeric: %s"),
# Line 102  m4_numeric_arg (m4 *context, int argc, m Line 91  m4_numeric_arg (m4 *context, int argc, m
91  /* Print ARGC arguments from the table ARGV to obstack OBS, separated by  /* Print ARGC arguments from the table ARGV to obstack OBS, separated by
92     SEP, and quoted by the current quotes, if QUOTED is TRUE.  */     SEP, and quoted by the current quotes, if QUOTED is TRUE.  */
93  void  void
94  m4_dump_args (struct obstack *obs, int argc, m4_symbol_value **argv,  m4_dump_args (m4 *context, struct obstack *obs, int argc,
95                const char *sep, boolean quoted)                m4_symbol_value **argv, const char *sep, boolean quoted)
96  {  {
97    int i;    int i;
98    size_t len = strlen (sep);    size_t len = strlen (sep);
# Line 113  m4_dump_args (struct obstack *obs, int a Line 102  m4_dump_args (struct obstack *obs, int a
102        if (i > 1)        if (i > 1)
103          obstack_grow (obs, sep, len);          obstack_grow (obs, sep, len);
104    
105        m4_shipout_string (obs, M4ARG (i), 0, quoted);        m4_shipout_string (context, obs, M4ARG (i), 0, quoted);
106      }      }
107  }  }
108    
# Line 169  dumpdef_cmp (const void *s1, const void Line 158  dumpdef_cmp (const void *s1, const void
158  /* The function dump_symbol () is for use by "dumpdef".  It builds up a  /* The function dump_symbol () is for use by "dumpdef".  It builds up a
159     table of all defined symbol names.  */     table of all defined symbol names.  */
160  void *  void *
161  m4_dump_symbol_CB (m4_symtab *ignored, const char *name, m4_symbol *symbol,  m4_dump_symbol_CB (m4_symbol_table *ignored, const char *name, m4_symbol *symbol,
162                     void *userdata)                     void *userdata)
163  {  {
164    assert (name);    assert (name);

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

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