/[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.25 by gary, Mon Jun 16 10:43:45 2003 UTC revision 1.26 by gary, Wed Jun 18 16:21:54 2003 UTC
# Line 75  m4_string ecomm; Line 75  m4_string ecomm;
75     Since they are functions the caller does not need access to the     Since they are functions the caller does not need access to the
76     internal data structure, so they are safe to export for use in     internal data structure, so they are safe to export for use in
77     external modules.  */     external modules.  */
78  m4__token_type  m4_symbol_type
79  m4_token_get_type (m4_token *name)  m4_get_symbol_value_type (m4_symbol_value *name)
80  {  {
81    return TOKEN_TYPE (name);    return VALUE_TYPE (name);
82  }  }
83    
84  char *  char *
85  m4_token_text (m4_token *name)  m4_get_symbol_value_text (m4_symbol_value *name)
86  {  {
87    return TOKEN_TEXT (name);    return VALUE_TEXT (name);
88  }  }
89    
90  m4_builtin_func *  m4_builtin_func *
91  m4_token_func (m4_token *name)  m4_get_symbol_value_func (m4_symbol_value *name)
92  {  {
93    return TOKEN_FUNC (name);    return VALUE_FUNC (name);
94  }  }
95    
96    
# Line 101  m4_token_func (m4_token *name) Line 101  m4_token_func (m4_token *name)
101     applicable, MAX is the maximum number, negative if not applicable.     applicable, MAX is the maximum number, negative if not applicable.
102     ARGC, MIN, and MAX count ARGV[0], the name of the macro.  */     ARGC, MIN, and MAX count ARGV[0], the name of the macro.  */
103  boolean  boolean
104  m4_bad_argc (int argc, m4_token **argv, int min, int max)  m4_bad_argc (int argc, m4_symbol_value **argv, int min, int max)
105  {  {
106    if (min > 0 && argc < min)    if (min > 0 && argc < min)
107      {      {
# Line 135  m4_skip_space (const char *arg) Line 135  m4_skip_space (const char *arg)
135     VALUEP. If the conversion fails, print error message for macro.     VALUEP. If the conversion fails, print error message for macro.
136     Return TRUE iff conversion succeeds.  */     Return TRUE iff conversion succeeds.  */
137  boolean  boolean
138  m4_numeric_arg (int argc, m4_token **argv, int arg, int *valuep)  m4_numeric_arg (int argc, m4_symbol_value **argv, int arg, int *valuep)
139  {  {
140    char *endp;    char *endp;
141    
# Line 155  m4_numeric_arg (int argc, m4_token **arg Line 155  m4_numeric_arg (int argc, m4_token **arg
155  /* Print ARGC arguments from the table ARGV to obstack OBS, separated by  /* Print ARGC arguments from the table ARGV to obstack OBS, separated by
156     SEP, and quoted by the current quotes, if QUOTED is TRUE.  */     SEP, and quoted by the current quotes, if QUOTED is TRUE.  */
157  void  void
158  m4_dump_args (struct obstack *obs, int argc, m4_token **argv,  m4_dump_args (struct obstack *obs, int argc, m4_symbol_value **argv,
159                const char *sep, boolean quoted)                const char *sep, boolean quoted)
160  {  {
161    int i;    int i;
# Line 224  dumpdef_cmp (const void *s1, const void Line 224  dumpdef_cmp (const void *s1, const void
224  int  int
225  m4_dump_symbol (const void *name, void *symbol, void *data)  m4_dump_symbol (const void *name, void *symbol, void *data)
226  {  {
227    if (SYMBOL_TYPE ((m4_symbol *) symbol) != M4_TOKEN_VOID)    if (SYMBOL_TYPE ((m4_symbol *) symbol) != M4_SYMBOL_VOID)
228      {      {
229        struct m4_dump_symbol_data *symbol_data        struct m4_dump_symbol_data *symbol_data
230          = (struct m4_dump_symbol_data *) data;          = (struct m4_dump_symbol_data *) data;
# Line 241  m4_dump_symbol (const void *name, void * Line 241  m4_dump_symbol (const void *name, void *
241     symbols, otherwise, only the specified symbols.  */     symbols, otherwise, only the specified symbols.  */
242  void  void
243  m4_dump_symbols (m4 *context, struct m4_dump_symbol_data *data, int argc,  m4_dump_symbols (m4 *context, struct m4_dump_symbol_data *data, int argc,
244                   m4_token **argv, boolean complain)                   m4_symbol_value **argv, boolean complain)
245  {  {
246    data->base = (const char **) obstack_base (data->obs);    data->base = (const char **) obstack_base (data->obs);
247    data->size = 0;    data->size = 0;
# Line 258  m4_dump_symbols (m4 *context, struct m4_ Line 258  m4_dump_symbols (m4 *context, struct m4_
258        for (i = 1; i < argc; i++)        for (i = 1; i < argc; i++)
259          {          {
260            symbol = m4_symbol_lookup (M4SYMTAB, M4ARG (i));            symbol = m4_symbol_lookup (M4SYMTAB, M4ARG (i));
261            if (symbol != NULL && SYMBOL_TYPE (symbol) != M4_TOKEN_VOID)            if (symbol != NULL && SYMBOL_TYPE (symbol) != M4_SYMBOL_VOID)
262              m4_dump_symbol (M4ARG (i), symbol, data);              m4_dump_symbol (M4ARG (i), symbol, data);
263            else if (complain)            else if (complain)
264              M4WARN ((warning_status, 0,              M4WARN ((warning_status, 0,

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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