aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2024-11-24sciteco(7): minor documentation fixRobin Haberkorn1-1/+1
2024-11-24lexer.auto: use case-sensitive searchesRobin Haberkorn1-0/+0
* lexer.checkheader is therefore case-sensitive now as well
2024-11-24added special Q-Register ":" for accessing dotRobin Haberkorn9-15/+76
* We cannot call it "." since that introduces a local register and we don't want to add an unnecessary syntactic exception. * Allows the idiom [: ... ]: to temporarily move around. Also, you can now write ^E\: without having to store dot in a register first. * In the future we might add an ^E register as well for byte offsets. However, there are much fewer useful applications. * Of course, you can now also write nU: instead of nJ, Q: instead of "." and n%: instead of "nC.". However it's all not really useful.
2024-11-24minor documentation changes: use typographic quotes instead of "Robin Haberkorn2-3/+3
2024-11-23string building: ^c (caret+c) does no longer expand to data garbage for ↵Robin Haberkorn1-0/+9
non-control characters, but to the literal caret, followed by c * For instance `^$` would insert two characters. * The alternative would have been to throw an error.
2024-11-23disallow setting the radix to values lower than 2Robin Haberkorn3-8/+34
* This would actually causes crashes when trying to format numbers. * The ^R local register has a custom set_integer() method now, so that the check is performed also when using nU.^X.
2024-11-23the search mode and current radix are mapped to __local__ Q-Registers ^X and ↵Robin Haberkorn12-56/+185
^R now (refs #17) * This way the search mode and radix are local to the current macro frame, unless the macro was invoked with :Mq. If colon-modified, you can reproduce the same effect by calling [.^X 0^X ... ].^X * The radix register is cached in the Q-Reg table as an optimization. This could be done with the other "special" registers as well, but at the cost of larger stack frames. * In order to allow constructs like [.^X typed with upcarets, the Q-Register specification syntax has been extended: ^c is the corresponding control code instead of the register "^".
2024-11-23implemented search mode flag (^X): allow case-sensitive searches (closes #17)Robin Haberkorn5-6/+41
* Usually you will only want -^X for enabling case sensitive searches and 0^X for case-insensitive searches (which is also the default). * An open question is what happens if the user sets -^X and then calls a macro. The search mode flag should probably be stacked away along with the search-string. This means we'd need a ^X special Q-Reg as well, so you can write [^X[_ 0^X S...$ ]_]^X. Alternatively, the search mode flag should be a property of the macro frame, along with the radix.
2024-11-19minor documentation fixesRobin Haberkorn2-3/+5
* also explicitly mention -%q
2024-11-18fixed some common typos: "ie." and "eg.", "ocur" instead of "occur"Robin Haberkorn14-36/+36
2024-11-18Debian/Ubuntu, FreeBSD and website updates for v2.1.1 releaseRobin Haberkorn4-5/+11
2024-11-17updated TODO and ChangeLog for v2.1.1 releasev2.1.1Robin Haberkorn2-1/+62
2024-11-11session.tes: store the current tab style (width and hard-tabs); fixed for ↵Robin Haberkorn2-0/+5
filenames containing ASCII 27 * You can now set a per-file tab style, that differs from the defaults established in the ED hook. This is important especially since we do not yet support per-project .teco_ini scripts where you could establish differing policies depending on the VCS repository. (The latter would be easy to implement, but we cannot currently easily extend the existing ED hooks.) * It's unlikely that files contain an ASCII 27, but not impossible. Therefore we now use ASCII 0 (^@) as a terminator. This indeed be safe under UNIX. Even better would be a string building construct for escaping ASCII 27 ($), though, as that would work with arbitrary bytes.
2024-11-10Win32: fixed Unicode commandlines with newer MinGW runtimesRobin Haberkorn3-5/+18
* should also fix Win32 nightly builds * Even though we weren't using main's argv, but were using glib API for retrieving the command line in UTF-8, newer MinGW runtimes would fail when converting the Unicode command line into the system codepage would be lossy. * Most people seem to compile in a "manifest" to work around this issue. But this requires newer Windows versions and using some Microsoft tool which isn't even in $PATH. Instead, we now link with -municode and define wmain() instead, even though we still ignore argv. wmain() proabably get's the command line in UTF-16 and we'd have to convert it anyway. * See https://github.com/msys2/MINGW-packages/issues/22462
2024-11-10fixed installation with absolute "scitecodatadir" (ie. if building ↵Robin Haberkorn1-2/+2
non-relocatable binary) * This was accidentally installing into $bindir/usr (usually /usr/local/bin/usr/...) You might want to check whether SciTECO accidentally installed something there.
2024-11-10changed target release to v2.1.1Robin Haberkorn1-1/+1
The next release will include almost exclusively bug fixes.
2024-11-10updated grosciteco.tes(1): mention new macros, changed command lines and ↵Robin Haberkorn2-1/+19
restrictions
2024-11-10updated TODORobin Haberkorn2-4/+24
2024-11-10grosciteco: basic support for GNU pic graphicsRobin Haberkorn1-26/+52
* The line drawing algorithm currently works only with tbl, though. * Also only straight lines are currently supported. * This was meant for rendering presentations in SciTECO - it's not currently used or planned to be used in the manpages. Although we might well add pic graphics to the manpages in the future.
2024-11-10grosciteco: support .SCITECO_STARTSTYLING and .SCITECO_SETSTYLING macrosRobin Haberkorn2-1/+21
This could theoretically be used to apply Scintilla styles not natively and easily supported by grosciteco, eg. different fonts and font sizes.
2024-11-10grosciteco: added some more quote glyphsRobin Haberkorn1-0/+2
2024-11-07if a macro ends without finding a goto label, always throw a 'Label "..." ↵Robin Haberkorn1-7/+7
not found' error * This is important with gotos in loops as in <@O/x/> where, we would otherwise get a confusing "Unterminated loop" error. * This in particular fixes the error thrown in grosciteco.tes when encountering a new unknown command.
2024-11-07grosciteco: fixed the CuXXXX postprocessor command, ie. insertion of ↵Robin Haberkorn1-1/+1
characters by unicode, ie. typesetting of most non-latin text * This was broken at least for characters that happened to contain hexadecimal digits > 9 since "D does not detect hexadecimal digits.
2024-11-07grosciteco: fixed styling of multi-byte text (ie. non-latin characters)Robin Haberkorn1-1/+1
* We just passed the length in glyphs to SCI_SETSTYLING.
2024-11-07test suite: fixed failure detection in the commandline-editing test casesRobin Haberkorn3-3/+17
* The program exit code will usually not signal failures since they are caught earlier. * Therefore, we always have to capture and check stderr.
2024-11-06fixed the Q-Reg spec machine used for implementing S^EGq$ (match one of ↵Robin Haberkorn4-21/+33
characters in Q-Register) * It was initialized only once, so it could inherit the wrong local Q-Register table. A test case has been added for this particular bug. * Also, if starting from the profile (batch mode), the state machine could be initialized without undo, which then later cause problems on rubout in interactive mode. For instance, if S^EG[a] fails and you would repeatedly type `]`, the Q-Reg name could grow indefinitely. There were probably other issues as well. Even crashes should have been possible, although I couldn't reproduce them. * Since the state machine is required only for the pattern to regexp translation and is performed anew for every character in interactive mode, we now create a fresh state machine for every call and don't attempt any undo. There might be more efficient ways, like reusing the string building's Q-Reg parser state machine.
2024-11-06fixed possible crashes during --fake-cmdlineRobin Haberkorn2-4/+6
* A test case has been added, although it might have been accidental that on caused crashes.
2024-11-05fixup: fixed Windows buildsRobin Haberkorn1-1/+1
2024-11-05fully support relocatable binaries, improving AppImagesRobin Haberkorn11-64/+153
* You can now specify `--with-scitecodatadir` as a relative path, that will be interpreted relative to the binary's location. * Win32 binaries already were relocatable, but this was a Windows-specific hack. Win32 binaries are now built with `--with-scitecodatadir=.` since everything is in a single directory. * Ubuntu packages are now also built `--with-scitecodatadir=../share/sciteco`. This is not crucial for ordinary installations, but is meant for AppImage creation. * Since AppImages are now built from relocatable packages, we no longer need the unionfs-workaround from pkg2appimage. This should fix the strange root contents when autocompleting in AppImage builds. * This might also fix the appimage.github.io CI issues. I assume that because I could reproduce the issue on FreeBSD's Linuxulator in dependence of pkg2appimage's "union"-setting. See https://github.com/AppImage/appimage.github.io/pull/3402 * Determining the binary location actually turned out be hard and very platform-dependant. There are now implementations for Windows (which could also read argv[0]), Linux and generic UNIX (which works on FreeBSD, but I am not sure about the others). I believe this could also be useful on Mac OS to create app bundles, but this needs to be tested - currently the Mac OS binaries are installed into fixed locations and don't use relocation.
2024-11-04monkey-test.apl: avoid some bogus failures due to insufficient handling of ↵Robin Haberkorn2-6/+6
the pclose() return value
2024-11-03fixed assertions in ^EGq search construct for Q-Registers with uninitialized ↵Robin Haberkorn2-1/+6
string cells Found thanks to the "infinite monkey" test.
2024-11-03Added "infinite monkey"-style test (refs #26)Robin Haberkorn6-0/+129
Supposing that any monkey hitting keys on a typewriter, serving as a hardcopy SciTECO terminal, will sooner or later trigger bugs and crash the application, the new monkey-test.apl script emulates such a monkey. In fact it's a bit more elaborate as the generated macro follows the frequency distribution extracted from the corpus of SciTECO macro files (via monkey-parse.apl). This it is hoped, increases the chance to get into "interesting" parser states. This also adds a new hidden --sandbox argument, but it works only on FreeBSD (via Capsicum) so far. In sandbox mode, we cannot open any file or execute external commands. It is made sure, that SciTECO cannot assert in sandbox mode for scripts that would run without --sandbox, since assertions are the kind of things we would like to detect. SciTECO must be sandboxed during "infinite monkey" tests, so it cannot accidentally do any harm on the system running the tests. All macros in sandbox mode must currently be passed via --eval. Alternatively, we could add a test compilation unit and generate the test data directly in memory via C code. The new scripts are written in GNU APL 1.9 and will probably work only under FreeBSD. These scripts are not meant to be run by everyone.
2024-10-30CI: disabled Valgrind altogetherRobin Haberkorn1-2/+2
* Apparently it's not possible to run it as part of CI.
2024-10-30CI: Valgrind does not work in the Ubuntu runners, so let's try it under Mac OSRobin Haberkorn1-4/+4
2024-10-30fixup: make sure the correct PCs, pointing directly at the command that ↵Robin Haberkorn1-2/+7
failed, get assigned to error frames
2024-10-30fixed invalid memory access when executing the F< command (but only when ↵Robin Haberkorn3-6/+6
jumping to the beginning of the macro) * I am not sure whether this feature is really that useful... * teco_machine_main_t::macro_pc is now pointing to the __next__ character to execute, therefore it's easier to manipulate by flow control commands. Also, it can now be unsigned (gsize) like all other program counters. * Detected thanks to running the testsuite under Valgrind.
2024-10-30testsuite: added --valgrind option for running SciTECO under Valgrind (memcheck)Robin Haberkorn3-3/+10
* Any memory error will let the test case fail with code 66. * You can also call make check TESTSUITEFLAGS="--valgrind" * There is no program test for Valgrind in configure.ac for the time being. `valgrind` must be in $PATH. * All CI testsuite runs under Ubuntu are now with Valgrind.
2024-10-29fixed <N> (search all) crashes before invocations of <S> (closes #26)Robin Haberkorn2-0/+8
* There was some boilerplate code missing in teco_state_search_all_initial(), that is present in teco_state_search_initial(). * Perhaps there should be a common function to avoid redundancies? * This will also fix the initialization of the string argument codepage for <N>.
2024-10-29updated TODORobin Haberkorn1-9/+17
2024-10-29PDCurses: filter out bogus double keypresses in combination with CTRL (refs #20)Robin Haberkorn1-0/+12
* Has been observed on PDCursesMod/WinGUI when pressing CTRL+Shift+6 on an US layout. I would expect code 30 (^^) to be inserted, instead PDCurses reports two keypresses (6^^). The first one is now filtered out since this will not be fixed upstream. See also https://github.com/Bill-Gray/PDCursesMod/issues/323 * Since AltGr on German layouts is reported as CTRL+ALT, we must be careful not to filter those out as well. * This is active on all PDCurses variants - who knows which other platforms will behave similarily. * You still cannot insert code 0 via CTRL+@ since PDCurses doesn't report it, but ncurses does not allow that either. This _could_ be synthesized by evaluating the modifier flags, though.
2024-10-29mingw-bundledlls: blacklist additional DLLsRobin Haberkorn1-2/+3
* I am not entirely sure whether it would be safe to bundle api-ms-win-core-synch-l1-2-0.dll or bcryptprimitives.dll, so I won't upstream this change yet. * Should fix GTK/Win32 nightly builds.
2024-10-29teco_interface_cmdline_update() now protects against batch mode (--fake-cmdline)Robin Haberkorn1-0/+7
* Fixes the test suite on PDcurses/Win32 and therefore CI builds. * Should be necessary on UNIX as well since later on, we would access cmdline_window, which is not yet initialized. I didn't see any errors in Valgrind, though.
2024-10-28Mac OS nightly builds: automatically extract package versionRobin Haberkorn1-1/+2
2024-10-28added hidden --fake-cmdline parameter for testing command-line editingRobin Haberkorn4-5/+29
* Supports all immediate editing commands. Naturally it cannot emulate arbitrary key presses since there is no canonic ASCII-encoding of function keys. Key macros are not consequently also not testable. The --fake-cmdline parameter is instead treated very similar to a key macro expansion. * Most importantly this allows adding test cases for rubout behavior and bugs that are quite common. * Added regression test cases for the last two rubout bugs. * It's not easy to pass control codes in command line arguments in a portable manner, so the test cases will often use { and }. Control codes could be used e.g. by defining variables like RUBOUT=`printf '\b'` and referencing them with ${RUBOUT}.
2024-10-28fixed rubbing out <:Xq>, <:^Uq> and other append-to-register operationsRobin Haberkorn4-31/+29
* This was a regression introduced in 41ab5cf0289dab60ac1ddc97cf9680ee2468ea6c, which changed the semantics of teco_doc_undo_set_string(). * Removed undo_append_string() Q-Reg virtual method. append_string() now does its own undo token emission, so that we can defer the teco_doc_undo_edit() after the point that the document was initialized. This is important, so that we can configure the default encoding on new registers.
2024-10-25hopefully fixed win32-gtk nightly builds: explicitly draw in librsvg and ↵Robin Haberkorn1-4/+4
pixbuf loader file name changed
2024-10-24<EC>: fixed hangs on UNIXRobin Haberkorn1-3/+13
* detected under FreeBSD * It turns out that it's unsafe to make the GIOChannel blocking even though the application has already terminated and the channel should be closed automatically. The channel does not report EOF, but instead we have to look for zero reads - in complete contrast to the behavior on Windows. Apparently, it's very tricky to use this API correctly (ie. it sucks). * fixup to e9bef20a8ad89d304fe3e8fafa00056d22de2326
2024-10-21fixed some interruptions of <EC> on Win32Robin Haberkorn2-6/+30
* We now recreate the event loop with every call since it turned out that the idle watcher wouldn't be invoked after the event loop has been quit once. This at least fixes interruption of ECbash -c 'while true; do true; done'$. * Unfortunately, ECping -t 8.8.8.8$ still cannot be interrupted (unless you manually kill the process from the task manager).
2024-10-21GTK/Win32: include trailing null byte in gtk_selection_data_set_text()Robin Haberkorn1-1/+6
* This API behaves very strangely and differently compared to UNIX/X11. When getting, it returns a trailing null for all clipboard contents (unless the clipboard is empty) and when setting, we apparently have to include it as well. At least since we cut it off when getting. Even more strangely, setting without the trailing null did work when pasting in external apps. (How they know when it's safe to throw away the trailing null is mysterious.) * In other words, this fixes X~G~.
2024-10-21<EC>: fixed insertion of data garbage (invalid reads) and omissionsRobin Haberkorn2-8/+18
* This has only ever observed on Win32, probably because the spawning behaves very differently. * The stdout watcher could be invoked even after removing the source, so we must be secured against it - this was causing some overflows and invalid reads. * Also, teco_eol_reader_convert() could return 0 even after process termination, which would sometimes result in too few bytes being inserted. This could be provoked relatively easily by invoking ECdir$ repeatedly.