/[m4]/m4/src/freeze.c
ViewVC logotype

Diff of /m4/src/freeze.c

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

revision 1.19 by gary, Sun Sep 30 22:26:57 2001 UTC revision 1.20 by gary, Thu Oct 11 21:09:16 2001 UTC
# Line 130  produce_symbol_dump (FILE *file, m4_hash Line 130  produce_symbol_dump (FILE *file, m4_hash
130      {      {
131        const char   *symbol_name = (const char *) m4_hash_iterator_key (place);        const char   *symbol_name = (const char *) m4_hash_iterator_key (place);
132        m4_symbol    *symbol      = m4_hash_iterator_value (place);        m4_symbol    *symbol      = m4_hash_iterator_value (place);
133        lt_dlhandle   handle      = M4_SYMBOL_HANDLE (symbol);        lt_dlhandle   handle      = SYMBOL_HANDLE (symbol);
134        const char   *module_name = handle ? m4_module_name (handle) : NULL;        const char   *module_name = handle ? m4_module_name (handle) : NULL;
135        const m4_builtin *bp;        const m4_builtin *bp;
136    
137        switch (M4_SYMBOL_TYPE (symbol))        switch (SYMBOL_TYPE (symbol))
138          {          {
139          case M4_TOKEN_TEXT:          case M4_TOKEN_TEXT:
140            fprintf (file, "T%lu,%lu",            fprintf (file, "T%lu,%lu",
141                     (unsigned long) strlen (symbol_name),                     (unsigned long) strlen (symbol_name),
142                     (unsigned long) strlen (M4_SYMBOL_TEXT (symbol)));                     (unsigned long) strlen (SYMBOL_TEXT (symbol)));
143            if (handle)            if (handle)
144              fprintf (file, ",%lu", (unsigned long) strlen (module_name));              fprintf (file, ",%lu", (unsigned long) strlen (module_name));
145            fputc ('\n', file);            fputc ('\n', file);
146    
147            fputs (symbol_name, file);            fputs (symbol_name, file);
148            fputs (M4_SYMBOL_TEXT (symbol), file);            fputs (SYMBOL_TEXT (symbol), file);
149            if (handle)            if (handle)
150              fputs (module_name, file);              fputs (module_name, file);
151            fputc ('\n', file);            fputc ('\n', file);
# Line 153  produce_symbol_dump (FILE *file, m4_hash Line 153  produce_symbol_dump (FILE *file, m4_hash
153    
154          case M4_TOKEN_FUNC:          case M4_TOKEN_FUNC:
155            bp = m4_builtin_find_by_func            bp = m4_builtin_find_by_func
156                  (m4_module_builtins (M4_SYMBOL_HANDLE(symbol)),                  (m4_module_builtins (SYMBOL_HANDLE (symbol)),
157                   M4_SYMBOL_FUNC (symbol));                   SYMBOL_FUNC (symbol));
158    
159            if (bp == NULL)            if (bp == NULL)
160              {              {
# Line 472  reload_frozen_state (const char *name) Line 472  reload_frozen_state (const char *name)
472              bp = m4_builtin_find_by_name (bt, string[1]);              bp = m4_builtin_find_by_name (bt, string[1]);
473    
474            if (bp)            if (bp)
475              m4_builtin_pushdef (string[0], handle, bp);              {
476                  int flags = 0;
477    
478                  if (bp->groks_macro_args)
479                    BIT_SET (flags, TOKEN_MACRO_ARGS_BIT);
480                  if (bp->blind_if_no_args)
481                    BIT_SET (flags, TOKEN_BLIND_ARGS_BIT);
482    
483                  m4_builtin_pushdef (string[0], handle, bp->func, flags);
484                }
485            else            else
486              M4ERROR ((warning_status, 0,              M4ERROR ((warning_status, 0,
487                        _("`%s' from frozen file not found in builtin table!"),                        _("`%s' from frozen file not found in builtin table!"),
# Line 647  reload_frozen_state (const char *name) Line 656  reload_frozen_state (const char *name)
656                if (strcmp (m4_module_name (handle), string[2]) == 0)                if (strcmp (m4_module_name (handle), string[2]) == 0)
657                  break;                  break;
658    
659            m4_macro_pushdef (string[0], handle, string[1]);            m4_macro_pushdef (string[0], handle, string[1], 0);
660          }          }
661          break;          break;
662    

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