From 280cb9da39fc7b5357f6071926d511394f6d0152 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 6 Aug 2025 16:46:37 +0300 Subject: 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. --- doc/grosciteco.tes | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'doc/grosciteco.tes') diff --git a/doc/grosciteco.tes b/doc/grosciteco.tes index cbe0e61..a724a5f 100755 --- a/doc/grosciteco.tes +++ b/doc/grosciteco.tes @@ -1,16 +1,18 @@ -#!/usr/local/bin/sciteco -m -!* grosciteco.tes [-t ] [--] *! +#!/usr/local/bin/sciteco -mi +!* grosciteco.tes [-t ] [--] ]* L F< !cmd.xXsciteco_startstyling! - [* EB 0:M[move] U[stylestart] ]* + [* EBN[output-woman] 0:M[move] U[stylestart] ]* L F< !cmd.xXsciteco_setstyling! C :M#giU.s - [* EB 0:M[move] + [* EBN[output-woman] 0:M[move] Q[stylestart]ESSTARTSTYLING Q.s,(-Q[stylestart])ESSETSTYLING ]* L F< !cmd.xXsciteco_foldlevel! C :M#giU.[foldlevel] - [* EB 0:M[move] + [* EBN[output-woman] 0:M[move] Q.[foldlevel],(ESLINEFROMPOSITION)ESSETLINESTATE ]* L F< @@ -274,7 +276,7 @@ EBN[input] !cmd.t! :M#sw .(:M#sa).X.w - [* EB :Q.w:M[move] + [* EBN[output-woman] :Q.w:M[move] G.w :Q.w:M[style] ]* :Q.w%[pos.h] :M#sc F< @@ -285,17 +287,17 @@ EBN[input] | .(:M#sa).X.w 0Q[glyphs.Q.w]U.w ' - [* EB 1:M[move] + [* EBN[output-woman] 1:M[move] Q.wI 1:M[style] ]* :M#sc F< !cmd.c! :M#sw 0AU.w C - [* EB 1:M[move] + [* EBN[output-woman] 1:M[move] G[glyphs.U.w] 1:M[style] ]* :M#sc F< !cmd.N! :M#sw :M#giU.w - [* EB 1:M[move] + [* EBN[output-woman] 1:M[move] Q.wI 1:M[style] ]* :M#sc F< !cmd.n! @@ -336,7 +338,7 @@ Q*U* * TODO: The size can still be improved by using SCI_SETSTYLINGEX * if appropriate. *! -EB 0EE !* operate in single-byte mode *! +EBN[output-woman] 0EE !* operate in single-byte mode *! J 0U#cs 0U#cd < .ESGETSTYLEATUs Qs"< Qs= ' @@ -375,7 +377,7 @@ Q[cur.fl]"N !* * Save the clear-text part of the document into *! -2EL EWQ[output-woman] +2EL EW EQ[styles] -- cgit v1.2.3