bug-m4
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI - branch-1_4 cleanup


From: Eric Blake
Subject: FYI - branch-1_4 cleanup
Date: Tue, 06 Jun 2006 07:19:52 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

After this morning's round of patches, I am applying the following
cleanup.  Among other things, it reduces sizeof(symbol) on my 32-bit
machine from 44 to 24 (better even than the 36 that it started at).  It
also removes the trace attribute tied to TOKEN_FUNC, since it was no
longer in use.  I also found that a couple of tweaks to the documentation
were necessary to see failures on all the recently added tests, when run
on pre-patched binaries.

Gary, with this patch, I think I have now covered all outstanding bugs
that were in the way of a 1.4.5 release.  Are we ready to start the
release process?  What would you like me to do to help with that?  One
thing I plan on doing is running the autoconf-2.59d testsuite using the
candidate m4 1.4.5, to ensure no regressions.  I also have a (growing)
list of things to forward port to CVS head, although that is independent
of a release schedule.

2006-06-06  Eric Blake  <address@hidden>

        Cleanup of previous patches.
        * src/input.c (struct input_block): Remove traced member.
        (push_macro, init_macro_token): Don't pass trace status around.
        * src/m4.h (struct token_data): Remove traced member.
        (struct symbol, struct builtin): Reduce unused space.
        (TOKEN_DATA_FUNC): Simplify.
        (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
        (push_macro, define_builtin): Remove unused parameter.
        * src/builtin.c (define_builtin, builtin_init, define_macro),
        (m4_defn): Don't pass trace status around.
        * src/macro.c (expand_argument): Likewise.
        * src/freeze.c (reload_frozen_state): Likewise.
        * NEWS: Clean up wording.
        * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
        ensure tests actually expose bugs prior to today's patches.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEhYD484KuGfSFAYARArqUAKC8CpxpSBHY9be0gP/WAvA/HdJ2pQCeMDx+
VaiXiD+qSfph/mtAtRrLxZc=
=tixl
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /sources/m4/m4/ChangeLog,v
retrieving revision 1.1.1.1.2.56
diff -u -p -r1.1.1.1.2.56 ChangeLog
--- ChangeLog   6 Jun 2006 12:47:12 -0000       1.1.1.1.2.56
+++ ChangeLog   6 Jun 2006 13:09:43 -0000
@@ -1,5 +1,22 @@
 2006-06-06  Eric Blake  <address@hidden>
 
+       Cleanup of previous patches.
+       * src/input.c (struct input_block): Remove traced member.
+       (push_macro, init_macro_token): Don't pass trace status around.
+       * src/m4.h (struct token_data): Remove traced member.
+       (struct symbol, struct builtin): Reduce unused space.
+       (TOKEN_DATA_FUNC): Simplify.
+       (TOKEN_DATA_FUNC_TRACED): Remove unused macro.
+       (push_macro, define_builtin): Remove unused parameter.
+       * src/builtin.c (define_builtin, builtin_init, define_macro),
+       (m4_defn): Don't pass trace status around.
+       * src/macro.c (expand_argument): Likewise.
+       * src/freeze.c (reload_frozen_state): Likewise.
+       * src/symtab.c: Whitespace cleanup.
+       * NEWS: Clean up wording.
+       * doc/m4.texinfo (Undefine, Dumpdef, Trace): Cleanup wording;
+       ensure tests actually expose bugs prior to today's patches.
+
        Trace status of builtins is no longer inherited across
        define(...,defn(...)).  Fixes bug that autom4te had been working
        around.
Index: NEWS
===================================================================
RCS file: /sources/m4/m4/NEWS,v
retrieving revision 1.1.1.1.2.16
diff -u -p -r1.1.1.1.2.16 NEWS
--- NEWS        6 Jun 2006 12:39:53 -0000       1.1.1.1.2.16
+++ NEWS        6 Jun 2006 13:09:43 -0000
@@ -13,12 +13,14 @@ Version 1.4.5 - ??? 2006, by ???
   subsequently undefined or redefined.  The traceon and traceoff macros no
   longer warn about undefined symbols.  This solves a crash when using
   indir on an undefined macro traced with the -t option, as well as an
-  incorrect result of ifdef.
+  incorrect result of ifdef.  Furthermore, tracing is no longer transferred
+  with builtins, solving the bug of "m4 -tm4_eval" failing to give trace
+  output on the input "define(`m4_eval',defn(`eval'))m4_eval(1)".
 * Fix a crash when a macro is undefined while collecting its arguments, by
   always using the definition that was in effect before argument
   collection.  This behavior matches the C pre-processor, and means that
-  the sequence "define(`f',`1')f(define(`f',`2'))f" now results in "12"
-  rather than the previously undocumented "22".
+  the sequence "define(`f',`1')f(define(`f',`2'))f" is now documented to
+  result in "12", rather than the previously undocumented "22".
 
 Version 1.4.4 - October 2005, by Gary V. Vaughan
 
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.18
diff -u -p -r1.1.1.1.2.18 m4.texinfo
--- doc/m4.texinfo      6 Jun 2006 12:47:12 -0000       1.1.1.1.2.18
+++ doc/m4.texinfo      6 Jun 2006 13:09:44 -0000
@@ -1138,10 +1138,10 @@ Undefining a macro inside that macro's e
 still expands to the definition that was in effect at the @samp{(}.
 
 @example
-define(`f', `.$1')
+define(`f', ``$0':$1')
 @result{}
 f(f(f(undefine(`f')`hello world')))
address@hidden world
address@hidden:f:f:hello world
 f(`bye')
 @result{}f(bye)
 @end example
@@ -1599,14 +1599,14 @@ macro were to be called at that point, e
 still live due to redefining a macro during argument collection.
 
 @example
-pushdef(`f',`1')pushdef(`f',`2')
+pushdef(`f', ``$0'1')pushdef(`f', ``$0'2')
 @result{}
 f(popdef(`f')dumpdef(`f'))
address@hidden: `1'
address@hidden
address@hidden: ``$0'1'
address@hidden
 f(popdef(`f')dumpdef(`f'))
 @error{}m4.input:7: m4: Undefined name f
address@hidden
address@hidden
 @end example
 
 @xref{Debug Levels}, for information on controlling the details of the
@@ -1688,23 +1688,27 @@ define(`foo', `blah')
 foo
 @error{}m4trace: -1- foo -> `blah'
 @result{}blah
+traceoff
address@hidden
+foo
address@hidden
 @end example
 
-Tracing even works on builtins, but does not transfer via @command{defn}
-(@pxref{Defn}).
+Tracing even works on builtins.  However, @command{defn} (@pxref{Defn})
+does not transfer tracing status.
 
 @example
-define(`m4_eval')traceon(`eval', `m4_divnum')
+traceon(`eval', `m4_divnum')
 @result{}
 define(`m4_eval', defn(`eval'))
 @result{}
 define(`m4_divnum', defn(`divnum'))
 @result{}
 eval(divnum)
address@hidden: -1- eval(0)
address@hidden: -1- eval(`0') -> `0'
 @result{}0
 m4_eval(m4_divnum)
address@hidden: -2- m4_divnum
address@hidden: -2- m4_divnum -> `0'
 @result{}0
 @end example
 
Index: src/builtin.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/builtin.c,v
retrieving revision 1.1.1.1.2.8
diff -u -p -r1.1.1.1.2.8 builtin.c
--- src/builtin.c       6 Jun 2006 12:47:13 -0000       1.1.1.1.2.8
+++ src/builtin.c       6 Jun 2006 13:09:44 -0000
@@ -186,8 +186,7 @@ find_builtin_by_name (const char *name)
 `-------------------------------------------------------------------------*/
 
 void
-define_builtin (const char *name, const builtin *bp, symbol_lookup mode,
-               boolean traced)
+define_builtin (const char *name, const builtin *bp, symbol_lookup mode)
 {
   symbol *sym;
 
@@ -236,11 +235,11 @@ builtin_init (void)
             string = (char *) xmalloc (strlen (bp->name) + 4);
             strcpy (string, "m4_");
             strcat (string, bp->name);
-            define_builtin (string, bp, SYMBOL_INSERT, FALSE);
+            define_builtin (string, bp, SYMBOL_INSERT);
             free (string);
           }
         else
-          define_builtin (bp->name, bp, SYMBOL_INSERT, FALSE);
+          define_builtin (bp->name, bp, SYMBOL_INSERT);
       }
 
   for (pp = &predefined_tab[0]; pp->func != NULL; pp++)
@@ -434,7 +433,7 @@ define_macro (int argc, token_data **arg
       if (bp == NULL)
        return;
       else
-       define_builtin (ARG (1), bp, mode, TOKEN_DATA_FUNC_TRACED (argv[2]));
+       define_builtin (ARG (1), bp, mode);
       break;
 
     default:
@@ -728,7 +727,7 @@ m4_defn (struct obstack *obs, int argc, 
       break;
 
     case TOKEN_FUNC:
-      push_macro (SYMBOL_FUNC (s), SYMBOL_TRACED (s));
+      push_macro (SYMBOL_FUNC (s));
       break;
 
     case TOKEN_VOID:
Index: src/freeze.c
===================================================================
RCS file: /sources/m4/m4/src/freeze.c,v
retrieving revision 1.1.1.1.2.3
diff -u -p -r1.1.1.1.2.3 freeze.c
--- src/freeze.c        1 May 2005 11:54:12 -0000       1.1.1.1.2.3
+++ src/freeze.c        6 Jun 2006 13:09:44 -0000
@@ -1,6 +1,6 @@
 /* GNU m4 -- A simple macro processor
 
-   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994
+   Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2006
    Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -327,7 +327,7 @@ reload_frozen_state (const char *name)
 
            bp = find_builtin_by_name (string[1]);
            if (bp)
-             define_builtin (string[0], bp, SYMBOL_PUSHDEF, 0);
+             define_builtin (string[0], bp, SYMBOL_PUSHDEF);
            else
              M4ERROR ((warning_status, 0, "\
 `%s' from frozen file not found in builtin table!",
Index: src/input.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/input.c,v
retrieving revision 1.1.1.1.2.5
diff -u -p -r1.1.1.1.2.5 input.c
--- src/input.c 1 Jun 2006 00:09:06 -0000       1.1.1.1.2.5
+++ src/input.c 6 Jun 2006 13:09:44 -0000
@@ -89,12 +89,7 @@ struct input_block
          boolean advance_line; /* start_of_input_line from next_char () */
        }
       u_f;
-      struct
-       {
-         builtin_func *func;   /* pointer to macros function */
-         boolean traced;       /* TRUE iff builtin is traced */
-       }
-      u_m;
+      builtin_func *func;      /* pointer to macro's function */
     }
   u;
 };
@@ -192,14 +187,14 @@ push_file (FILE *fp, const char *title)
   isp = i;
 }
 
-/*-------------------------------------------------------------------------.
-| push_macro () pushes a builtin macros definition on the input stack.  If |
-| next is non-NULL, this push invalidates a call to push_string_init (),   |
-| whose storage are consequentely released.                               |
-`-------------------------------------------------------------------------*/
+/*---------------------------------------------------------------.
+| push_macro () pushes a builtin macro's definition on the input |
+| stack.  If next is non-NULL, this push invalidates a call to   |
+| push_string_init (), whose storage is consequently released.   |
+`---------------------------------------------------------------*/
 
 void
-push_macro (builtin_func *func, boolean traced)
+push_macro (builtin_func *func)
 {
   input_block *i;
 
@@ -213,8 +208,7 @@ push_macro (builtin_func *func, boolean 
                                     sizeof (struct input_block));
   i->type = INPUT_MACRO;
 
-  i->u.u_m.func = func;
-  i->u.u_m.traced = traced;
+  i->u.func = func;
   i->prev = isp;
   isp = i;
 }
@@ -362,10 +356,10 @@ pop_wrapup (void)
   return TRUE;
 }
 
-/*--------------------------------------------------------------------.
-| When a MACRO token is seen, next_token () uses init_macro_token () to |
-| retrieve the value of the function pointer.                        |
-`--------------------------------------------------------------------*/
+/*-------------------------------------------------------------------.
+| When a MACRO token is seen, next_token () uses init_macro_token () |
+| to retrieve the value of the function pointer.                     |
+`-------------------------------------------------------------------*/
 
 static void
 init_macro_token (token_data *td)
@@ -378,8 +372,7 @@ init_macro_token (token_data *td)
     }
 
   TOKEN_DATA_TYPE (td) = TOKEN_FUNC;
-  TOKEN_DATA_FUNC (td) = isp->u.u_m.func;
-  TOKEN_DATA_FUNC_TRACED (td) = isp->u.u_m.traced;
+  TOKEN_DATA_FUNC (td) = isp->u.func;
 }
 
 
