aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitignore
AgeCommit message (Collapse)AuthorFilesLines
2021-06-08get rid of the GObject Builder (GOB2): converted teco-gtk-info-popup.gob and ↵Robin Haberkorn1-2/+0
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-05-30THE GREAT CEEIFICATION EVENTRobin Haberkorn1-5/+4
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.
2017-03-03build system portability fixesRobin Haberkorn1-0/+1
* especially to improve building on FreeBSD 11 * We need GNU Make, yet alone because Scintilla/Scinterm needs it. We now document that dependency and added an Autoconf check from the autoconf-archive. We make sure that the build process is invoked with GNU make by generating only GNUmakefiles. The Makefile.am files have not been renamed, so this change can be rolled back easily. * Some GNU-Make-specific autoreconf warnings have still been resolved. But not all of them, as this would have been unelegant and we need GNU Make anyway. * Declare ACLOCAL_AMFLAGS to appease autoreconf * Added an explicit check for C++11 from the autoconf-archives. In general we should support building with every C++11 compiler that is sufficiently GNU-like. * Do not use `sed` for inplace editing, as different sed-implementations have mutually incompatible syntax for this. Instead of declaring and checking a dependency on GNU sed, we simply use SciTECO for the editing task. This improves code portability on BSDs. * Similarily, BSD/POSIX `cmp` is supported now. This fixes the test suite on BSD without declaring a dependency on the GNU coreutils. * Simplified sciteco-wrapper generation.
2016-11-18updated .gitignoreRobin Haberkorn1-2/+7
2016-11-18improved command line option handlingRobin Haberkorn1-0/+1
* it turns out that option-like arguments could not be reliably passed to SciTECO scripts for two reasons: a) "--" arguments are not removed from argv by GOption if it detects and following option-like argument. "--" would thus be passed as a script argument which will disable option parsing in scripts that interpret "--". b) A script run via the Hash-Bang line "#!...sciteco -m" would require an explicit "--" to turn of GOption parsing. However it is __impossible__ to insert after the script file name on UNIX. * Therefore, SciTECO now removes leading "--" arguments left over by GOption. * If possible (Glib >= 2.44), option parsing is performed in strict POSIX mode which inhibits parsing after the first non-option argument. This reduces the number of cases where an explicit "--" is required. * --mung no longer takes an argument. Instead, the first non-option argument is expected to be the script file name. This looks weird at first but is more consistent with how other interpeters work. Once we revise argument passing to scripts, the script name can also be passed to the script which is more consistent with it being the first non-option argument. Also, with strict POSIX parsing, this fixed Hash-Bang lines since the script file name constructed by the kernel will automatically switch off option parsing, passing all option-like script arguments uninterpreted to the script. * Since we're supporting Glib < 2.44, the Hash-Bang lines are still broken for certain builds. Therefore, a wrapper script is installed to libexecdir (it never has to be executed by users and Hash-Bang lines need absolute paths anyway) which transparently inserts "--" into the SciTECO command line and should be used as the interpreter in portable SciTECO scripts. The wrapper script is generated and points to the exact SciTECO binary installed. This is important when doing parallel installs of Curses and Gtk binaries since each one will get its own working wrapper script. The wrapper-script workaround can be removed once we depend on Glib >= 2.44 (some day...). * The default /usr/bin/env Hash-Bang lines are no longer used in the scripts since they are broken anyway (UNIX incl. Linux cannot pass multiple arguments to the interpreter!). Scripts that get installed will get a fixed-up Hash-Bang line referring to the installed SciTECO binary anyway. * Interface::main() has been renamed to Interface::init() and is optional now. The Interface::main() method was introduced because of the misconception that interfaces will find their options in the argv array and have to do their own parsing. This is wrong, since their option group already cares about parsing. Therefore, gtk_init() does not have to called explicitly, too.
2016-02-16distribution helper script: let it be preprocessed/substituted by AutoconfRobin Haberkorn1-0/+1
* makes sense since it already extracted information from ./configure that is usually substituted. * it already had to be run from a configured build directory * it required the source tree directory, which had to be overwritten on the Make command line when using an out-of-source build dir. This is no longer necessary. * It is still a stand-alone Makefile to keep it isolated from the main build system, although it could certainly be translated to Automake. * the generated file will now be called distribute.mk to signify that it is a Makefile.
2016-02-16finally added Autotest suiteRobin Haberkorn1-5/+17
* Autotest ships with Autoconf, so it's available already and relatively easy to integrate into an Autotools package. * This is attached to `make check` using some Automake magic. * The test suite will only call the built SciTECO for the time being. But using tests/Makefile.am, custom programs could be easily built. * Since it uses the target sciteco, it cannot work in cross-compile environments. * The test suite tests/testsuite.at should be used for regression tests at least: Whenever there is a bug, a test case should be added to testsuite.at. Later this might be split up into multiple includes for regressions other tests.
2014-11-22removed SciTECO-specific ignores from .gitignoreRobin Haberkorn1-5/+0
these should be put by the user in his/her global or repository-specific ignore patterns
2013-03-18declare all global inter-dependant objects in main.cpp and get rid of ↵Robin Haberkorn1-1/+2
init_priority attribute * we cannot use weak symbols in MinGW, so we avoid init_priority for symbol initialization by compiling the empty definitions into sciteco-minimal but the real ones into sciteco (had to add new file symbols-minimal.cpp) * this fixes compilation/linking on LLVM Clang AND Dragonegg since their init_priority attribute is broken! this will likely be fixed in the near future but broken versions will be around for some time
2013-03-16prevent image generation during HTML production, instead generate HTML ↵Robin Haberkorn1-0/+1
tables using htbl.tes preprocessor
2013-03-16added option to build manuals as HTML using GroffRobin Haberkorn1-0/+1
* will be useful for Windows builds since Windows users usally do not have a man-page formatter/reader
2013-03-16first draft of TECO command documentation generatorRobin Haberkorn1-1/+2
* the language reference is a manually written man-page template * containing special references for generated documentation (\#$...) * SciTECO script generate-docs.tes extracts TECO comments (/*$ ... */) from all source files and transforms them to Troff requests that are inserted into the document template. * TECO doc comments are a rather sophisticated markup: * first part until empty line is called header: simplified command syntax descriptions * the rest is called body: <identifier> is automatically underlined, empty lines generate new paragraphs, lines beginning with "-" or numbers denote an indented unordered or numbered list item. * regular Troff requests/macros can be used for more sophisticated markup * since Autoconf substitutions are performed on the generated man-page, @VARIABLEs@ may be used in doc comments as well
2013-02-25integrate Doxygen into build systemRobin Haberkorn1-0/+3
* solely for generating developer docs * disabled by default even if Doxygen is installed * Doxygen comments are not used currently
2013-02-22clean up SciTECO bootstrapping by building convenience libraryRobin Haberkorn1-1/+1
* pkg-config LIBS should be added to $LIBS so that link order is correct
2013-01-27moved manpage to doc/ subdirRobin Haberkorn1-1/+1
later there will be much more documentation
2013-01-27revised lexer configuration using SciTE property files and Textadept's ↵Robin Haberkorn1-4/+5
terminal color definitions * lexer config is now in separate file installed into the package data dir, so it can be excluded from the teco.ini template. * teco.ini is generated so it can load an installed lexer.tes as ED hook (can still be dropped into the user's home and will work immediately)
2013-01-20added manpage highlighting program invocation and batch modeRobin Haberkorn1-0/+1
language and commands will be described in separate documents
2012-12-04first working version of autotools based build-systemRobin Haberkorn1-7/+24
2012-11-23system for looking up static symbolsRobin Haberkorn1-0/+2
* symbols are extracted from C header files by a TECO macro * macro is executed using a "minimal" version of SciTECO that does not include symbols (uses gcc's weak symbols) * the generated C++ code contains the symbol-name-to-define mapping as a constant sorted array and initializes the appropriate SymbolList object * a symbol lookup is super fast using a simple binary search in the symbol lists * except for object initialization, no there's no overhead for keeping the symbol lists! * build process is complicated by introduction of bootstrapping via sciteco-minimal
2012-11-22ignore *.exe filesRobin Haberkorn1-0/+1
2012-11-15adapted Makefile to handle different user interfacesRobin Haberkorn1-0/+1
2012-11-15changed save point file pattern to .teco-xxx-dddRobin Haberkorn1-1/+1
2012-11-15let Git ignore save point filesRobin Haberkorn1-0/+2
2012-11-10filename autocompletion using <CTRL/T> and <TAB>Robin Haberkorn1-0/+3
* <TAB> autocompletion only in specified states * GtkInfoPopup widget to display possible completions, written using Gob2
2012-11-06initial commit of SciTECO based on THECORobin Haberkorn1-0/+4