aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2021-10-08prevent deprecation warnings in Glib >= v2.70Robin Haberkorn1-3/+14
2021-10-08Gtk: fixed message bar's background colorRobin Haberkorn1-7/+7
* Was only broken on Gtk+ 3.24 for Windows with the builtin theme engine. * The warning level was also not themed correctly because of a typo.
2021-10-08fixed hiding savepoint files on Win32Robin Haberkorn1-1/+2
* This was an ancient bug apparently broken since d503c3b07c2157658f699294c44ad5be244727a5 (year 2014) and was therefore broken even in v0.6.4.
2021-10-08PDCurses support: automatically detect PDC_WIDERobin Haberkorn1-1/+6
* PDC_WIDE must be defined before including curses.h if the library is also built against PDC_WIDE. * Fixes building against PDCursesMod during Nightly Builds, ie. fixes the current Win32 curses builds. * The same problem exists for PDC_RGB. It cannot currently be autodetected, so you must currently manually include PDCURSES_CFLAGS="-DPDC_RGB" if you built your PDCurses with PDC_RGB. The same will be true for PDC_NCMOUSE once we support mouses. You best leave these settings in their defaults (disabled) if you have control over the PDCurses build.
2021-10-08CI: enabled the win32-curses test caseRobin Haberkorn1-48/+48
* The testsuite now works on my Windows 2008 Server installation, so hopefully it will also work on the build servers.
2021-10-08nightly builds: fixed the win32-curses buildRobin Haberkorn1-1/+1
* We have to list all Win32 DLLs in LIBGLIB_LIBS since we currently link it in statically.
2021-10-08Testsuite: standardized the use of square brackets in test case code and ↵Robin Haberkorn1-9/+11
test escaping of braces in Q-Register specifications
2021-10-08Fixed testsuite on Mac OS: `echo -n` is apparently not supported on whatever ↵Robin Haberkorn1-4/+7
$SHELL they execute the testsuite in * instead, we now use `dd`.
2021-10-08revised icon loading on Windows and packaging againRobin Haberkorn5-45/+76
* We don't need the PNG icons on Windows as the compiled-in ICO should suffice * Ship the dependencies of the SVG pixbuf loader. * The PNG pixbuf loader is still distributed, as we at least need it for loading the icon theme. * Install a loaders.cache - without it, the pixbuf loaders won't be found. This file can be generated by gdk-pixbuf-query-loaders but apparently has to be modified by hand. * Regenerate the icon cache using gtk-update-icon-cache. * Icon themes are found now. Unfortunately, we have to distribute the entire Adwaita icon theme as distributing only the scalable (SVG) icons does not work for some strange reason (FIXME).
2021-06-08updated TODO: added some new Windows-specific tasksRobin Haberkorn1-6/+7
2021-06-08Gtk UI: fixed lookup of icons and fallback.css on WindowsRobin Haberkorn1-33/+39
* Since we don't have an absolute and known installation directory, we should look for these files in the same directory as sciteco.exe. * For the time being, we look for them in $SCITECOCONFIG which defaults to that directory. * Cannot be a final solution as you may tweak $SCITECOCONFIG to fit an Unix-like environment (eg. set SCITECOCONFIG=$HOME). In such configurations it may also not be suitable to always look in the directory of sciteco.exe since that may be some /bin dir. Considering that GTK+ forces us to preserve some kind of UNIX-like directory hierarchy even for portable builds, we should perhaps install the icons into the hicolor icon theme. This would also simplify Debian packaging.
2021-06-08improved PDCurses detectionRobin Haberkorn6-72/+43
* follow the current terminology: * PDCurses/Win32a is now called PDCursesMod and includes all other PDCurses ports as well. The Win32 GUI port is now called PDCurses/WinGUI. * PDCurses/Win32 is now called PDCurses/WinCon. * Since PDCursesMod supports WinCon as well, we use the PDCURSES_MOD macro only to detect PDCursesMod API extensions. GUIs (detached from system console) might be available both in classic PDCurses as well as in PDCursesMod. Only PDCursesMod allows detection of the port used *at runtime* using PDC_get_version(). We therefore introduced a --with-interface=pdcurses-gui that must be given whenever compiling for any kind of GUI port (including SDL on "classic" PDCurses). * The PDCURSES macro is used to detect all PDCurses (whether classic or PDCursesMod) API extensions. * __PDCURSES__ is used to detect PDCurses whenever API extensions are not required. * Assume that A_UNDERLINE now works even on WinCon.
2021-06-08all SciTECO scripts used during the build process now always write files ↵Robin Haberkorn5-18/+18
with Unix linebreaks * when hosted on Windows, the default is DOS linebreaks * Unix linebreaks are in many cases more consistent as all other sources use Unix linebreaks * woman pages with Unix linebreaks are slightly faster to load due to EOL conversion * especially Groff input must not contain CR as it will otherwise log lots of warnings (affects htbl.tes and tedoc.tes).
2021-06-08added nightly builds for GTK+ 3 on Win32 (currently broken)Robin Haberkorn2-15/+99
* turns out that we need icon themes and pixbuf loaders as well * GTK assumes an UNIX like hierarchy, so we package sciteco.exe and all DLLs into a bin/ subdir. * The SciTECO icons probably shouldn't be in bin/. If we installed them into the hicolor icon theme, GTK might pick them up automatically. This would work under Windows and UNIX. * The GTK builds are still broken. I do really need a real system (MSYS installation) to play around.
2021-06-08get rid of the GObject Builder (GOB2): converted teco-gtk-info-popup.gob and ↵Robin Haberkorn16-783/+817
teco-gtk-label.gob to plain C * Using modern GObject idioms and macros greatly reduces the necessary boilerplate code. * The plain C versions of our GObject classes are now "final" (cannot be derived) This means we can hide the instance structures from the headers and avoid using explicit private fields. * Avoids some deprecation warnings when building the Gtk UI. * GOB2 is apparently no longer maintained, so this seems like a good idea in the long run. * The most important reason however is that there is no precompiled GOB2 for Windows which prevents compilation on native Windows hosts, eg. during nightly builds. This is even more important as Gtk+3 is distributed on Windows practically exclusively via MSYS. (ArchLinux contains MinGW gtk3 packages as well, so cross-compiling from ArchLinux would have been an alternative.)
2021-06-08added nightly builds for Windows 32-bit PDCursesRobin Haberkorn1-0/+73
* These builds generally work, but function keys appear to be broken. This does not happen when building with the latest PDCursesMod on my machine. * <EC> appears to be broken. * We try to link everything statically since MSYS provides actually working static libglib builds. Unfortunately, their gspawn helper executables are still linked normally, so we have to pull in most DLLs anyway. Considering that GTK cannot be linked statically, we should perhaps simply link the Curses builds dynamically as well.
2021-06-08try G_SPAWN_LEAVE_DESCRIPTORS_OPEN when spawning processes: promises an ↵Robin Haberkorn1-1/+6
"optimized" code-path on UNIX
2021-06-08added test suite cases for memory limiting and command executionRobin Haberkorn3-3/+17
* Turned out to be useful in debugging the "Memory limiting during spawning" test case on Windows. * Use UNIX shell emulation (0,128ED) in all test cases. Should be necessary in order to run the testsuite on Windows, but it is currently broken anyway. * avoid <EG> when preprocessing files - use GNU Make's $(shell) instead * Fixes builds on MinGW where there are still problems with <EC> and <EG> at least in the virtual build environment. * Results in a another automake warning about non-POSIX Make constructs. This is not critical since we depend on GNU Make anyway.
2021-06-08Windows: normalize $COMSPECRobin Haberkorn4-7/+25
* Environment variables are case insensitive on Windows while SciTECO variables are case sensitive. We must therefore make sure that we first unset any $COMSPEC or $ComSpec from the environment before resetting it, thereby fixing its case. * Fixes command execution via <EC> on systems where the variable was not called $ComSpec.
2021-06-08added a CI job for Windows 32-bit (currently disabled)Robin Haberkorn1-0/+49
* The testsuite still fails and I cannot fix it without a Windows system or VM at hand. * Problems are probably related to <EC> (spawning). * Simply disabling the test suite would not make much sense as we already try building using nightly.yml.
2021-06-05teco_memory_check() now checks for addition overflows and negative searches ↵Robin Haberkorn2-1/+18
(<S>) for multiplication overflows * Since the numbers come from "outside" (SciTECO scripts) this is easily possible, resulting either in missed checks or even memory corruption. * In particular, this fixes the "Searching with large counts" test case on 32-bit builds. Perhaps at least one CI build should be 32-bit?
2021-06-05README: added link to the new Mac OS wiki page and mention Chocolatey package.Robin Haberkorn1-3/+4
2021-06-05don't add -rdynamic when not replacing mallocRobin Haberkorn1-1/+4
* this flag could negatively affect optimizations * fixes builds on MinGW
2021-06-05testsuite: fixed the "Known Bugs" cases on Mac OSRobin Haberkorn2-2/+5
* there is no /bin/true * We cannot crash SciTECO using unlimited recursion, at least not before the memory limit is reached. Therefore, this test case is expected to succeed on Mac OS.
2021-06-05when not replacing malloc with dlmalloc (--disable-malloc-replacement), ↵Robin Haberkorn3-4/+7
don't build an empty libdlmalloc * on some platforms (eg. Darwin/mac OS) we cannot apparently build empty convenience libraries * instead, we use conditional subdirectories and a conditional library dependency
2021-06-05use memory polling (--disable-malloc-replacement) on Mac OS XRobin Haberkorn3-16/+21
* I could not get malloc replacement via dlmalloc to work. This does not work like on Linux by overwriting weak malloc() functions. It should theoretically be possible to overwrite the default malloc zone but I could not properly debug this since I can only build for Mac OS via CI. * memory polling seems to work though - test suite runs through and it includes memory limiting test cases.
2021-06-04guard against too low arguments to <S> by checking whether the memory limit ↵Robin Haberkorn6-15/+29
would be exceeded * Checking whether the allocation succeeded may not prevent exceeding the memory limit excessively. * Even if the memory limit is not exceeded, the allocation can fail theoretically and the program would terminate abnormally. This however is true for all allocations in SciTECO (via glib). * teco_memory_check() therefore now supports checking whether an allocation would exceed the memory limit which will be useful before very large or variable allocations in addition to the regular checking in teco_machine_main_step(). * As a sideeffect, this fixes the "Searching with large counts" test case on Mac OS where too large allocations were not detected as expected (apparently Mac OS happily gives out ridiculously large chunks of memory). Now, all platforms are guaranteed to have the same behaviour.
2021-06-03ci.yml: run the test suite in verbose mode - we've got nothing but the ↵Robin Haberkorn1-2/+6
Github logs when it fails
2021-06-02avoid aliased functions, as they are not supported on Darwin (macOS)Robin Haberkorn1-1/+5
NOTE: Aliases and weak symbols must not be used for portability reasons!
2021-06-02CI Github workflow: turns out we need to manually install autotools on macOS ↵Robin Haberkorn1-1/+1
after all * the tools installed by default seem to lack aclocal...
2021-06-02Github workflows: some macOS simplifications and build nightly packages with ↵Robin Haberkorn2-8/+8
meaningful artifact names * Try to use as much of the "native" (Xcode?) tools on macOS as possible. We can still fall back to Homebrew if we have to.
2021-06-02renamed scintilla.[ch] to symbols.[ch]: fixes builds on case-insensitive ↵Robin Haberkorn6-5/+5
file systems * There is a "Scintilla.h" as well. * should fix macOS and builds on native Windows hosts * It wasn't practical to refer to the Scintilla includes using paths since the Scintilla location is configurable (--with-scintilla). So we'd have to write something like #include <include/Scintilla.h>. For Scinterm we cannot avoid collisions neither as its path is also configurable (--with-scinterm). Effectively, we must prevent name clashes across SciTECO and all of Scintilla and Scinterm.
2021-06-01ci.yml: try to build on macOSRobin Haberkorn1-1/+35
2021-06-01nightly.yml: allow nightly builds to be triggered manuallyRobin Haberkorn1-0/+1
2021-06-01Continuous Integration artifacts are now built only once a day (nightly ↵Robin Haberkorn3-53/+62
builds) and include Gtk+ versions * The CI tests are unchanged. The workflow file has been renamed to ci.yml, though. * Nightly builds are described by nightly.yml and are built at 4:13. * Nightly Ubuntu package builds now include the Gtk+ 3 packages.
2021-06-01debianized the Gtk UI (sciteco-gtk)Robin Haberkorn9-16/+125
* Added a Freedesktop file - only as part of the debian package yet. `make install` won't install a Desktop file since it would have to be generated. * Just like when installing manually, you can have a Curses and Gtk installation side by side using the same .teco_ini. * Common data between the Curses UI (sciteco-curses) and Gtk UI are in a new architecture-independant package sciteco-common. * The Gtk+ binaries are prefixed with `g` (gsciteco, gtedoc.tes, ggrosciteco.tes). * Debian source and binary packages can be built using `./distribute.mk debian` as usual. It should also be possible to push everything to the PPA for the next release, although that is not yet tested.
2021-05-30cosmetic changes to continuous-integration.yml and mention availability of ↵Robin Haberkorn2-10/+16
nightly builds in README
2021-05-30continuous-integration.yml: start xvfb with automatic server number ↵Robin Haberkorn1-4/+4
assignment to fix "Xvfb failed to start" (hopefully)
2021-05-30continuous-integration.yml: fixed building Gtk versionsRobin Haberkorn1-5/+9
* We need some kind of XServer to run sciteco during the build process and for the test suite, so we have to run everything via xvfb-run.
2021-05-30continuous-integration.yml: update repos before installing new packagesRobin Haberkorn1-0/+2
This will hopefully fix downloading libgtk-3-dev.
2021-05-30continuous-integration.yml: also build and test the Gtk UI on every platform ↵Robin Haberkorn1-2/+5
and compiler
2021-05-30fixed Clang buildsRobin Haberkorn2-1/+6
`-fno-optimize-strlen` is not supported on Clang and there is no way to ignore unknown arguments.
2021-05-30continuous-integration.yml: build on Ubuntu 18.04, Ubuntu 20.04 with GCC and ↵Robin Haberkorn1-24/+61
Clang and package for both versions of Ubuntu * Testing is done only in the "build-and-test" job. * Packages are built by the debian-packages job since there is no need building them with Clang.
2021-05-30continuous-integration.yml: added debhelper dependencyRobin Haberkorn1-1/+1
2021-05-30updated continuous-integration.yml: now also builds and archives Debian packagesRobin Haberkorn1-6/+32
2021-05-30updated Debian packageRobin Haberkorn2-1/+7
* required a new changelog entry since the target release is now v2.0.0 * Glib dependency bumped
2021-05-30continuous-integration.yml: fixed "apt-get install" and show badge in READMERobin Haberkorn2-3/+6
2021-05-30updated Doxyfile.in with Doxygen 1.8.17Robin Haberkorn1-77/+186
* There are currently build errors with the message "fatal: ambiguous argument 'graph_legend.dox': unknown revision or path not in the working tree." But it does not seem to affect the overall result and "make devdoc" does not fail.
2021-05-30Added support for Continuous IntegrationRobin Haberkorn1-0/+34
Will be extended for Continuous Deployment and using all sorts of build environments.
2021-05-30THE GREAT CEEIFICATION EVENTRobin Haberkorn117-23605/+27099
This is a total conversion of SciTECO to plain C (GNU C11). The chance was taken to improve a lot of internal datastructures, fix fundamental bugs and lay the foundations of future features. The GTK user interface is now in an useable state! All changes have been squashed together. The language itself has almost not changed at all, except for: * Detection of string terminators (usually Escape) now takes the string building characters into account. A string is only terminated outside of string building characters. In other words, you can now for instance write I^EQ[Hello$world]$ This removes one of the last bits of shellisms which is out of place in SciTECO where no tokenization/lexing is performed. Consequently, the current termination character can also be escaped using ^Q/^R. This is used by auto completions to make sure that strings are inserted verbatim and without unwanted sideeffects. * All strings can now safely contain null-characters (see also: 8-bit cleanliness). The null-character itself (^@) is not (yet) a valid SciTECO command, though. An incomplete list of changes: * We got rid of the BSD headers for RB trees and lists/queues. The problem with them was that they used a form of metaprogramming only to gain a bit of type safety. It also resulted in less readble code. This was a C++ desease. The new code avoids metaprogramming only to gain type safety. The BSD tree.h has been replaced by rb3ptr by Jens Stimpfle (https://github.com/jstimpfle/rb3ptr). This implementation is also more memory efficient than BSD's. The BSD list.h and queue.h has been replaced with a custom src/list.h. * Fixed crashes, performance issues and compatibility issues with the Gtk 3 User Interface. It is now more or less ready for general use. The GDK lock is no longer used to avoid using deprecated functions. On the downside, the new implementation (driving the Gtk event loop stepwise) is even slower than the old one. A few glitches remain (see TODO), but it is hoped that they will be resolved by the Scintilla update which will be performed soon. * A lot of program units have been split up, so they are shorter and easier to maintain: core-commands.c, qreg-commands.c, goto-commands.c, file-utils.h. * Parser states are simply structs of callbacks now. They still use a kind of polymorphy using a preprocessor trick. TECO_DEFINE_STATE() takes an initializer list that will be merged with the default list of field initializers. To "subclass" states, you can simply define new macros that add initializers to existing macros. * Parsers no longer have a "transitions" table but the input_cb() may use switch-case statements. There are also teco_machine_main_transition_t now which can be used to implement simple transitions. Additionally, you can specify functions to execute during transitions. This largely avoids long switch-case-statements. * Parsers are embeddable/reusable now, at least in parse-only mode. This does not currently bring any advantages but may later be used to write a Scintilla lexer for TECO syntax highlighting. Once parsers are fully embeddable, it will also be possible to run TECO macros in a kind of coroutine which would allow them to process string arguments in real time. * undo.[ch] still uses metaprogramming extensively but via the C preprocessor of course. On the downside, most undo token generators must be initiated explicitly (theoretically we could have used embedded functions / trampolines to instantiate automatically but this has turned out to be dangereous). There is a TECO_DEFINE_UNDO_CALL() to generate closures for arbitrary functions now (ie. to call an arbitrary function at undo-time). This simplified a lot of code and is much shorter than manually pushing undo tokens in many cases. * Instead of the ridiculous C++ Curiously Recurring Template Pattern to achieve static polymorphy for user interface implementations, we now simply declare all functions to implement in interface.h and link in the implementations. This is possible since we no longer hace to define interface subclasses (all state is static variables in the interface's *.c files). * Headers are now significantly shorter than in C++ since we can often hide more of our "class" implementations. * Memory counting is based on dlmalloc for most platforms now. Unfortunately, there is no malloc implementation that provides an efficient constant-time memory counter that is guaranteed to decrease when freeing memory. But since we use a defined malloc implementation now, malloc_usable_size() can be used safely for tracking memory use. malloc() replacement is very tricky on Windows, so we use a poll thread on Windows. This can also be enabled on other supported platforms using --disable-malloc-replacement. All in all, I'm still not pleased with the state of memory limiting. It is a mess. * Error handling uses GError now. This has the advantage that the GError codes can be reused once we support error catching in the SciTECO language. * Added a few more test suite cases. * Haiku is no longer supported as builds are instable and I did not manage to debug them - quite possibly Haiku bugs were responsible. * Glib v2.44 or later are now required. The GTK UI requires Gtk+ v3.12 or later now. The GtkFlowBox fallback and sciteco-wrapper workaround are no longer required. * We now extensively use the GCC/Clang-specific g_auto feature (automatic deallocations when leaving the current code block). * Updated copyright to 2021. SciTECO has been in continuous development, even though there have been no commits since 2018. * Since these changes are so significant, the target release has been set to v2.0. It is planned that beginning with v3.0, the language will be kept stable.