Index: src/m4.h
===================================================================
RCS file: /sources/m4/m4/src/m4.h,v
retrieving revision 1.1.1.1.2.7
diff -u -p -r1.1.1.1.2.7 m4.h
--- src/m4.h    6 Jun 2006 12:39:53 -0000       1.1.1.1.2.7
+++ src/m4.h    6 Jun 2006 13:09:44 -0000
@@ -296,12 +296,7 @@ struct token_data
 #endif
        }
       u_t;
-      struct
-       {
-         builtin_func *func;
-         boolean traced;
-       }
-      u_f;
+      builtin_func *func;
     }
   u;
 };
@@ -311,8 +306,7 @@ struct token_data
 #ifdef ENABLE_CHANGEWORD
 # define TOKEN_DATA_ORIG_TEXT(Td)      ((Td)->u.u_t.original_text)
 #endif
-#define TOKEN_DATA_FUNC(Td)            ((Td)->u.u_f.func)
-#define TOKEN_DATA_FUNC_TRACED(Td)     ((Td)->u.u_f.traced)
+#define TOKEN_DATA_FUNC(Td)            ((Td)->u.func)
 
 typedef enum token_type token_type;
 typedef enum token_data_type token_data_type;
@@ -324,7 +318,7 @@ void skip_line _((void));
 
 /* push back input */
 void push_file _((FILE *, const char *));
