[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/src/Attic/builtin.c,v [branch-1_4]
From: |
Eric Blake |
Subject: |
Changes to m4/src/Attic/builtin.c,v [branch-1_4] |
Date: |
Fri, 04 Aug 2006 13:19:45 +0000 |
CVSROOT: /sources/m4
Module name: m4
Branch: branch-1_4
Changes by: Eric Blake <ericb> 06/08/04 13:19:41
Index: src/builtin.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/builtin.c,v
retrieving revision 1.1.1.1.2.30
retrieving revision 1.1.1.1.2.31
diff -u -b -r1.1.1.1.2.30 -r1.1.1.1.2.31
--- src/builtin.c 30 Jul 2006 23:46:51 -0000 1.1.1.1.2.30
+++ src/builtin.c 4 Aug 2006 13:19:41 -0000 1.1.1.1.2.31
@@ -43,6 +43,7 @@
DECLARE (m4___file__);
DECLARE (m4___line__);
+DECLARE (m4___program__);
DECLARE (m4_builtin);
DECLARE (m4_changecom);
DECLARE (m4_changequote);
@@ -97,6 +98,7 @@
{ "__file__", TRUE, FALSE, FALSE, m4___file__ },
{ "__line__", TRUE, FALSE, FALSE, m4___line__ },
+ { "__program__", TRUE, FALSE, FALSE, m4___program__ },
{ "builtin", TRUE, FALSE, TRUE, m4_builtin },
{ "changecom", FALSE, FALSE, FALSE, m4_changecom },
{ "changequote", FALSE, FALSE, FALSE, m4_changequote },
@@ -1192,8 +1194,8 @@
include (argc, argv, TRUE);
}
-/* More miscellaneous builtins -- "maketemp", "errprint", "__file__" and
- "__line__". The last two are GNU specific. */
+/* More miscellaneous builtins -- "maketemp", "errprint", "__file__",
+ "__line__", and "__program__". The last three are GNU specific. */
/*------------------------------------------------------------------.
| Use the first argument as at template for a temporary file name. |
@@ -1247,6 +1249,16 @@
shipout_int (obs, current_line);
}
+static void
+m4___program__ (struct obstack *obs, int argc, token_data **argv)
+{
+ if (bad_argc (argv[0], argc, 1, 1))
+ return;
+ obstack_grow (obs, lquote.string, lquote.length);
+ obstack_grow (obs, program_name, strlen (program_name));
+ obstack_grow (obs, rquote.string, rquote.length);
+}
+
/* This section contains various macros for exiting, saving input until
EOF is seen, and tracing macro calls. That is: "m4exit", "m4wrap",
"traceon" and "traceoff". */
- Changes to m4/src/Attic/builtin.c,v [branch-1_4],
Eric Blake <=
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/15
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/16
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/17
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/18
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/18
- Changes to m4/src/Attic/builtin.c,v [branch-1_4], Eric Blake, 2006/08/24