[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7394] parsetexi update
From: |
gavinsmith0123 |
Subject: |
[7394] parsetexi update |
Date: |
Tue, 20 Sep 2016 08:22:32 +0000 (UTC) |
Revision: 7394
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7394
Author: gavin
Date: 2016-09-20 08:22:31 +0000 (Tue, 20 Sep 2016)
Log Message:
-----------
parsetexi update
Modified Paths:
--------------
trunk/tp/parsetexi/api.c
trunk/tp/parsetexi/handle_commands.c
Modified: trunk/tp/parsetexi/api.c
===================================================================
--- trunk/tp/parsetexi/api.c 2016-09-19 19:43:53 UTC (rev 7393)
+++ trunk/tp/parsetexi/api.c 2016-09-20 08:22:31 UTC (rev 7394)
@@ -858,37 +858,45 @@
/* These should be unique elements. */
- if (global_info.settitle && global_info.settitle->hv)
- {
- hv_store (hv, "settitle", strlen ("settitle"),
- newRV_inc ((SV *) global_info.settitle->hv), 0);
+#define BUILD_GLOBAL_UNIQ(cmd) \
+ if (global_info.cmd && global_info.cmd->hv) \
+ { \
+ hv_store (hv, #cmd, strlen (#cmd), \
+ newRV_inc ((SV *) global_info.cmd->hv), 0); \
}
- if (global_info.copying && global_info.copying->hv)
- {
- hv_store (hv, "copying", strlen ("copying"),
- newRV_inc ((SV *) global_info.copying->hv), 0);
- }
- if (global_info.shorttitlepage && global_info.shorttitlepage->hv)
- {
- hv_store (hv, "shorttitlepage", strlen ("shorttitlepage"),
- newRV_inc ((SV *) global_info.shorttitlepage->hv), 0);
- }
- if (global_info.title && global_info.title->hv)
- {
- hv_store (hv, "title", strlen ("title"),
- newRV_inc ((SV *) global_info.title->hv), 0);
- }
- if (global_info.titlepage && global_info.titlepage->hv)
- {
- hv_store (hv, "titlepage", strlen ("titlepage"),
- newRV_inc ((SV *) global_info.titlepage->hv), 0);
- }
- if (global_info.top && global_info.top->hv)
- {
- hv_store (hv, "top", strlen ("top"),
- newRV_inc ((SV *) global_info.top->hv), 0);
- }
+ BUILD_GLOBAL_UNIQ(setfilename);
+ BUILD_GLOBAL_UNIQ(settitle);
+ BUILD_GLOBAL_UNIQ(copying);
+ BUILD_GLOBAL_UNIQ(titlepage);
+ BUILD_GLOBAL_UNIQ(top);
+ BUILD_GLOBAL_UNIQ(documentdescription);
+ BUILD_GLOBAL_UNIQ(setcontentsaftertitlepage);
+ BUILD_GLOBAL_UNIQ(setshortcontentsaftertitlepage);
+ BUILD_GLOBAL_UNIQ(novalidate);
+ BUILD_GLOBAL_UNIQ(validatemenus);
+ BUILD_GLOBAL_UNIQ(pagesizes);
+ BUILD_GLOBAL_UNIQ(fonttextsize);
+ BUILD_GLOBAL_UNIQ(footnotestyle);
+ BUILD_GLOBAL_UNIQ(setchapternewpage);
+ BUILD_GLOBAL_UNIQ(everyheading);
+ BUILD_GLOBAL_UNIQ(everyfooting);
+ BUILD_GLOBAL_UNIQ(evenheading);
+ BUILD_GLOBAL_UNIQ(evenfooting);
+ BUILD_GLOBAL_UNIQ(oddheading);
+ BUILD_GLOBAL_UNIQ(oddfooting);
+ BUILD_GLOBAL_UNIQ(everyheadingmarks);
+ BUILD_GLOBAL_UNIQ(everyfootingmarks);
+ BUILD_GLOBAL_UNIQ(evenheadingmarks);
+ BUILD_GLOBAL_UNIQ(oddheadingmarks);
+ BUILD_GLOBAL_UNIQ(evenfootingmarks);
+ BUILD_GLOBAL_UNIQ(oddfootingmarks);
+ BUILD_GLOBAL_UNIQ(shorttitlepage);
+ BUILD_GLOBAL_UNIQ(title);
+#undef BUILD_GLOBAL_UNIQ
+
+ /* NOTE: Same list in handle_commands.c:register_global_command. */
+
/* The following are arrays of elements. */
if (global_info.footnotes.contents.number > 0)
Modified: trunk/tp/parsetexi/handle_commands.c
===================================================================
--- trunk/tp/parsetexi/handle_commands.c 2016-09-19 19:43:53 UTC (rev
7393)
+++ trunk/tp/parsetexi/handle_commands.c 2016-09-20 08:22:31 UTC (rev
7394)
@@ -178,12 +178,14 @@
GLOBAL_UNIQUE_CASE(shorttitlepage);
GLOBAL_UNIQUE_CASE(title);
#undef GLOBAL_UNIQUE_CASE
+ /* NOTE: Same list in api.c:build_global_info2. */
}
if (where)
{
if (*where)
line_warn ("multiple @%s", command_name(cmd));
- *where = current;
+ else
+ *where = current;
}
return 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7394] parsetexi update,
gavinsmith0123 <=