summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@gnu.org>1998-04-01 00:36:53 +0000
committerKarl Berry <karl@gnu.org>1998-04-01 00:36:53 +0000
commit9d31f1e1f1ce94d1c14545b1cb07bdda4b6afde5 (patch)
treed09a032a9492a9e529522d5741084f68d631d867
parent2fcce1d3b0b0a5781a63b2ceb2f7729c0623b7ba (diff)
downloadgunmake-9d31f1e1f1ce94d1c14545b1cb07bdda4b6afde5.tar.gz
(\synindex, \syncodeindex): \closeout the redirected index.
From: Jakob Stoklund Olesen <stoklund@mi.aau.dk>
-rw-r--r--texinfo.tex24
1 files changed, 14 insertions, 10 deletions
diff --git a/texinfo.tex b/texinfo.tex
index 56167d6..caeb320 100644
--- a/texinfo.tex
+++ b/texinfo.tex
@@ -2281,20 +2281,24 @@ width0pt\relax} \fi
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
-\def\synindex #1 #2 {%
-\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\doindex {#2}}%
+% The \closeout helps reduce unnecessary open files; the limit on the
+% Acorn RISC OS is a mere 16 files.
+\def\synindex#1 #2 {%
+ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+ \expandafter\closeout\csname#1indfile\endcsname
+ \expandafter\let\csname#1indfile\endcsname=\synindexfoo
+ \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
+ \noexpand\doindex{#2}}%
}
% @syncodeindex foo bar similar, but put all entries made for index foo
% inside @code.
-\def\syncodeindex #1 #2 {%
-\expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
-\expandafter\let\csname#1indfile\endcsname=\synindexfoo
-\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex
-\noexpand\docodeindex {#2}}%
+\def\syncodeindex#1 #2 {%
+ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname
+ \expandafter\closeout\csname#1indfile\endcsname
+ \expandafter\let\csname#1indfile\endcsname=\synindexfoo
+ \expandafter\xdef\csname#1index\endcsname{% define \xxxindex
+ \noexpand\docodeindex{#2}}%
}
% Define \doindex, the driver for all \fooindex macros.