aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2025-08-22bumped Scintilla to v5.5.7Robin Haberkorn1-0/+0
* We can use the new SCI_SCROLLVERTICAL instead of SCI_SETFIRSTVISIBLELINE. * The upgrade will also ease submitting the NetBSD-support patch.
2025-08-21support Groff v1.19.2 as still used by default on NetBSD 10Robin Haberkorn5-7/+15
* They have a newer version in pkgsrc, but it's not even available as a binary package on the arm6. * Has some glitches, e.g. does accept the ASCII 27 in tutorial.ms, but it's probably not worth to work around.
2025-08-21fully support NetBSD with its native libcursesRobin Haberkorn6-8/+56
* It requires a forced refresh on startup (even though that should be the default). Otherwise, it wouldn't print the info line correctly. * Redirect stdin and pass it to newterm() to fix key queuing. Probably necessary for supporting ncurses on NetBSD as well. * Avoid doupdate() if screen is too small: fixes crashes for very small windows. * Updated Scintilla: There were some implicit typing assumptions, that are broken by this platform.
2025-08-19AX_WITH_NCURSES: also check for NCURSEN_VERSIONRobin Haberkorn1-2/+6
If we find libncursesw or libncurses, but without pkg-config and if ncurses does not install its curses.h into the standard search path, we might theoretically pick up another compatible Curses' curses.h. Better guard against this.
2025-08-19curses: fixed configuration for native netbsd-curses and ncurses (several ↵Robin Haberkorn8-637/+342
corner cases) * pkg-config check for `ncurses` fails if it failed previously for `ncursesw`. This is the case e.g. for ncurses from NetBSD's pkgsrc. * No longer assume that any libncurses is not enhanced (X/Open compatible). * SciTECO and Scinterm require to find a curses.h in the include paths. The ncurses check must therefore not be limited to the first best ncurses/ncurses.h and the like. * We now always check for X/Open compatibility and always require a curses.h in the standard directories or as given by pkg-config. * AX_WITH_CURSES was radically rewritten and is now called AX_WITH_NCURSES. * --with-interface=netbsd-curses gets its own detection code. It always requires a curses.h in the standard paths and a libcurses. It should now be fixed for real NetBSD installations if the ncurses port is installed as well. * Unified all of the curses-arguments to CURSES_CFLAGS and CURSES_LIBS. There is no reason we need PDCURSES_CFLAGS, XCURSES_CFLAGS etc.
2025-08-18sciteco(7): clarified SciTECO's policy with regards to TECO-11 and Video ↵Robin Haberkorn1-5/+7
TECO compatibility
2025-08-16updated README, NEWS and TODORobin Haberkorn3-37/+76
Esp. mention the new OBS repositories.
2025-08-16avoid linebreak in AC_CHECK_FUNCS(): might fix openSUSE 15.5 and 15.6 ↵Robin Haberkorn1-2/+1
nightly builds on OBS
2025-08-16UNIX curses: some clarifications on what is done during ↵Robin Haberkorn2-2/+13
teco_interface_init_screen() User messages printed in interative mode aren't currently fully preserved on stdout/stderr since they are redirected to /dev/null. Only messages that are not flushed out will be preserved. Unless you redirect stdout/stderr of SciTECO of course since in this case no redirection is necessary. This is probably tolerable esp. once we support multi-line messages in the UIs. At least it would be tricky to work around.
2025-08-14Debian: explicitly depend on a C compiler as wellRobin Haberkorn1-1/+2
2025-08-14README: mention the RPM-based repositories provided by OBSRobin Haberkorn1-1/+4
* Since OBS has its own VCS, there is no need to add the sciteco.spec to this repository. It's located here: https://build.opensuse.org/projects/home:rhaberkorn:sciteco:STABLE/packages/sciteco/files/sciteco.spec * We will probably provide nightly builds via the UNSTABLE subproject as well. * Perhaps OBS will even be used to build Debian packages, as PPA only works on Ubuntu. Also it has a webinterface for downloading the binary packages, so these could be removed from our nightly CI workflows.
2025-08-14fix up hash-bang lines only of the scripts really installed by the current ↵Robin Haberkorn1-3/+18
`make install` invocation * The previous way of fixing up all `*.tes` scripts had the disadvantage of touching unrelated scripts or grosciteco/tedoc of a previous invocation. E.g. installing a Gtk build after the ncurses build would overwrite all hash-bang lines of the curses-version scripts as well with gsciteco. * This caused problems with the RPM package where both variants were installed into the same buildroot and introduced a dependency from sciteco-curses to sciteco-gtk. This is worked around in sciteco.spec with a manual sed call. * It would be better to get rid of the install-exec-hook altogether as it causes problems with FreeBSD/Poudriere (FIXME).
2025-08-14debian/rules: enable verbose testsuite logRobin Haberkorn1-0/+3
In case there is a failure, there is no way to inspect the testsuite directory - all there will be is a CI or Launchpad runner log, so all information should be in that log. The CI `make check` and RPM spec also sets the --verbose flag.
2025-08-13YAML lexer: default to 2 character soft tabsRobin Haberkorn1-0/+3
Hard tabs would even cause YAML syntax errors.
2025-08-10allow messages to be of arbitrary length: fixes crashesRobin Haberkorn1-8/+3
* Messages can be arbitrarily long, e.g. the following could provoke crashes in interactive mode `1000<@I/X/> HX$` It's hard to turn into a test case, though, as you could always increase the buffer size in teco_interface_msg(). * The message length is now only limited by RAM. * This implementation is less effective, but code opting for efficience, including all programmable user messages, should not rely on the printf-API anyway but use teco_interface_msg_literal().
2025-08-10irc.yml: fetch entire historyRobin Haberkorn1-0/+2
It's necessary to get the log since the last successful commit.
2025-08-09Win32: avoid any automatic LF to CRLF conversions when writing to stdoutRobin Haberkorn2-0/+23
* At least the MSVCRT does this by default, i.e. the translation mode of stdout is not _O_BINARY. * This broke piping through SciTECO with --stdin --stdout, as this relies on SciTECO's builtin EOL normalization. Instead, you would get DOS linebreaks on output even if the source stream contains only UNIX linebreaks. * It would also break binary filters. * It seems to be safe to print only LF also for regular stdio (help and error messages), so I simply disaply the stdout (and stdin and stderr) EOL translation globally. * Also fixes Troff warnings due to the .in preprocessor writing output with DOS linebreaks. * Added a test case. All future platforms shouldn't perform any unexpected EOL translations on output.
2025-08-09fixed date in manpagesRobin Haberkorn1-1/+1
was broken in c5510d68
2025-08-08don't install the standalone scripts from lib/ as actual scripts: should fix ↵Robin Haberkorn4-17/+18
CI and nightlies * They would get the --program-prefix. * If they aren't installed as real scripts, there is no point in fixing up their hash-bang lines. * The hash-bang line fix won't work on Windows anyway, so they are now disabled for grosciteco and tedoc as well.
2025-08-07tecat.tes: optimized by using a binary mask instead of stringRobin Haberkorn1-0/+0
A 32-bit word is enough to carry the information of which control code to echo or not.
2025-08-07added tecat.tes to standard library: can be installed as the Git textconv filterRobin Haberkorn4-2/+15
tecat.tes and repl.tes are now executable scripts, even though they are installed into the $SCITECOPATH. This is still much slower than the Lua version here: https://gist.github.com/rhaberkorn/6534ecf1b05de6216d0a9c33f31ab5f8
2025-08-07fixed the irc.yml workflow: have to export the $GH_TOKENRobin Haberkorn1-0/+2
maybe, perhaps...
2025-08-06irc.yml: retrieve the commit hash of the *previous* successful CI runRobin Haberkorn1-9/+3
2025-08-06IRC workflow: removed excess ` and "Robin Haberkorn1-5/+10
Hopefully fixes the workflow.
2025-08-06IRC workflow: use rectalogic/notify-ircRobin Haberkorn1-8/+13
Perhaps it will work with irc.libera.chat.
2025-08-06command-line arguments are no longer passed via the unnamed buffer, but via ↵Robin Haberkorn14-140/+171
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.
2025-08-03simplified the htbl.tes preprocessor and the SUBST_MACRO using new --quiet, ↵Robin Haberkorn4-21/+15
--stdin and --stdout options * htbl.tes now reads from stdin and writes to stdout. Allows avoiding temporary `*.htbl` files * grosciteco.tes still cannot be simplified since --stdin cannot be combined with passing command-line arguments (FIXME).
2025-08-03testsuite: use --quiet and test output of stdio commands more thoroughlyRobin Haberkorn1-27/+46
* All test suite commands are now invoked with --quiet. When having to check the stdout of the test runs, you now longer have to filter "Info:" lines out or include them in the expout. * Use expout to compare the outputs of the stdio commands instead of just counting the number of output lines. * The <EO> command check is simplified by doing the arithmetics in SciTECO. * test the --stdin and --stdout options as well
2025-08-03added --quiet, --stdin and --stdout for easier integration into UNIX pipelinesRobin Haberkorn7-9/+171
* In principle --stdin and --stdout could have been done in pure TECO code using the <^T> command. Having built-in command-line arguments however has several advantages: * Significantly faster than reading byte-wise with ^T. * Performs EOL normalization unless specifying --8bit of course. * Significantly shortens command-lines. `sciteco -qio` and `sciteco -qi` can be real replacements for sed and awk. * You can even place SciTECO into the middle of a pipeline while editing interactively: foo | sciteco -qio --no-profile | bar Unfortunately, this will not currently work when munging the profile as command-line parameters are also transmitted via the unnamed buffer. This should be changed to use special Q-registers (FIXME). * --quiet can help to improve the test suite (TODO). Should probably be the default in TE_CHECK(). * --stdin and --stdout allow to simplify many SciTECO scripts, avoiding temporary files, especially for womenpage generation (TODO). * For processing potentially infinite streams, you will still have to read using ^T.
2025-08-03require isatty() on UNIXRobin Haberkorn1-1/+2
Has always been required, but was missing in configure.ac.
2025-08-02fixed serious bug with certain alternative string termination chars in ↵Robin Haberkorn8-40/+70
commands with multiple string arguments * When `@`-modifying a command with several string arguments and choosing `{` as the alternative string termination character, the parser would get totally confused. Any sequence of `{` would be ignored and only the first non-`{` would become the termination character. Consequently you also couldn't choose a new terminator after the closing `}`. So even a documented code example from sciteco(7) wouldn't work. The same was true when using $ (escape) or ^A as the alternative termination character. * We can now correctly parse e.g. `@FR{foo}{bar}` or `@FR$foo$bar$` (even though the latter one is quite pointless). * has probably been broken forever (has been broken even before v2.0). * Whitespace is now ignored in front of alternative termination characters as in TECO-64, so we can also write `@S /foo/` or even ``` @^Um { !* blabla *! } ``` I wanted to disallow whitespace termination characters, so the alternative would have been to throw an error. The new implementation at least adds some functionality. * Avoid redundancies when parsing no-op characters via teco_is_noop(). I assume that this is inlined and drawn into any jump-table what would be generated for the switch-statement in teco_state_start_input(). * Alternative termination characters are still case-folded, even if they are Unicode glyphs, so `@IЖfooж` would work and insert `foo`. This should perhaps be restricted to ANSI characters?
2025-08-01fixed the test suite on Mac OSRobin Haberkorn1-1/+1
`echo -n` is not POSIX and obviously not supported on Mac OS' standard shell.
2025-08-01implemented the ^W command for refreshing the screen in loops, for sleeping ↵Robin Haberkorn7-25/+107
and also the CTRL+L immediate editing command * ^W can be added to loops in order to view progress in interactive mode. It also sleeps for a given number of milliseconds (10ms by default). * In batch mode it is therefore the sleep command. * Since CTRL+W is an immediate editing command, you will usually type it Caret+W. ASCII 23 however will also be accepted. * While ^W only updates the screen, you can force a complete redraw by pressing CTRL+L. This is what most terminal applications use for redrawing. It will make it harder to insert ASCII 12, but this is seldom necessary since it is a form feed. ^L (ASCII 12 and the upcaret variant ) is still a whitespace character and therefore treated as a NOP. * DEC TECO had CTRL+W as the refresh immediate editing command. Video TECO uses <ET> as a regular command for refreshign in loops. I'd rather keep ET reserved as a potential terminal configuration command as in DEC TECO, though.
2025-07-31added -v/--version and <EO> commandRobin Haberkorn5-0/+42
* DEC TECO had an <EO> command. In contrast to DEC TECO's implementation, the value reported by <EO> encodes a major.minor.micro semantic version.
2025-07-31implemented ^H command for returning the current time since midnight: ↵Robin Haberkorn2-15/+31
partially replaces ^B * :^H and ::^H now return the timestamps, while ^B only returns the date. * Pressing CTRL+H will rubout, so you will usually write it in upcaret mode.
2025-07-31repl.tes: added script that reproduces the classic TECO REPL command-lineRobin Haberkorn3-0/+58
* Unfortunately, this will currently just terminate when some command fails. We require an error catching mechanism to fix this up.
2025-07-31implemented ^T command: allows typing by code and getting characters from ↵Robin Haberkorn11-8/+308
stdin or the user * n:^T always prints bytes (cf. :^A) * ^T without arguments returns a codepoint or byte from stdin. In interactive mode, this currentply places a cursor in the message line and waits for a keypress.
2025-07-28`ED&2` can be used to access the program termination flag nowRobin Haberkorn5-14/+17
* `0,2ED` is roughly equivalent to `-EX` * `ED&2` can be used to query whether EX has been run. This is useful if macros can run EX. * `2,0ED` could be used to cancel the effect of EX. * But the real motivation is for implementing a REPL script.
2025-07-28=/==/===: fixed detection of execution from the end of the command-lineRobin Haberkorn3-14/+31
In particular, fixes the test case `3<255=>` which would print only one number in interactive mode.
2025-07-27fixed using the command-line replacement register (ESC) in batch mode: was ↵Robin Haberkorn2-2/+10
causing assertions when entering interactive mode Also added a regression test case.
2025-07-27fixed a,b,c^Uq...$: The arguments where written in the wrong (reverse) orderRobin Haberkorn2-13/+20
* When writing UTF-8, we must first peek in reverse order since we can only write from left to right. * When writing in raw ANSI, we can immediately pop the values from the stack but must write in reverse.
2025-07-26properly document some functions in expressions.c and simplified codeRobin Haberkorn10-93/+81
* Practically all calls to teco_expressions_args() must be preceded by teco_expressions_eval(). * In code paths where we know that teco_expressions_args() > 0, it is safe to call teco_expressions_pop_num(0) instead of teco_expressions_pop_num_calc(). This is both easier and faster. * teco_expressions_pop_num_calc() is for simple applications where you just want to get a command argument with default (implied) values. Since it includes teco_expressions_eval(), we can avoid superfluous calls. * -EC...$ turned out to be broken and is fixed now. A test case has been added.
2025-07-26implemented the <T> (typeout) command for printing to the terminal from the ↵Robin Haberkorn6-32/+117
current buffer * refactored some code that is common with Xq into teco_get_range_args().
2025-07-26support <:^A> to force raw ANSI outputRobin Haberkorn2-4/+16
* ^A uses the default code page without colon, just like ^U/EU. This is usually UTF8, unless you run with --8bit. It would make just as little sense to inherit the codepage from the current document. * Ensures that code like `:^A^E<0xFF>^A` really outputs byte 0xFF. * DEC TECO doesn't have the colon modifier, but it has a colon modifier for ^T to enforce raw output. In SciTECO, the ^T vs. :^T distinction will also be between default codepage and ANSI. It makes sense because ^T should treat its numeric arguments like <I> for consistency.
2025-07-26implemented <:Gq> for printing the Q-Register string as a message instead of ↵Robin Haberkorn3-2/+25
inserting it
2025-07-26use teco_interface_msg_literal() where we're printing raw stringsRobin Haberkorn1-1/+1
* There are some calls of teco_interface_msg() with constant strings, but these are not convenient to convert as the teco_interface_msg_literal() does not yet support -1 for the string length.
2025-07-26support :=/:==/:=== commands: print number without trailing linefeedRobin Haberkorn4-21/+35
2025-07-26implemented the <^A> command for printing arbitrary stringsRobin Haberkorn11-67/+115
* Greatly improved usability as a scripting language. * The command is in DEC TECO, but in contrast to DEC TECO, we also support string building constructs in ^A. * Required some refactoring: As we want it to write everything verbatim to stdout, the per-interface method is now teco_interface_msg_literal() and it has to deal with unprintable characters. When displaying in the UI, we use teco_curses_format_str() and TecoGtkLabel functions/widgets to deal with possible control codes. * Numbers printed with `=` have to be written with a trailing linefeed, which would also be visible as a reverse "LF" in the UI. Not sure whether this is acceptable - the alternative would be to strip the strings before displaying them. * Messages written to stdout are also auto-flushed at the moment. In the future we might want to put flushing under control of the language. Perhaps :^A could inhibit the flushing.
2025-07-23ncurses: support the window title on XTerm-like emulatorsRobin Haberkorn2-27/+47
* Many terminal emulators won't have the status-line terminfo capabilities but still support OSC-0 escape sequences for setting the window title. This affects the real XTerm, rxvt-based and many emulators that claim to be XTerm via $TERM (e.g. GNOME Console). * It seems we can safely assume that any emulator with $TERM beginning with "xterm" or "rxvt" does in fact have OSC-0 or at least ignores it. The number of whitelisted emulators might be extended later on. This way, we don't have to add another ED flag. * We still give precendence to the to_status_line/from_status_line capabilities if they are in terminfo.
2025-07-23if EX falis because of a dirty buffer, the buffer's id is now included in ↵Robin Haberkorn3-8/+13
the error message