m4-patches
[Top][All Lists]
Advanced

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

FYI: 9-gary-module-api-audit-symtab.patch


From: Gary V. Vaughan
Subject: FYI: 9-gary-module-api-audit-symtab.patch
Date: Fri, 13 Jun 2003 14:09:30 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529

Applied to HEAD.

Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>

        More refactoring to stabilise the module api, this time for
        symtab.c.  Additionally, start to pay attention to function names
        that don't contain a verb like they should.

        * m4/m4module.h (m4_symtab_apply): Reintroduced this function as a
        wrapper for m4_hash_apply to decouple the symtab module from the
        hash module.
        (m4_symbol_builtin, m4_symbol_macro): Renamed to
        m4__symbol_set_builtin and m4__symbol_set_macro.  Changed all
        callers.
        (m4_symbol_delete): Create a macro version to save a function
        call.
        (m4_token_t, m4_data_t): These violate the POSIX reserved
        namespace.  Renamed to m4_token_type and m4_symbol_type. Changed
        all callers.
        (m4_token_type): Renamed to m4_token_get_type.
        (m4_symtab, m4_symtab_init, m4_symtab_remove_module_references)
        (m4_symtab_exit): Removed from the exported module
        api...
        * m4/m4private.h (m4__symtab, m4__symtab_init)
        (m4__symtab_remove_module_references, m4__symtab_exit): ...and
        renamed and added to the internal api. Changed all callers.
        (m4_symtab_apply): A faster macro version of the function for
        users of the internal api.
        * m4/symtab.c (m4_symbol_destroy, m4_arg_destroy): Renamed to
        symbol_destroy and arg_destroy.
        (symtab_debug): Added a prototype.
        (m4_symtab_apply, m4_symbol_delete): Moved to the end of the file
        so that callers in this file get the faster macro versions from
        m4/m4private.h.

Index: m4/builtin.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/builtin.c,v
retrieving revision 1.16
diff -u -p -u -r1.16 builtin.c
--- m4/builtin.c 6 Jun 2003 16:14:05 -0000 1.16
+++ m4/builtin.c 13 Jun 2003 13:05:24 -0000
@@ -72,7 +72,7 @@ m4_builtin_find_by_func (const m4_builti
 }
 
 m4_symbol *
