m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/m4/m4private.h,v


From: Eric Blake
Subject: Changes to m4/m4/m4private.h,v
Date: Fri, 28 Jul 2006 14:06:12 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/07/28 14:06:11

Index: m4/m4private.h
===================================================================
RCS file: /sources/m4/m4/m4/m4private.h,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- m4/m4private.h      22 Jul 2006 19:23:04 -0000      1.51
+++ m4/m4private.h      28 Jul 2006 14:06:11 -0000      1.52
@@ -39,9 +39,10 @@
 typedef struct m4__search_path_info m4__search_path_info;
 
 typedef enum {
-  M4_SYMBOL_VOID,
-  M4_SYMBOL_TEXT,
-  M4_SYMBOL_FUNC
+  M4_SYMBOL_VOID, /* Traced but undefined.  */
+  M4_SYMBOL_TEXT, /* Plain text.  */
+  M4_SYMBOL_FUNC, /* Builtin function.  */
+  M4_SYMBOL_PLACEHOLDER, /* Placeholder for unknown builtin during -R.  */
 } m4__symbol_type;
 
 #define BIT_TEST(flags, bit)   (((flags) & (bit)) == (bit))
@@ -160,8 +161,8 @@
 
   m4__symbol_type      type;
   union {
-    char *             text;
-    m4_builtin_func *  func;
+    char *             text; /* Valid when type is TEXT, PLACEHOLDER.  */
+    m4_builtin_func *  func; /* Valid when type is FUNC.  */
   } u;
 };
 
@@ -191,13 +192,19 @@
 #  define m4_is_symbol_value_text(V)   ((V)->type == M4_SYMBOL_TEXT)
 #  define m4_is_symbol_value_func(V)   ((V)->type == M4_SYMBOL_FUNC)
 #  define m4_is_symbol_value_void(V)   ((V)->type == M4_SYMBOL_VOID)
+#  define m4_is_symbol_value_placeholder(V)                            \
+                                       ((V)->type == M4_SYMBOL_PLACEHOLDER)
 #  define m4_get_symbol_value_text(V)  ((V)->u.text)
 #  define m4_get_symbol_value_func(V)  ((V)->u.func)
+#  define m4_get_symbol_value_placeholder(V)                           \
+                                       ((V)->u.text)
 
 #  define m4_set_symbol_value_text(V, T)                               \
        ((V)->type = M4_SYMBOL_TEXT, (V)->u.text = (T))
 #  define m4_set_symbol_value_func(V, F)                               \
        ((V)->type = M4_SYMBOL_FUNC, (V)->u.func = (F))
+#  define m4_set_symbol_value_placeholder(V, T)                                
\
+       ((V)->type = M4_SYMBOL_PLACEHOLDER, (V)->u.text = (T))
 #endif
 
 




reply via email to

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