-void push_macro _((builtin_func *, boolean));
+void push_macro _((builtin_func *));
 struct obstack *push_string_init _((void));
 const char *push_string_finish _((void));
 void push_wrapup _((const char *));
@@ -376,11 +370,11 @@ enum symbol_lookup
 struct symbol
 {
   struct symbol *next;
-  boolean traced;
-  boolean shadowed;
-  boolean macro_args;
-  boolean blind_no_args;
-  boolean deleted;
+  boolean traced : 1;
+  boolean shadowed : 1;
+  boolean macro_args : 1;
+  boolean blind_no_args : 1;
+  boolean deleted : 1;
   int pending_expansions;
 
   char *name;
@@ -422,9 +416,9 @@ void call_macro _((symbol *, int, token_
 struct builtin
 {
   const char *name;
-  boolean gnu_extension;
-  boolean groks_macro_args;
-  boolean blind_if_no_args;
+  boolean gnu_extension : 1;
+  boolean groks_macro_args : 1;
+  boolean blind_if_no_args : 1;
   builtin_func *func;
 };
 
@@ -439,7 +433,7 @@ typedef struct builtin builtin;
 typedef struct predefined predefined;
 
 void builtin_init _((void));
-void define_builtin _((const char *, const builtin *, symbol_lookup, boolean));
+void define_builtin _((const char *, const builtin *, symbol_lookup));
 void define_user_macro _((const char *, const char *, symbol_lookup));
 void undivert_all _((void));
 void expand_user_macro _((struct obstack *, symbol *, int, token_data **));
Index: src/macro.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/macro.c,v
retrieving revision 1.1.1.1.2.2
diff -u -p -r1.1.1.1.2.2 macro.c
--- src/macro.c 6 Jun 2006 12:39:53 -0000       1.1.1.1.2.2
+++ src/macro.c 6 Jun 2006 13:09:44 -0000
@@ -171,7 +171,6 @@ expand_argument (struct obstack *obs, to
            {
              TOKEN_DATA_TYPE (argp) = TOKEN_FUNC;
              TOKEN_DATA_FUNC (argp) = TOKEN_DATA_FUNC (&td);
-             TOKEN_DATA_FUNC_TRACED (argp) = TOKEN_DATA_FUNC_TRACED (&td);
            }
          break;
 
@@ -263,7 +262,7 @@ call_macro (symbol *sym, int argc, token
 | arguments, using collect_arguments (), and builds a table of pointers to |
 | the arguments.  The arguments themselves are stored on a local obstack.  |
 | Expand_macro () uses call_macro () to do the call of the macro.         |
-|                                                                         |
+|                                                                         |
 | Expand_macro () is potentially recursive, since it calls expand_argument |
 | (), which might call expand_token (), which might call expand_macro ().  |
 `-------------------------------------------------------------------------*/
Index: src/symtab.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/symtab.c,v
retrieving revision 1.1.1.1.2.7
diff -u -p -r1.1.1.1.2.7 symtab.c
--- src/symtab.c        6 Jun 2006 12:39:53 -0000       1.1.1.1.2.7
+++ src/symtab.c        6 Jun 2006 13:09:44 -0000
@@ -57,9 +57,9 @@ show_profile (void)
   for (i = 0; i < 5; i++)
     {
       fprintf(stderr, "m4: lookup mode %d called %d times, %d compares, "
-              "%d misses, %lld bytes\n",
-              i, profiles[i].entry, profiles[i].comparisons,
-              profiles[i].misses, profiles[i].bytes);
+             "%d misses, %lld bytes\n",
+             i, profiles[i].entry, profiles[i].comparisons,
+             profiles[i].misses, profiles[i].bytes);
     }
 }
 
@@ -145,9 +145,9 @@ free_symbol (symbol *sym)
   else
     {
       if (SYMBOL_NAME (sym))
-        xfree (SYMBOL_NAME (sym));
+       xfree (SYMBOL_NAME (sym));
       if (SYMBOL_TYPE (sym) == TOKEN_TEXT)
-        xfree (SYMBOL_TEXT (sym));
+       xfree (SYMBOL_TEXT (sym));
       xfree ((voidstar) sym);
     }
 }
@@ -203,33 +203,33 @@ lookup_symbol (const char *name, symbol_
     case SYMBOL_INSERT:
 
       /* If the name was found in the table, check whether it is still in
-         use by a pending expansion.  If so, replace the table element with
-         a new one; if not, just return the symbol.  If not found, just
+        use by a pending expansion.  If so, replace the table element with
+        a new one; if not, just return the symbol.  If not found, just
         insert the name, and return the new symbol.  */
 
       if (cmp == 0 && sym != NULL)
-        {
-          if (SYMBOL_PENDING_EXPANSIONS (sym) > 0)
-            {
-              symbol *old = sym;
-              SYMBOL_DELETED (old) = TRUE;
-
-              sym = (symbol *) xmalloc (sizeof (symbol));
-              SYMBOL_TYPE (sym) = TOKEN_VOID;
-              SYMBOL_TRACED (sym) = SYMBOL_TRACED (old);
-              SYMBOL_NAME (sym) = xstrdup (name);
-              SYMBOL_SHADOWED (sym) = FALSE;
-              SYMBOL_MACRO_ARGS (sym) = FALSE;
-              SYMBOL_BLIND_NO_ARGS (sym) = FALSE;
-              SYMBOL_DELETED (sym) = FALSE;
-              SYMBOL_PENDING_EXPANSIONS (sym) = 0;
-
-              SYMBOL_NEXT (sym) = SYMBOL_NEXT (old);
-              SYMBOL_NEXT (old) = NULL;
-              (*spp) = sym;
-            }
-          return sym;
-        }
+       {
+         if (SYMBOL_PENDING_EXPANSIONS (sym) > 0)
+           {
+             symbol *old = sym;
+             SYMBOL_DELETED (old) = TRUE;
+
+             sym = (symbol *) xmalloc (sizeof (symbol));
+             SYMBOL_TYPE (sym) = TOKEN_VOID;
+             SYMBOL_TRACED (sym) = SYMBOL_TRACED (old);
+             SYMBOL_NAME (sym) = xstrdup (name);
+             SYMBOL_SHADOWED (sym) = FALSE;
+             SYMBOL_MACRO_ARGS (sym) = FALSE;
+             SYMBOL_BLIND_NO_ARGS (sym) = FALSE;
+             SYMBOL_DELETED (sym) = FALSE;
+             SYMBOL_PENDING_EXPANSIONS (sym) = 0;
+
+             SYMBOL_NEXT (sym) = SYMBOL_NEXT (old);
+             SYMBOL_NEXT (old) = NULL;
+             (*spp) = sym;
+           }
+         return sym;
+       }
       /* Fall through.  */
 
     case SYMBOL_PUSHDEF:
@@ -262,47 +262,47 @@ lookup_symbol (const char *name, symbol_
     case SYMBOL_POPDEF:
 
       /* Delete occurrences of symbols with NAME.  SYMBOL_DELETE kills
-         all definitions, SYMBOL_POPDEF kills only the first.
-         However, if the last instance of a symbol is marked for
-         tracing, reinsert a placeholder in the table.  And if the
-         definition is still in use, let the caller free the memory
-         after it is done with the symbol.  */
+        all definitions, SYMBOL_POPDEF kills only the first.
+        However, if the last instance of a symbol is marked for
+        tracing, reinsert a placeholder in the table.  And if the
+        definition is still in use, let the caller free the memory
+        after it is done with the symbol.  */
 
       if (cmp != 0 || sym == NULL)
        return NULL;
       {
        boolean traced = FALSE;
-        if (SYMBOL_NEXT (sym) != NULL
-            && SYMBOL_SHADOWED (SYMBOL_NEXT (sym))
-            && mode == SYMBOL_POPDEF)
-          {
-            SYMBOL_SHADOWED (SYMBOL_NEXT (sym)) = FALSE;
-            SYMBOL_TRACED (SYMBOL_NEXT (sym)) = SYMBOL_TRACED (sym);
-          }
-        else
-          traced = SYMBOL_TRACED (sym);
-        do
+       if (SYMBOL_NEXT (sym) != NULL
+           && SYMBOL_SHADOWED (SYMBOL_NEXT (sym))
+           && mode == SYMBOL_POPDEF)
+         {
+           SYMBOL_SHADOWED (SYMBOL_NEXT (sym)) = FALSE;
+           SYMBOL_TRACED (SYMBOL_NEXT (sym)) = SYMBOL_TRACED (sym);
+         }
+       else
+         traced = SYMBOL_TRACED (sym);
+       do
          {
            *spp = SYMBOL_NEXT (sym);
            free_symbol (sym);
            sym = *spp;
          }
        while (*spp != NULL && SYMBOL_SHADOWED (*spp)
-               && mode == SYMBOL_DELETE);
+              && mode == SYMBOL_DELETE);
        if (traced)
          {
-            sym = (symbol *) xmalloc (sizeof (symbol));
-            SYMBOL_TYPE (sym) = TOKEN_VOID;
-            SYMBOL_TRACED (sym) = TRUE;
-            SYMBOL_NAME (sym) = xstrdup (name);
-            SYMBOL_SHADOWED (sym) = FALSE;
-            SYMBOL_MACRO_ARGS (sym) = FALSE;
-            SYMBOL_BLIND_NO_ARGS (sym) = FALSE;
-            SYMBOL_DELETED (sym) = FALSE;
-            SYMBOL_PENDING_EXPANSIONS (sym) = 0;
+           sym = (symbol *) xmalloc (sizeof (symbol));
+           SYMBOL_TYPE (sym) = TOKEN_VOID;
+           SYMBOL_TRACED (sym) = TRUE;
+           SYMBOL_NAME (sym) = xstrdup (name);
+           SYMBOL_SHADOWED (sym) = FALSE;
+           SYMBOL_MACRO_ARGS (sym) = FALSE;
+           SYMBOL_BLIND_NO_ARGS (sym) = FALSE;
+           SYMBOL_DELETED (sym) = FALSE;
+           SYMBOL_PENDING_EXPANSIONS (sym) = 0;
 
-            SYMBOL_NEXT (sym) = *spp;
-            (*spp) = sym;
+           SYMBOL_NEXT (sym) = *spp;
+           (*spp) = sym;
          }
       }
       return NULL;
@@ -335,13 +335,13 @@ hack_all_symbols (hack_symbol *func, con
   for (h = 0; h < hash_table_size; h++)
     {
       /* We allow func to call SYMBOL_POPDEF, which can invalidate
-         sym, so we must grab the next element to traverse before
-         calling func.  */
+        sym, so we must grab the next element to traverse before
+        calling func.  */
       for (sym = symtab[h]; sym != NULL; sym = next)
-        {
-          next = SYMBOL_NEXT (sym);
-          (*func) (sym, data);
-        }
+       {
+         next = SYMBOL_NEXT (sym);
+         (*func) (sym, data);
+       }
     }
 }
 
@@ -392,11 +392,11 @@ symtab_print_list (int i)
   for (h = 0; h < hash_table_size; h++)
     for (sym = symtab[h]; sym != NULL; sym = sym->next)
       printf ("\tname %s, bucket %lu, addr %p, next %p, "
-              "flags%s%s%s, pending %d\n",
-              SYMBOL_NAME (sym),
-              (unsigned long int) h, sym, SYMBOL_NEXT (sym),
-              SYMBOL_TRACED (sym) ? " traced" : "",
-              SYMBOL_SHADOWED (sym) ? " shadowed" : "",
+             "flags%s%s%s, pending %d\n",
+             SYMBOL_NAME (sym),
+             (unsigned long int) h, sym, SYMBOL_NEXT (sym),
+             SYMBOL_TRACED (sym) ? " traced" : "",
+             SYMBOL_SHADOWED (sym) ? " shadowed" : "",
              SYMBOL_DELETED (sym) ? " deleted" : "",
              SYMBOL_PENDING_EXPANSIONS (sym));
 }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]