|
29 | 29 | \catcode`\{=1
|
30 | 30 | \catcode`\}=2
|
31 | 31 | \def\filename{docstrip.dtx}
|
32 |
| -\def\fileversion{v2.6b} |
33 |
| -\def\filedate{2022-09-03} |
34 |
| -\def\docdate {2024-02-08} |
| 32 | +\def\fileversion{v2.6c} |
| 33 | +\def\filedate{2024-12-23} |
| 34 | +\def\docdate {2024-12-23} |
35 | 35 | %%
|
36 | 36 | %
|
37 | 37 | %\iffalse
|
|
3027 | 3027 | % defining preamble for the current file.
|
3028 | 3028 | % \begin{macrocode}
|
3029 | 3029 | \def\@fileX#1#2{%
|
| 3030 | +% \end{macrocode} |
| 3031 | +% If the csname used for the stream has already been defined, e.g., |
| 3032 | +% as a preamble or postamble or for some other purposes, chances are |
| 3033 | +% that turning it into a stream number will break something. We |
| 3034 | +% therefore generate an error and show the current definition. |
| 3035 | +% \changes{v2.6c}{2024-12-23}{Check that stream macro is not already |
| 3036 | +% used (gh/1150)} |
| 3037 | +% \begin{macrocode} |
| 3038 | + \ifx#1\relax \else |
| 3039 | + \errmessage{Command \string#1 for denoting the output \noexpand |
| 3040 | + \file stream already defined!^^J |
| 3041 | + \space Current meaning is:^^J^^J\meaning#1^^J^^J |
| 3042 | + \space Extraction will probably fail - check result}% |
| 3043 | + \fi |
3030 | 3044 | \chardef#1=\stream@closed
|
3031 | 3045 | \def\curout{#1}%
|
| 3046 | +% \end{macrocode} |
| 3047 | +% If it matches the name of the current preamble or postamble then |
| 3048 | +% it definitely can't work, so we call that out explicitly: |
| 3049 | +% \begin{macrocode} |
| 3050 | + \ifx\curout\currentpreamble |
| 3051 | + \errmessage{Declared preamble name \string#1 not allowed if |
| 3052 | + \string\file{\@stripstring#1} is used}% |
| 3053 | + \fi |
| 3054 | + \ifx\curout\currentpostamble |
| 3055 | + \errmessage{Declared postamble name \string#1 not allowed if |
| 3056 | + \string\file{\@stripstring#1} is used}% |
| 3057 | + \fi |
| 3058 | +% \end{macrocode} |
| 3059 | +% |
| 3060 | +% \begin{macrocode} |
3032 | 3061 | \let\curinfiles\empty
|
3033 | 3062 | \let\curinnames\empty
|
3034 | 3063 | \def\curref{\MetaPrefix ^^J%
|
|
0 commit comments