m4-commit
[Top][All Lists]
Advanced

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

Changes to m4/modules/gnu.c,v


From: Gary V. Vaughan
Subject: Changes to m4/modules/gnu.c,v
Date: Mon, 10 Jul 2006 19:21:03 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Gary V. Vaughan <gary>  06/07/10 19:21:02

Index: modules/gnu.c
===================================================================
RCS file: /sources/m4/m4/modules/gnu.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- modules/gnu.c       10 Jul 2006 18:54:17 -0000      1.42
+++ modules/gnu.c       10 Jul 2006 19:21:02 -0000      1.43
@@ -172,6 +172,9 @@
   return &buf;
 }
 
+
+/* Wrap up GNU Regex re_search call to work with an m4_pattern_buffer.  */
+
 static int
 m4_regexp_search (m4_pattern_buffer *buf, const char *string,
                  const int size, const int start, const int range)
@@ -183,9 +186,9 @@
 /* Function to perform substitution by regular expressions.  Used by the
    builtins regexp, patsubst and renamesyms.  The changed text is placed on
    the obstack.  The substitution is REPL, with \& substituted by this part
-   of VICTIM matched by the last whole regular expression, taken from
-   REGS[0], and \N substituted by the text matched by the Nth parenthesized
-   sub-expression, taken from REGS[N].  */
+   of VICTIM matched by the last whole regular expression, and \N
+   substituted by the text matched by the Nth parenthesized sub-expression.  */
+
 static void
 substitute (m4 *context, m4_obstack *obs, const char *victim,
            const char *repl, m4_pattern_buffer *buf)
@@ -224,6 +227,10 @@
 }
 
 
+/* For each match against compiled REGEXP (held in BUF -- as returned by
+   m4_regexp_compile) in VICTIM, substitute REPLACE.  Non-matching
+   characters are copied verbatim, and the result copied to the obstack.  */
+
 static bool
 regsub (m4 *context, m4_obstack *obs, const char *caller,
        const char *victim, const char *regexp, m4_pattern_buffer *buf,
@@ -420,6 +427,9 @@
 }
 
 
+/* Same as the sysymd builtin from m4.c module, but expand to the
+   output of SHELL-COMMAND. */
+
 /**
  * esyscmd(SHELL-COMMAND)
  **/




reply via email to

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