-m4_symbol_token (const char *name, m4_data_t type, m4_token *token,
+m4_symbol_token (const char *name, m4_symbol_type type, m4_token *token,
                 m4_symbol *(*getter) (const char *name),
                 m4_symbol *(*setter) (m4_symbol *, m4_token *))
 {
Index: m4/input.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/input.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 input.c
--- m4/input.c 5 Jun 2003 16:12:16 -0000 1.23
+++ m4/input.c 13 Jun 2003 13:05:24 -0000
@@ -742,12 +742,12 @@ m4_input_exit (void)
    token_stack, which never contains more than one token text at a time.
    The storage pointed to by the fields in TD is therefore subject to
    change the next time next_token () is called.        */
-m4_token_t
+m4__token_type
 m4_next_token (m4_token *td)
 {
   int ch;
   int quote_level;
-  m4_token_t type;
+  m4__token_type type;
 
   do {
     obstack_free (&token_stack, token_bottom);
@@ -970,29 +970,29 @@ m4_token_copy (m4_token *dest, m4_token 
 static void  lex_debug (void);
 
 int
-m4_print_token (const char *s, m4_token_t t, m4_token *td)
+m4_print_token (const char *s, m4__token_type type, m4_token *token)
 {
   fprintf (stderr, "%s: ", s);
-  switch (t)
+  switch (type)
     {                          /* TOKSW */
     case M4_TOKEN_SIMPLE:
-      fprintf (stderr, "char\t\"%s\"\n",       TOKEN_TEXT (td));
+      fprintf (stderr, "char\t\"%s\"\n",       TOKEN_TEXT (token));
       break;
 
     case M4_TOKEN_WORD:
-      fprintf (stderr, "word\t\"%s\"\n",       TOKEN_TEXT (td));
+      fprintf (stderr, "word\t\"%s\"\n",       TOKEN_TEXT (token));
       break;
 
     case M4_TOKEN_STRING:
-      fprintf (stderr, "string\t\"%s\"\n",     TOKEN_TEXT (td));
+      fprintf (stderr, "string\t\"%s\"\n",     TOKEN_TEXT (token));
       break;
 
     case M4_TOKEN_SPACE:
-      fprintf (stderr, "space\t\"%s\"\n",      TOKEN_TEXT (td));
+      fprintf (stderr, "space\t\"%s\"\n",      TOKEN_TEXT (token));
       break;
 
     case M4_TOKEN_MACDEF:
-      fprintf (stderr, "builtin 0x%x\n",       (int) TOKEN_FUNC (td));
+      fprintf (stderr, "builtin 0x%x\n",       (int) TOKEN_FUNC (token));
       break;
 
     case M4_TOKEN_EOF:
@@ -1009,10 +1009,10 @@ m4_print_token (const char *s, m4_token_
 static void
 lex_debug (void)
 {
-  m4_token_t t;
-  m4_token td;
+  m4__token_type type;
+  m4_token token;
 
-  while ((t = next_token (&td)) != NULL)
-    print_token ("lex", t, &td);
+  while ((type = next_token (&token)) != NULL)
+    print_token ("lex", type, &token);
 }
 #endif
Index: m4/m4module.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4module.h,v
retrieving revision 1.43
diff -u -p -u -r1.43 m4module.h
--- m4/m4module.h 12 Jun 2003 16:31:59 -0000 1.43
+++ m4/m4module.h 13 Jun 2003 13:05:24 -0000
@@ -72,19 +72,21 @@ extern m4_macro        *m4_module_macros   (
 
 /* --- SYMBOL TABLE MANAGEMENT --- */
 
-extern m4_hash *m4_symtab;
 
-extern void    m4_symtab_init          (void);
-extern void    m4_symtab_remove_module_references (lt_dlhandle);
-extern void    m4_symtab_exit          (void);
+typedef struct m4_symtab m4_symtab;
+
+typedef int m4_symtab_apply_func (const void *key, void *value, void *data);
+
+extern int       m4_symtab_apply       (m4_symtab_apply_func*, void*);
 
 extern m4_symbol *m4_symbol_lookup     (const char *);
 extern m4_symbol *m4_symbol_pushdef    (const char *);
 extern m4_symbol *m4_symbol_define     (const char *);
 extern void       m4_symbol_popdef     (const char *);
 extern void       m4_symbol_delete     (const char *);
-extern m4_symbol *m4_symbol_builtin    (m4_symbol *symbol, m4_token *token);
-extern m4_symbol *m4_symbol_macro      (m4_symbol *symbol, m4_token *token);
+
+#define m4_symbol_delete(name)                                         \
+       while (m4_symbol_lookup (name)) m4_symbol_popdef (name)
 
 
 /* Various different token types.  */
@@ -96,21 +98,21 @@ typedef enum {
   M4_TOKEN_WORD,               /* an identifier */
   M4_TOKEN_SIMPLE,             /* a single character */
   M4_TOKEN_MACDEF              /* a macros definition (see "defn") */
-} m4_token_t;
+} m4__token_type;
 
 /* The data for a token, a macro argument, and a macro definition.  */
 typedef enum {
   M4_TOKEN_VOID,
   M4_TOKEN_TEXT,
   M4_TOKEN_FUNC
-} m4_data_t;
+} m4_symbol_type;
 
 
 
 
 /* --- MACRO (and builtin) MANAGEMENT --- */
 
-extern m4_symbol *m4_symbol_token (const char *name, m4_data_t type,
+extern m4_symbol *m4_symbol_token (const char *name, m4_symbol_type type,
                        m4_token *token,
                        m4_symbol *(*getter) (const char *name),
                        m4_symbol *(*setter) (m4_symbol *, m4_token *));
@@ -125,20 +127,26 @@ extern const m4_builtin *m4_builtin_find
 extern const m4_builtin *m4_builtin_find_by_func (
                                const m4_builtin *, m4_builtin_func *);
 
+
+/* These 2 functions are not part of the documented API, but we need to
+   declare them here so that the macros below will work.  */
+extern m4_symbol *m4__symbol_set_builtin (m4_symbol*, m4_token*);
+extern m4_symbol *m4__symbol_set_macro  (m4_symbol*, m4_token*);
+
 #define m4_macro_pushdef(name, macro)                                  \
        m4_symbol_token ((name), M4_TOKEN_TEXT, (macro),                \
-                        m4_symbol_pushdef, m4_symbol_macro)
+                        m4_symbol_pushdef, m4__symbol_set_macro)
 #define m4_macro_define(name, macro)                                   \
        m4_symbol_token ((name), M4_TOKEN_TEXT, (macro),                \
-                        m4_symbol_define, m4_symbol_macro)
+                        m4_symbol_define, m4__symbol_set_macro)
 #define m4_builtin_pushdef(name, builtin)                              \
        m4_symbol_token ((name), M4_TOKEN_FUNC, (builtin),              \
-                        m4_symbol_pushdef, m4_symbol_builtin)
+                        m4_symbol_pushdef, m4__symbol_set_builtin)
 #define m4_builtin_define(name, builtin)                               \
        m4_symbol_token ((name), M4_TOKEN_FUNC, (builtin),              \
-                        m4_symbol_define, m4_symbol_builtin)
+                        m4_symbol_define, m4__symbol_set_builtin)
 
-extern m4_token_t      m4_token_type     (m4_token *);
+extern m4__token_type  m4_token_get_type (m4_token *);
 extern char           *m4_token_text     (m4_token *);
 extern m4_builtin_func *m4_token_func    (m4_token *);
 
@@ -404,7 +412,7 @@ extern int m4_current_line;
 extern void    m4_input_init   (void);
 extern void    m4_input_exit   (void);
 extern int     m4_peek_input   (void);
-extern m4_token_t m4_next_token (m4_token *);
+extern m4__token_type m4_next_token (m4_token *);
 extern void    m4_token_copy   (m4_token *dest, m4_token *src);
 extern void    m4_skip_line    (void);
 
Index: m4/m4private.h
===================================================================
RCS file: /cvsroot/m4/m4/m4/m4private.h,v
retrieving revision 1.19
diff -u -p -u -r1.19 m4private.h
--- m4/m4private.h 12 Jun 2003 16:31:59 -0000 1.19
+++ m4/m4private.h 13 Jun 2003 13:05:24 -0000
@@ -41,6 +41,19 @@ extern lt_dlhandle  m4__module_open (con
 extern void        m4__module_exit (void);
 
 
+
+/* --- SYMBOL TABLE MANAGEMENT --- */
+
+extern m4_hash *m4__symtab;
+
+#define m4_symtab_apply(func, data)                            \
+       m4_hash_apply (m4__symtab, (m4_hash_apply_func *)(func), (data))
+
+extern void    m4__symtab_init                         (void);
+extern void    m4__symtab_remove_module_references     (lt_dlhandle);
+extern void    m4__symtab_exit                         (void);
+
+
 /* TRUE iff strlen(rquote) == strlen(lquote) == 1 */
 extern boolean m4__single_quotes;
 
@@ -78,7 +91,7 @@ struct m4_token {
   m4_hash *            arg_signature;
   int                  min_args, max_args;
 
-  m4_data_t            type;
+  m4_symbol_type       type;
   union {
     char *             text;
     m4_builtin_func *  func;
Index: m4/macro.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/macro.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 macro.c
--- m4/macro.c 6 Jun 2003 16:14:05 -0000 1.23
+++ m4/macro.c 13 Jun 2003 13:05:24 -0000
@@ -25,7 +25,7 @@
 #include "m4private.h"
 
 static void expand_macro (const char *name, m4_symbol *);
-static void expand_token (struct obstack *, m4_token_t, m4_token *);
+static void expand_token (struct obstack *, m4__token_type, m4_token *);
 
 /* Current recursion level in expand_macro ().  */
 int m4_expansion_level = 0;
@@ -37,7 +37,7 @@ static int macro_call_id = 0;
 void
 m4_expand_input (void)
 {
-  m4_token_t type;
+  m4__token_type type;
   m4_token token;
 
   while ((type = m4_next_token (&token)) != M4_TOKEN_EOF)
@@ -50,7 +50,7 @@ m4_expand_input (void)
    macro definition.  If they have, they are expanded as macros, otherwise
    the text are just copied to the output.  */
 static void
-expand_token (struct obstack *obs, m4_token_t type, m4_token *token)
+expand_token (struct obstack *obs, m4__token_type type, m4_token *token)
 {
   m4_symbol *symbol;
   char *text = xstrdup (TOKEN_TEXT (token));
@@ -108,7 +108,7 @@ expand_token (struct obstack *obs, m4_to
 static boolean
 expand_argument (struct obstack *obs, m4_token *argp)
 {
-  m4_token_t type;
+  m4__token_type type;
   m4_token token;
   char *text;
   int paren_level = 0;
Index: m4/module.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/module.c,v
retrieving revision 1.17
diff -u -p -u -r1.17 module.c
--- m4/module.c 12 Jun 2003 16:31:59 -0000 1.17
+++ m4/module.c 13 Jun 2003 13:05:24 -0000
@@ -70,7 +70,7 @@
  * this case.
  *
  * To unload a module, use m4_module_unload(). which uses
- * m4_symtab_remove_module_references() to remove the builtins defined by
+ * m4__symtab_remove_module_references() to remove the builtins defined by
  * the unloaded module from the symbol table.  If the module has been
  * loaded several times with calls to m4_module_load, then the module will
  * not be unloaded until the same number of calls to m4_module_unload()
@@ -513,7 +513,7 @@ module_remove (lt_dlhandle handle, struc
         equal to 1.  If module_close is called again on a
         resident module after the references have already been
         removed, we needn't try to remove them again!  */
-      m4_symtab_remove_module_references (handle);
+      m4__symtab_remove_module_references (handle);
 
 #ifdef DEBUG_MODULES
       M4_DEBUG_MESSAGE1("module %s: symbols unloaded", name);
Index: m4/symtab.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/symtab.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 symtab.c
--- m4/symtab.c 10 Jun 2003 11:51:08 -0000 1.32
+++ m4/symtab.c 13 Jun 2003 13:05:24 -0000
@@ -44,13 +44,13 @@
 
 #define M4_SYMTAB_DEFAULT_SIZE 2047
 
-static int     m4_symbol_destroy       (const void *name, void *symbol,
-                                        void *symtab);
-static int     m4_arg_destroy          (const void *name, void *arg,
+static int     symbol_destroy          (const void *name, void *symbol,
+                                        void *ignored);
+static int     arg_destroy             (const void *name, void *arg,
                                         void *arg_signature);
 
 /* Pointer to symbol table.  */
-m4_hash *m4_symtab = 0;
+m4_hash *m4__symtab = 0;
 
 
 
@@ -60,27 +60,26 @@ m4_hash *m4_symtab = 0;
    These functions are used to manage a symbol table as a whole.  */
 
 void
-m4_symtab_init (void)
+m4__symtab_init (void)
 {
-  m4_symtab = m4_hash_new (M4_SYMTAB_DEFAULT_SIZE,
-                          m4_hash_string_hash, m4_hash_string_cmp);
+  m4__symtab = m4_hash_new (M4_SYMTAB_DEFAULT_SIZE,
+                           m4_hash_string_hash, m4_hash_string_cmp);
 }
 
-
 /* Remove every symbol that references the given module handle from
    the symbol table.  */
 void
-m4_symtab_remove_module_references (lt_dlhandle handle)
+m4__symtab_remove_module_references (lt_dlhandle handle)
 {
   m4_hash_iterator *place = 0;
 
   assert (handle);
 
    /* Traverse each symbol name in the hash table.  */
-  while ((place = m4_hash_iterator_next (m4_symtab, place)))
+  while ((place = m4_hash_iterator_next (m4__symtab, place)))
     {
       m4_symbol *symbol = (m4_symbol *) m4_hash_iterator_value (place);
-      m4_token *data = SYMBOL_TOKEN (symbol);
+      m4_token  *data   = SYMBOL_TOKEN (symbol);
 
       /* For symbols that have token data... */
       if (data)
@@ -111,25 +110,25 @@ m4_symtab_remove_module_references (lt_d
 
 /* Release all of the memory used by the symbol table.  */
 void
-m4_symtab_exit (void)
+m4__symtab_exit (void)
 {
-  m4_hash_apply  (m4_symtab, m4_symbol_destroy, m4_symtab);
-  m4_hash_delete (m4_symtab);
+  m4_hash_apply  (m4__symtab, symbol_destroy, NULL);
+  m4_hash_delete (m4__symtab);
   m4_hash_exit   ();
 }
 
-/* This callback is used exclusively by m4_symtab_exit(), to cleanup
+/* This callback is used exclusively by m4__symtab_exit(), to cleanup
    the memory used by the symbol table.  As such, the trace bit is reset
    on every symbol so that m4_symbol_popdef() doesn't try to preserve
    the table entry.  */
 static int
-m4_symbol_destroy (const void *name, void *symbol, void *symtab)
+symbol_destroy (const void *name, void *symbol, void *ignored)
 {
   char *key = xstrdup ((char *) name);
 
   SYMBOL_TRACED ((m4_symbol *) symbol) = FALSE;
 
-  while (key && m4_hash_lookup ((m4_hash *) symtab, key))
+  while (key && m4_hash_lookup (m4__symtab, key))
     m4_symbol_popdef (key);
 
   XFREE (key);
@@ -148,7 +147,7 @@ m4_symbol_destroy (const void *name, voi
 m4_symbol *
 m4_symbol_lookup (const char *name)
 {
-  m4_symbol **psymbol = (m4_symbol **) m4_hash_lookup (m4_symtab, name);
+  m4_symbol **psymbol = (m4_symbol **) m4_hash_lookup (m4__symtab, name);
 
   /* If just searching, return status of search -- if only an empty
      struct is returned, that is treated as a failed lookup.  */
@@ -162,7 +161,7 @@ m4_symbol_lookup (const char *name)
 m4_symbol *
 m4_symbol_pushdef (const char *name)
 {
-  m4_symbol **psymbol = (m4_symbol **) m4_hash_lookup (m4_symtab, name);
+  m4_symbol **psymbol = (m4_symbol **) m4_hash_lookup (m4__symtab, name);
 
   m4_symbol *symbol = 0;
   m4_token *value   = XCALLOC (m4_token, 1);
@@ -179,7 +178,7 @@ m4_symbol_pushdef (const char *name)
   SYMBOL_TYPE (symbol) = M4_TOKEN_VOID;
 
   if (!psymbol)
-    m4_hash_insert (m4_symtab, xstrdup (name), symbol);
+    m4_hash_insert (m4__symtab, xstrdup (name), symbol);
 
   return symbol;
 }
@@ -205,7 +204,7 @@ m4_symbol_define (const char *name)
 void
 m4_symbol_popdef (const char *name)
 {
-  m4_symbol **psymbol  = (m4_symbol **) m4_hash_lookup (m4_symtab, name);
+  m4_symbol **psymbol  = (m4_symbol **) m4_hash_lookup (m4__symtab, name);
   m4_token  *stale     = NULL;
 
   assert (psymbol);
@@ -220,7 +219,7 @@ m4_symbol_popdef (const char *name)
       if (TOKEN_ARG_SIGNATURE (stale))
        {
          m4_hash_apply (TOKEN_ARG_SIGNATURE (stale),
-                        m4_arg_destroy, TOKEN_ARG_SIGNATURE (stale));
+                        arg_destroy, TOKEN_ARG_SIGNATURE (stale));
          m4_hash_delete (TOKEN_ARG_SIGNATURE (stale));
        }
       if (TOKEN_TYPE (stale) == M4_TOKEN_TEXT)
@@ -234,23 +233,15 @@ m4_symbol_popdef (const char *name)
     if (no_gnu_extensions || !SYMBOL_TRACED (*psymbol))
       {
        XFREE (*psymbol);
-       xfree (m4_hash_remove (m4_symtab, name));
+       xfree (m4_hash_remove (m4__symtab, name));
       }
 }
 
 
-/* Pop all values from the symbol associated with NAME.  */
-void
-m4_symbol_delete (const char *name)
-{
-  while (m4_symbol_lookup (name))
-    m4_symbol_popdef (name);
-}
-
 /* Callback used by m4_symbol_popdef () to release the memory used
    by values in the arg_signature hash.  */
 static int
-m4_arg_destroy (const void *name, void *arg, void *arg_signature)
+arg_destroy (const void *name, void *arg, void *arg_signature)
 {
   struct m4_token_arg *token_arg = (struct m4_token_arg *) arg;
 
@@ -271,7 +262,7 @@ m4_arg_destroy (const void *name, void *
    that is already interned in the symbol table.  The traced bit should
    be appropriately set by the caller.  */
 m4_symbol *
-m4_symbol_builtin (m4_symbol *symbol, m4_token *token)
+m4__symbol_set_builtin (m4_symbol *symbol, m4_token *token)
 {
   assert (symbol);
   assert (token);
@@ -295,7 +286,7 @@ m4_symbol_builtin (m4_symbol *symbol, m4
 
 /* ...and similarly for macro valued symbols.  */
 m4_symbol *
-m4_symbol_macro (m4_symbol *symbol, m4_token *token)
+m4__symbol_set_macro (m4_symbol *symbol, m4_token *token)
 {
   assert (symbol);
   assert (TOKEN_TEXT (token));
@@ -320,15 +311,16 @@ m4_symbol_macro (m4_symbol *symbol, m4_t
 
 #ifdef DEBUG_SYM
 
-static int symtab_print_list (const void *name, void *symbol, void *ignored);
-static void symtab_dump (void);
+static int  symtab_print_list (const void *name, void *symbol, void *ignored);
+static void symtab_debug      (void)
+static void symtab_dump              (void);
 
 static void
 symtab_dump (void)
 {
   m4_hash_iterator *place = 0;
 
-  while ((place = m4_hash_iterator_next (m4_symtab, place)))
+  while ((place = m4_hash_iterator_next (m4__symtab, place)))
     {
       const char   *symbol_name        = (const char *) m4_hash_iterator_key 
(place);
       m4_symbol           *symbol      = m4_hash_iterator_value (place);
@@ -368,15 +360,15 @@ symtab_dump (void)
 static void
 symtab_debug (void)
 {
-  m4_token_t t;
+  m4__token_type type;
   m4_token token;
   const char *text;
-  m4_symbol *s;
+  m4_symbol *symbol;
   int delete;
 
-  while ((t = m4_next_token (&token)) != M4_TOKEN_EOF)
+  while ((type = m4_next_token (&token)) != M4_TOKEN_EOF)
     {
-      if (t != M4_TOKEN_WORD)
+      if (type != M4_TOKEN_WORD)
        continue;
       text = TOKEN_TEXT (&token);
       if (*text == '_')
@@ -387,9 +379,9 @@ symtab_debug (void)
       else
        delete = 0;
 
-      s = m4_symbol_lookup (text);
+      symbol = m4_symbol_lookup (text);
 
-      if (s == NULL)
+      if (symbol == NULL)
        printf (_("Name `%s' is unknown\n"), text);
 
       if (delete)
@@ -397,7 +389,7 @@ symtab_debug (void)
       else
        (void) m4_symbol_define (text);
     }
-  m4_hash_apply (m4_symtab, symtab_print_list, NULL);
+  m4_symtab_apply (symtab_print_list, NULL);
 }
 
 static int
@@ -411,3 +403,21 @@ symtab_print_list (const void *name, voi
 }
 
 #endif /* DEBUG_SYM */
+
+/* Define these functions at the end, so that calls in the file use the
+   faster macro version from m4private.h.  */
+#undef m4_symtab_apply
+int
+m4_symtab_apply (m4_symtab_apply_func *func, void *data)
+{
+  return m4_hash_apply (m4__symtab, (m4_hash_apply_func *) func, data);
+}
+
+/* Pop all values from the symbol associated with NAME.  */
+#undef m4_symbol_delete
+void
+m4_symbol_delete (const char *name)
+{
+  while (m4_symbol_lookup (name))
+    m4_symbol_popdef (name);
+}
Index: m4/utility.c
===================================================================
RCS file: /cvsroot/m4/m4/m4/utility.c,v
retrieving revision 1.23
diff -u -p -u -r1.23 utility.c
--- m4/utility.c 6 Jun 2003 16:14:05 -0000 1.23
+++ m4/utility.c 13 Jun 2003 13:05:24 -0000
@@ -75,8 +75,8 @@ m4_string ecomm;
    Since they are functions the caller does not need access to the
    internal data structure, so they are safe to export for use in
    external modules.  */
-m4_token_t
-m4_token_type (m4_token *name)
+m4__token_type
+m4_token_get_type (m4_token *name)
 {
   return TOKEN_TYPE (name);
 }
@@ -248,7 +248,7 @@ m4_dump_symbols (struct m4_dump_symbol_d
 
   if (argc == 1)
     {
-      m4_hash_apply (m4_symtab, m4_dump_symbol, data);
+      m4_symtab_apply (m4_dump_symbol, data);
     }
   else
     {
Index: modules/m4.c
===================================================================
RCS file: /cvsroot/m4/m4/modules/m4.c,v
retrieving revision 1.36
diff -u -p -u -r1.36 m4.c
--- modules/m4.c 12 Jun 2003 16:31:59 -0000 1.36
+++ modules/m4.c 13 Jun 2003 13:05:24 -0000
@@ -593,7 +593,7 @@ M4BUILTIN_HANDLER (traceon)
   int i;
 
   if (argc == 1)
-    m4_hash_apply (m4_symtab, set_trace, (void *) obs);
+    m4_symtab_apply (set_trace, (void *) obs);
   else
     for (i = 1; i < argc; i++)
       {
@@ -613,7 +613,7 @@ M4BUILTIN_HANDLER (traceoff)
   int i;
 
   if (argc == 1)
-    m4_hash_apply (m4_symtab, set_trace, NULL);
+    m4_symtab_apply (set_trace, NULL);
   else
     for (i = 1; i < argc; i++)
       {
Index: src/freeze.c
===================================================================
RCS file: /cvsroot/m4/m4/src/freeze.c,v
retrieving revision 1.24
diff -u -p -u -r1.24 freeze.c
--- src/freeze.c 12 Jun 2003 16:31:59 -0000 1.24
+++ src/freeze.c 13 Jun 2003 13:05:24 -0000
@@ -254,7 +254,7 @@ produce_frozen_state (const char *name)
   produce_module_dump (file, lt_dlhandle_next (0));
 
   /* Dump all symbols.  */
-  produce_symbol_dump (file, m4_symtab);
+  produce_symbol_dump (file, m4__symtab);
 
   /* Let diversions be issued from output.c module, its cleaner to have this
      piece of code there.  */
Index: src/main.c
===================================================================
RCS file: /cvsroot/m4/m4/src/main.c,v
retrieving revision 1.36
diff -u -p -u -r1.36 main.c
--- src/main.c 12 Jun 2003 16:31:59 -0000 1.36
+++ src/main.c 13 Jun 2003 13:05:24 -0000
@@ -228,7 +228,7 @@ main (int argc, char *const *argv, char 
   m4__module_init ();
   m4_debug_init ();
   m4_include_init ();
-  m4_symtab_init ();
+  m4__symtab_init ();
 
 #ifdef USE_STACKOVF
   setup_stackovf_trap (argv, envp, stackovf_handler);
@@ -527,7 +527,7 @@ warranty; not even for MERCHANTABILITY o
      Strictly, we don't need to do this, but it makes leak detection
      a whole lot easier!  */
   m4__module_exit ();
-  m4_symtab_exit ();
+  m4__symtab_exit ();
   m4_syntax_exit ();
   m4_output_exit ();
   m4_input_exit ();

reply via email to

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