/[m4]/m4/modules/gnu.c
ViewVC logotype

Diff of /m4/modules/gnu.c

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

revision 1.31 by gary, Fri Aug 15 14:06:27 2003 UTC revision 1.32 by gary, Fri Aug 15 15:53:04 2003 UTC
# Line 72  int errno; Line 72  int errno;
72    
73                  function        macros  blind argmin  argmax */                  function        macros  blind argmin  argmax */
74  #define builtin_functions                       \  #define builtin_functions                       \
75          BUILTIN(__file__,       FALSE,  FALSE,  1,      1  )    \          BUILTIN(__file__,       false,  false,  1,      1  )    \
76          BUILTIN(__line__,       FALSE,  FALSE,  1,      1  )    \          BUILTIN(__line__,       false,  false,  1,      1  )    \
77          BUILTIN(builtin,        FALSE,  TRUE,   2,      -1 )    \          BUILTIN(builtin,        false,  true,   2,      -1 )    \
78          BUILTIN(changesyntax,   FALSE,  TRUE,   1,      -1 )    \          BUILTIN(changesyntax,   false,  true,   1,      -1 )    \
79          BUILTIN(debugmode,      FALSE,  FALSE,  1,      2  )    \          BUILTIN(debugmode,      false,  false,  1,      2  )    \
80          BUILTIN(debugfile,      FALSE,  FALSE,  1,      2  )    \          BUILTIN(debugfile,      false,  false,  1,      2  )    \
81          BUILTIN(eregexp,        FALSE,  TRUE,   3,      4  )    \          BUILTIN(eregexp,        false,  true,   3,      4  )    \
82          BUILTIN(epatsubst,      FALSE,  TRUE,   3,      4  )    \          BUILTIN(epatsubst,      false,  true,   3,      4  )    \
83          BUILTIN(esyscmd,        FALSE,  TRUE,   2,      2  )    \          BUILTIN(esyscmd,        false,  true,   2,      2  )    \
84          BUILTIN(format,         FALSE,  TRUE,   2,      -1 )    \          BUILTIN(format,         false,  true,   2,      -1 )    \
85          BUILTIN(indir,          FALSE,  TRUE,   2,      -1 )    \          BUILTIN(indir,          false,  true,   2,      -1 )    \
86          BUILTIN(patsubst,       FALSE,  TRUE,   3,      4  )    \          BUILTIN(patsubst,       false,  true,   3,      4  )    \
87          BUILTIN(regexp,         FALSE,  TRUE,   3,      4  )    \          BUILTIN(regexp,         false,  true,   3,      4  )    \
88          BUILTIN(symbols,        FALSE,  FALSE,  0,      -1 )    \          BUILTIN(symbols,        false,  false,  0,      -1 )    \
89          BUILTIN(syncoutput,     FALSE,  TRUE,   2,      2  )    \          BUILTIN(syncoutput,     false,  true,   2,      2  )    \
90    
91    
92  /* Generate prototypes for each builtin handler function. */  /* Generate prototypes for each builtin handler function. */
# Line 103  m4_builtin m4_builtin_table[] = Line 103  m4_builtin m4_builtin_table[] =
103    builtin_functions    builtin_functions
104  #undef BUILTIN  #undef BUILTIN
105    
106    { 0, 0, FALSE, FALSE, 0, 0 },    { 0, 0, false, false, 0, 0 },
107  };  };
108    
109    
# Line 275  m4_regexp_compile (m4 *context, const ch Line 275  m4_regexp_compile (m4 *context, const ch
275                     const char *regexp, int syntax)                     const char *regexp, int syntax)
276  {  {
277    static struct re_pattern_buffer buf;  /* compiled regular expression */    static struct re_pattern_buffer buf;  /* compiled regular expression */
278    static boolean buf_initialized = FALSE;    static bool buf_initialized = false;
279    const char *msg;              /* error message from re_compile_pattern */    const char *msg;              /* error message from re_compile_pattern */
280    
281    if (!buf_initialized)    if (!buf_initialized)
282      {      {
283        buf_initialized = TRUE;        buf_initialized = true;
284        buf.buffer = NULL;        buf.buffer = NULL;
285        buf.allocated = 0;        buf.allocated = 0;
286        buf.fastmap = NULL;        buf.fastmap = NULL;
# Line 470  M4BUILTIN_HANDLER (symbols) Line 470  M4BUILTIN_HANDLER (symbols)
470    
471        obstack_init (&data_obs);        obstack_init (&data_obs);
472        data.obs = &data_obs;        data.obs = &data_obs;
473        m4_dump_symbols (context, &data, argc, argv, FALSE);        m4_dump_symbols (context, &data, argc, argv, false);
474    
475        for (; data.size > 0; --data.size, data.base++)        for (; data.size > 0; --data.size, data.base++)
476          {          {
477            m4_shipout_string (context, obs, data.base[0], 0, TRUE);            m4_shipout_string (context, obs, data.base[0], 0, true);
478            if (data.size > 1)            if (data.size > 1)
479              obstack_1grow (obs, ',');              obstack_1grow (obs, ',');
480          }          }
# Line 498  M4BUILTIN_HANDLER (syncoutput) Line 498  M4BUILTIN_HANDLER (syncoutput)
498        if (   M4ARG (1)[0] == '0'        if (   M4ARG (1)[0] == '0'
499            || M4ARG (1)[0] == 'n'            || M4ARG (1)[0] == 'n'
500            || (M4ARG (1)[0] == 'o' && M4ARG (1)[1] == 'f'))            || (M4ARG (1)[0] == 'o' && M4ARG (1)[1] == 'f'))
501          m4_set_sync_output_opt (context, FALSE);          m4_set_sync_output_opt (context, false);
502        else if (   M4ARG (1)[0] == '1'        else if (   M4ARG (1)[0] == '1'
503                 || M4ARG (1)[0] == 'y'                 || M4ARG (1)[0] == 'y'
504                 || (M4ARG (1)[0] == 'o' && M4ARG (1)[1] == 'n'))                 || (M4ARG (1)[0] == 'o' && M4ARG (1)[1] == 'n'))
505          m4_set_sync_output_opt (context, TRUE);          m4_set_sync_output_opt (context, true);
506      }      }
507  }  }
508    
# Line 555  M4BUILTIN_HANDLER (format) Line 555  M4BUILTIN_HANDLER (format)
555   **/   **/
556  M4BUILTIN_HANDLER (__file__)  M4BUILTIN_HANDLER (__file__)
557  {  {
558    m4_shipout_string (context, obs, m4_current_file, 0, TRUE);    m4_shipout_string (context, obs, m4_current_file, 0, true);
559  }  }
560    
561    

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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