aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/tedoc.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-06 16:46:37 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-06 16:46:37 +0300
commit280cb9da39fc7b5357f6071926d511394f6d0152 (patch)
treecdca852694fd3e4cc9293c374d16ac69d9be01ea /doc/tedoc.tes
parentc5510d684e4879ab9a5295b4a1981888a4268627 (diff)
downloadsciteco-280cb9da39fc7b5357f6071926d511394f6d0152.tar.gz
command-line arguments are no longer passed via the unnamed buffer, but via special Q-registers ^Ax
* The unnamed buffer is also used for reading from --stdin, so you couldn't practically combine --stdin with passing command-line arguments to macros. * The old approach of passing command-line arguments via lines in the unnamed buffer was flawed anyway as it wouldn't work with filenames containing LF. This is just a very ancient feature, written when there weren't even long Q-reg names in SciTECO. * You can now e.g. pipe into SciTECO and edit what was read interactively, e.g. `dmesg | sciteco -i`. You can practically use SciTECO as a pager. * htbl.tes is now a command-line filter (uses -qio). * grosciteco.tes reads Troff intermediate code from stdin, so we no longer need "*.intermediate" temporary files. * added a getopt.tes test case to the testsuite. * This change unfortunately breaks most macros accepting command-line arguments, even if they used getopt.tes. It also requires updating ~/.teco_ini - see fallback.teco_ini.
Diffstat (limited to 'doc/tedoc.tes')
-rwxr-xr-xdoc/tedoc.tes27
1 files changed, 13 insertions, 14 deletions
diff --git a/doc/tedoc.tes b/doc/tedoc.tes
index 885f41a..cc4f726 100755
--- a/doc/tedoc.tes
+++ b/doc/tedoc.tes
@@ -8,7 +8,7 @@
@[format_header]{
FD--S .,(:L"S.|Z')@Xa I^J
- EBQ#tm
+ EBN[\#tm]
I\# GENERATED FROM Q.#sc (\.#sc):^J
I.SS  Ga -A-10"N I^J '
:Q.[topics]">
@@ -45,7 +45,7 @@
J <FR^J^J^J;>
J 0A-10"=D'
ZJ -A-10"=-D'
- EBQ#tm
+ EBN[\#tm]
G.[header]
I^J.^J
}
@@ -73,35 +73,34 @@
J <S<MC>; -D I^J -S< -D I^J.I >
J <FRS^J^J;>
J <FR^JS^J;>
- EBN#tm
+ EBN[\#tm]
G.c I^J.^J.^J
}
!* process command-line options *!
-[optstring]C M[getopt]"F (0/0) '
+[optstring]C
+M[getopt]U#ou Q#ou"< Invalid command-line^J 1 '
:Q[getopt.C]"<
[comment.start]!* [comment.end]*!
|
[comment.start]/* [comment.end]*/
'
-LR 0X#ou
-2LR 0X#tm EBN#tm EB L
-[.f
- <:L;R 0X.f EBQ.f EB L>
-].f
--EF
+Q#ou+1U#tm Q#tmU.i <:Q[\.i]:; EBN[\.i] %.i>
+
+!* switch to the main troff template (#tm) *!
+EB EF
I\#
-\# AUTOGENERATED FROM Q#tm
+\# AUTOGENERATED FROM Q[\#tm]
\# DO NOT EDIT MANUALLY!!!
\#^J
!* find insertion point *!
-:FS^J.TEDOC^J^J"F(0/0)'
+:FS^J.TEDOC^J^J"F Missing .TEDOC call^J 1 '
EJ-1<
<
- 2U* [*]#sc
+ 2U* [*].#sc
!* extract comment *!
SQ[comment.start]$;
@@ -127,5 +126,5 @@ EJ-1<
EF
>
-2EL EWQ#ou
+2EL EWQ[\#ou]
EX