m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/m4/macro.c,v


From: Eric Blake
Subject: Changes to m4/m4/macro.c,v
Date: Mon, 28 May 2007 21:48:44 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      07/05/28 21:48:42

Index: m4/macro.c
===================================================================
RCS file: /sources/m4/m4/m4/macro.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- m4/macro.c  8 Apr 2007 05:06:42 -0000       1.67
+++ m4/macro.c  28 May 2007 21:48:41 -0000      1.68
@@ -33,7 +33,7 @@
                                  m4_obstack *, m4_obstack *);
 static void    expand_macro      (m4 *, const char *, m4_symbol *);
 static void    expand_token      (m4 *, m4_obstack *, m4__token_type,
-                                 m4_symbol_value *);
+                                 m4_symbol_value *, int);
 static bool    expand_argument   (m4 *, m4_obstack *, m4_symbol_value *);
 static void    process_macro    (m4 *, m4_symbol_value *, m4_obstack *, int,
                                  m4_symbol_value **);
@@ -76,12 +76,13 @@
 {
   m4__token_type type;
   m4_symbol_value token;
+  int line;
 
   obstack_init (&argc_stack);
   obstack_init (&argv_stack);
 
-  while ((type = m4__next_token (context, &token)) != M4_TOKEN_EOF)
-    expand_token (context, (m4_obstack *) NULL, type, &token);
+  while ((type = m4__next_token (context, &token, &line)) != M4_TOKEN_EOF)
+    expand_token (context, (m4_obstack *) NULL, type, &token, line);
 
   obstack_free (&argc_stack, NULL);
   obstack_free (&argv_stack, NULL);
@@ -94,7 +95,7 @@
    the text are just copied to the output.  */
 static void
 expand_token (m4 *context, m4_obstack *obs,
-             m4__token_type type, m4_symbol_value *token)
+             m4__token_type type, m4_symbol_value *token, int line)
 {
   m4_symbol *symbol;
   const char *text = (m4_is_symbol_value_text (token)
@@ -112,7 +113,7 @@
     case M4_TOKEN_SIMPLE:
     case M4_TOKEN_STRING:
     case M4_TOKEN_SPACE:
-      m4_shipout_text (context, obs, text, strlen (text));
+      m4_shipout_text (context, obs, text, strlen (text), line);
       break;
 
     case M4_TOKEN_WORD:
@@ -129,7 +130,7 @@
                && BIT_TEST (SYMBOL_FLAGS (symbol), VALUE_BLIND_ARGS_BIT)
                && ! m4__next_token_is_open (context)))
          {
-           m4_shipout_text (context, obs, text, strlen (text));
+           m4_shipout_text (context, obs, text, strlen (text), line);
          }
        else
          expand_macro (context, textp, symbol);
@@ -165,7 +166,7 @@
   /* Skip leading white space.  */
   do
     {
-      type = m4__next_token (context, &token);
+      type = m4__next_token (context, &token, NULL);
     }
   while (type == M4_TOKEN_SPACE);
 
@@ -196,7 +197,7 @@
            paren_level++;
          else if (type == M4_TOKEN_CLOSE)
            paren_level--;
-         expand_token (context, obs, type, &token);
+         expand_token (context, obs, type, &token, line);
          break;
 
        case M4_TOKEN_EOF:
@@ -207,7 +208,7 @@
        case M4_TOKEN_WORD:
        case M4_TOKEN_SPACE:
        case M4_TOKEN_STRING:
-         expand_token (context, obs, type, &token);
+         expand_token (context, obs, type, &token, line);
          break;
 
        case M4_TOKEN_MACDEF:
@@ -220,7 +221,7 @@
          abort ();
        }
 
-      type = m4__next_token (context, &token);
+      type = m4__next_token (context, &token, NULL);
     }
 }
 
@@ -353,7 +354,7 @@
 
   if (m4__next_token_is_open (context))
     {
-      m4__next_token (context, &token);                /* gobble parenthesis */
+      m4__next_token (context, &token, NULL); /* gobble parenthesis */
       do
        {
          more_args = expand_argument (context, arguments, &token);




reply via email to

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