aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2024-09-09symbols-extract.tes works in 8-bit mode now (refs #5)Robin Haberkorn1-2/+2
* significantly speeds up build time * Scintilla and Lexilla headers and symbols are all-ASCII anyway. * We should probably have a look at the quicksort implementation in string.tes, as it can probably be optimized in UTF-8 documents as well.
2024-08-23fully support out of tree buildsRobin Haberkorn1-3/+2
* You no longer have to copy contrib/scintilla, contrib/scinterm and contrib/lexilla manually to the build directory. * It turns out, that Scintilla/Lexilla was supporting this since 2016. Scintilla allows pointing to a source directory (srdir) and Lexilla to a binary directory (DIR_O). * For Scinterm I opened a pull request in order to add srcdir/basedir variables: https://github.com/orbitalquark/scinterm/pull/21 * `make distcheck` is therefore now also fixed. * The FreeBSD package is now allowed to build out of source. I haven't tested it yet. * See also https://github.com/ScintillaOrg/lexilla/issues/266
2023-06-19distribute sciteco.desktopRobin Haberkorn1-2/+2
* Useful for packaging on platforms where we can only build from tarballs (FreeBSD) * I don't know whether it's always safe and correct to install this file into $DATADIR/applications, so the file is only distributed but not installed yet. * It contains a hardcoded binary name "gsciteco". This could actually differ depending on the concrete --program-prefix and it would be good to include the exact installation path. This however is not possible as long as we do not install this file.
2023-04-14allow disabling Lexilla (Lexer) support by specifying --without-lexillaRobin Haberkorn1-3/+8
* This does not make sense for most SciTECO builds, but only when you want to optimize for size as the lexers take up 50% of the compressed binary size. Without Lexilla, it should be possible get it compiled in about 500kb. * It can be useful for instance when building for embedded distributions. * When Lexilla is disabled, symbols-scilexer.c is also not generated (we assume that the Lexilla sources are not available and it also doesn't serve any purpose). * Consequently, most of the lexer configuration scripts are also not installed under --without-lexilla.
2021-10-24removed -rdynamic linker flag: should speed up release/nightly builds and ↵Robin Haberkorn1-6/+0
decrease the binary size significantly * -rdynamic was added to make sure that malloc replacement functions were exported and visible to shared libraries. It was more or less currently only used on Linux and Haiku as Win32 and Mac OS do not override malloc. * The option however exported all symbols which would prevent them to be removed at link-time. Other optimizations could also be affected, perhaps resulting in less inlining. * On Haiku, -rdynamic is not supported and cause build failures. * It has been tested (nm -D ./sciteco | grep ' T ') that malloc() and friends are exported even when linking with -O3. Even the __attribute__((used)) has been shown to be superfluous, but we keep it anyway just to be sure.
2021-10-11upgraded to Scintilla 5.1.3 and Scinterm 3.1Robin Haberkorn1-4/+5
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches). All of the patches are now either irrelevant or have been merged upstream. * Since Scintilla 5 requires C++17, this increases the minimum GCC version at least to 5.0. We may actually require even newer versions. * I could not upgrade the scintilla-mirror (which was imported from Mercurial), so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0, master was deleted and I reimported the entire Scintilla repo using git-remote-hg. This means that scintilla-mirror now contains two entirely separate trees. But it is still possible to clone old SciTECO repos. * The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed. Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced), we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3). This branch is never rebased or deleted. Therefore, we are guaranteed to be able to clone arbitrary SciTECO repo commits - not only releases. Releases no longer have to be tagged in scintilla-mirror. On the downside, fixup commits may accumulate in these new branches. They can only be squashed once a new branch for a new Scintilla release is created (e.g. by cherry-picking followed by rebase). * Scinterm does no longer have to reside in the Scintilla subdirectory, so we added it as a regular submodule. There are no more recursive submodules. The Scinterm build system has not been improved at all, but we use a trick based on VPATH to build Scinterm in scintilla/bin/. * Scinterm is now in Git and we reference the upstream repo for the time being. We might mirror it and apply the same branching workflow as with Scintilla if necessary. The scinterm-mirror repository still exists but has not been touched. We will also have to rewrite its master branch as it was a non-reproducible Mercurial import. * Scinterm now also comes with patches for Scintilla which we simply applied on our sciteco-rel-5-1-3 branch. * Scintilla 5 outsourced its lexers into the Lexilla project. We added it as yet another submodule. * All submodules have been moved into contrib/. * The Scintilla API for setting lexers has consequently changed. We now have to call SCI_SETILEXER(0, CreateLexer(name)). As I did not want to introduce a separate command for setting lexers, <ES> has been extended to allow setting lexers by name with the SCI_SETILEXER message which effectively replaces SCI_SETLEXERLANGUAGE. * The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used in the SciTECO standard library anyway - and have consequently been removed from symbols-scilexer.c. The style macros from SciLexer.h (SCE_...) are theoretically still useful - even though they are not used by our current color schemes - and have therefore been retained. They can be specified as wParam in <ES>. * <ES> no longer allows symbolic constants for lParam. This never made any sense since all supported symbols were always wParam. * Scinterm supports new native cursor modes. They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER caret style is configured by default. It makes no sense to enable native cursor modes now since the command line should have a native cursor but is not yet a Scintilla view. * The Scintilla upgrade performed much worse than before, so some optimizations will be necessary.
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-05when not replacing malloc with dlmalloc (--disable-malloc-replacement), ↵Robin Haberkorn1-1/+3
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-02renamed scintilla.[ch] to symbols.[ch]: fixes builds on case-insensitive ↵Robin Haberkorn1-1/+1
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-05-30THE GREAT CEEIFICATION EVENTRobin Haberkorn1-48/+52
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-04-30removed CLANG and HAVE_SIZED_DEALLOCATION conditionalsRobin Haberkorn1-6/+0
Automakefiles could be simplified by updating CXXFLAGS in configure.ac instead.
2017-03-08yet another revision of memory limiting: the glibc mallinfo() approach has ↵Robin Haberkorn1-0/+3
been shown to be unacceptably broken, so the fallback implementation has been improved * mallinfo() is not only broken on 64-bit systems but slows things down linearilly to the memory size of the process. E.g. after 500000<%A>, SciTECO will act sluggish! Shutting down afterwards can take minutes... mallinfo() was thus finally discarded as a memory measurement technique. * Evaluating /proc/self/statm? has also been evaluated and discarded because doing this frequently is even slower. * Instead, the fallback implementation has been drastically improved: * If possible use C++14 global sized deallocators, allowing memory measurements across the entire C++ code base with minimal runtime overhead. Since we only depend on C++11, a lengthy Autoconf check had to be introduced. * Use malloc_usable_size() with global non-sized deallocators to measure the approx. memory usage of the entire process (at least the ones done via C++). The cheaper C++11 sized deallocators implemented via SciTECO::Object still have precedence, so this affects Scintilla code only. * With both improvements the test case sciteco -e '<@EU[X^E\a]"^E\a"%a>' is handled sufficiently well now on glibc and performance is much better now. * The jemalloc-specific technique has been removed since it no longer brings any benefits compared to the improved fallback technique. Even the case of using malloc_usable_size() in strict C++ mode is up to 3 times faster. * The new fallback implementation might actually be good enough for Windows as well if some MSVCRT-specific support is added, like using _msize() instead of malloc_usable_size(). This must be tested and benchmarked, so we keep the Windows-specific implementation for the time being.
2017-03-03build system portability fixesRobin Haberkorn1-6/+3
* 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-20fixed glib warnings about using g_mem_set_vtable() and revised memory limitingRobin Haberkorn1-0/+1
* we were basing the glib allocators on throwing std::bad_alloc just like the C++ operators. However, this always was unsafe since we were throwing exceptions across plain-C frames (Glib). Also, the memory vtable has been deprecated in Glib, resulting in ugly warnings. * Instead, we now let the C++ new/delete operators work like Glib by basing them on g_malloc/g_slice. This means they will assert and the application will terminate abnormally in case of OOM. OOMs cannot be handled properly anyway, so it is more important to have a good memory limiting mechanism. * Memory limiting has been completely revised. Instead of approximating undo stack sizes using virtual methods (which is unprecise and comes with a performance penalty), we now use a common base class SciTECO::Object to count the memory required by all objects allocated within SciTECO. This is less precise than using global replacement new/deletes which would allow us to control allocations in all C++ code including Scintilla, but they are only supported as of C++14 (GCC 5) and adding compile-time checks would be cumbersome. In any case, we're missing Glib allocations (esp. strings). * As a platform-specific extension, on Linux/glibc we use mallinfo() to count the exact memory usage of the process. On Windows, we use GetProcessMemoryInfo() -- the latter implementation is currently UNTESTED. * We use g_malloc() for new/delete operators when there is malloc_trim() since g_slice does not free heap chunks properly (probably does its own mmap()ing), rendering malloc_trim() ineffective. We've also benchmarked g_slice on Linux/glib (malloc_trim() shouldn't be available elsewhere) and found that it brings no significant performance benefit. On all other platforms, we use g_slice since it is assumed that it at least does not hurt. The new g_slice based allocators should be tested on MSVCRT since I assume that they bring a significant performance benefit on Windows. * Memory limiting does now work in batch mode as well and is still enabled by default. * The old UndoTokenWithSize CRTP hack could be removed. UndoStack operations should be a bit faster now. But on the other hand, there will be an overhead due to repeated memory limit checking on every processed character.
2016-11-18standard lib: added getopt.tes for parsing command line options in scriptsRobin Haberkorn1-4/+6
* this uses an optstring compatible with getopt(3). * It does not use repeated getopt calls to iterate options, though but places the results in registers beginning with "getopt.". E.g. option "C" will result in "getopt.C" being set after the call to setopt. String arguments are supported and are placed in the string part of the getopt registers. * The grosciteco.tes and symbols-extract.tes scripts make use of getopt now, to simplify and clean up their command line handling.
2016-11-18improved command line option handlingRobin Haberkorn1-2/+19
* 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-11-18implemented self-documenting (online) help systemRobin Haberkorn1-4/+5
* the new "?" (help) command can be used to look up help topics. * help topics are index from $SCITECOPATH/women/*.woman.tec files. * looking up a help topic opens the corresponding "womanpage" and jumps to the position of the topic (it acts like an anchor into the document). * styling is performed by *.woman.tec files. * Setting up the Scintilla view and munging the *.tec file is performed by the new "woman.tes" lexer. On supporting UIs (Gtk), womanpages are shown in a variable-width font. * Woman pages are usually not hand-written, but generated from manpages. A special Groff post-processor grosciteco has been introduced for this purpose. It is much like grotty, but can output SciTECO macros for styling the document (ie. the *.woman.tec files). It is documented in its own man-page. * grosciteco also introduces sciteco.tmac - special Troff macros for controlling the formatting of the document in SciTECO. It also defines .SCITECO_TOPIC which can be used to mark up help topics/terms in Troff markup. * Woman pages are generated/formatted by grosciteco at compile-time, so they will work on platforms without Groff (ie. as on windows). * Groff has been added as a hard compile-time requirement. * The sciteco(1) and sciteco(7) man pages have been augmented with help topic anchors.
2016-08-19Integrated clipboard supportRobin Haberkorn1-0/+1
* mapped to different registers beginning with "~" * on supported platforms accessing the clipboard is as easy as X~ or G~. Naturally this also allows clipboards to be pasted in string arguments/insertions (^EQ~). * Currently, Gtk+, PDCurses and ncurses/XTerm are supported. For XTerm clipboard support, users must set 0,256ED to enable it since we cannot check for XTerm window ops programmatically (at least without libX11). * When clipboard regs exist, the clipboard can also be deemed functional. This allows macros to fall back to xclip(1) if necessary. * EOL handling has been moved into a new file eol.c and eol.h. EOL translation no longer depends on GIOChannels but can be memory-backed as well.
2016-02-10avoid unnecessary undo token allocations in batch mode: greatly speeds up ↵Robin Haberkorn1-1/+1
batch mode * by using variadic templates, UndoStack::push() is now responsible for allocating undo tokens. This is avoided in batch mode. * The old UndoStack::push(UndoToken *) method has been made private to avoid confusion around UndoStack's API. The old UndoStack::push() no longer needs to handle !undo.enabled, but at least asserts on it. * C++11 support is now required, so variadic templates can be used. This could have also been done using manual undo.enabled checks; or using multiple versions of the template with different numbers of template arguments. The latter could be done if we one day have to support a non-C++11 compiler. However since we're depending on GCC 4.4, variadic template use should be OK. Clang supports it since v2.9. * Sometimes, undo token pushing passed ownership of some memory to the undo token. The old behaviour was relied on to reclaim the memory even in batch mode -- the undo token was always deleted. To avoid leaks or repeated manual undo.enabled checking, another method UndoStack::push_own() had to be introduced that makes sure that an undo token is always created. In batch mode (!undo.enabled), this will however create the object on the stack which is much cheaper than using `new`. * Having to know which kind of undo token is to be pushed (taking ownership or not) is inconvenient. It may be better to add static methods to the UndoToken classes that can take care of reclaiming memory. * Benchmarking certain SciTECO scripts have shown 50% (!!!) speed increases at the highest possible optimization level (-O3 -mtune=native -march=native).
2016-01-31interfaces have their own automake subdirectories and convenience libraries nowRobin Haberkorn1-57/+36
* use libtool convenience libraries as much as possible (for all static libraries except Scintilla) * improves separation of language and user interface implementations (e.g. the Gtk widgets are not interesting for the rest of SciTECO) * the Curses popup widget can now be factored out of interface-curses.cpp * some common CPPFLAGS are now defined by ./configure via AM_CPPFLAGS, so they don't have to be repeated in each submodule. * fixed building the Curses UI: GTK_FLOW_BOX_FALLBACK conditional must always be defined.
2016-01-31updated to Gtk+ 3 and revamped the Gtk interface's popup widgetRobin Haberkorn1-2/+5
* depend on Gtk+ 3.10. If necessary older versions should also be supportable. GtkOverlay was already introduced in v3.2 * A fallback for GtkFlowBox is compiled in if the Gtk installation is too old. This applies even to Ubuntu 14.04 which still runs Gtk v3.10. * the threading the Gtk UI is left as it is for the time being even though the synchronization mechanism has been deprecated. Alternative approaches have to be tried out and benchmarked. * Completely revamped the GtkInfoPopup widget. It is now as powerful as the Curses UI's popup widget. * A GtkOverlay is used instead of the top-level window hack in the Gtk2 version. * GtkFlowBox is used to lay out the columns of the popup. * I had to work around restrictions of GtkScrolledWindow by writing my own poor-mans scrolled window which handles size requests correctly. * The popup window no longer overflows the screen size, instead we scroll. * Scrolling pagewise is finally supported. Wraps at the end of a list just like the Curses UI. * Instead of using only two stock icons, we now use GIO to get file and directory icons for the current theme. This looks even better. * The GtkFlowBox allows selections which can be used for mouse interaction later. But this is not yet implemented. * Theming of the popup widget and command line is still not performed correctly.
2015-06-23install PNG icon and use it to set GTK's window iconRobin Haberkorn1-1/+5
* it is installed into the package's data dir. It is always installed, even for Curses builds. This means when packaging for Debian, the icon could be part of the "sciteco-common" package. If there will ever be more GTK-specific files that need to be installed, this will probably change and the icon will be installed for GTK builds only and become part of the "sciteco-gtk" Debian package. * if the icon could not be loaded, we fail silently. * will not work with windows builds. On Windows, we should just use the icon resource linked into the binary rather than loading the image from file.
2015-03-10added SciTECO icon and compile it into Windows binariesRobin Haberkorn1-0/+8
* sciteco.ico contains a 16 color 16px, a 255 color 32px and a true color 48px version of the icon. The first ones are good for legacy Windows versions like 2000, while the latter one should be preferred by Windows >= 7. * Also added the 48px version as a PNG for Linux. But it is not installed currently, as there is no standardized place for it and it wouldn't do much good in /usr/share/sciteco.
2015-03-10added ./configure --enable-static-executables optionRobin Haberkorn1-0/+5
* This adds the -all-static libtool option and can be used to link a static sciteco binary (or at least link in as few as possible dynamic libraries) * Esp. useful on MinGW to link in all dependant libraries (glib, libintl, libiconv, libpdcurses, ...) statically. A static .exe is much smaller than a dynamically linked plus all the DLLs and is easier to relocate. * This does not guarantee that ALL libraries are linked in dynamically. E.g. on MinGW, the sciteco.exe will still link to MSVCRT and the Windows system DLLs, but they already ship with Windows. * On MinGW, even a static build will still require the gspawn-win32-helper-console.exe which is used by glib to implement g_spawn with redirection. We cannot get around that. * It would be better to let this be decided by the package builder using the standard env variables like LDFLAGS. However, this does not seem to work well with libtool. It IS possible to define LDFLAGS="-all-static" when calling make but this approach sucks.
2015-03-01moved String helper functions from sciteco.h and main.cpp to ↵Robin Haberkorn1-0/+1
string-utils.cpp and string-utils.h * also improved performance of String::append() by using g_realloc() * added String::append() variant for non-null-terminated strings
2014-11-24introduced $SCITECOCONFIG env variable, and set different default for ↵Robin Haberkorn1-1/+1
$SCITECOPATH on Windows * $SCITECOCONFIG has been introduced, so have a macro-accessible location for the profile, buffer session etc. This is set to the program dir on Windows. That way, the config files will be found, regardless of the current working dir, but it may also be set up for Unix-like environments on Windows. * $SCITECOPATH defaults to the program dir + "/lib" now on Windows. * The default profile is now always called ".teco_ini". Also on Windows. Platform differences like this would need to be documented. * The sample teco.ini has been renamed to "sample.teco_ini" for clarity
2014-11-24factored out file loading and saving into the View specialisation IOViewRobin Haberkorn1-0/+1
this will allow us to use the same algorithms for loading and saving Q-Registers (from/to file). * Saving with EW when a Q-Reg is edited has been fixed (was broken earlier) * SciTECO save point files are now named .teco-X-BASENAME When using IOView for Q-Regs, there will be no way to sensible count the save points. Each write of a Q-Reg may be to another file. Therefore, we number save-points globally. If the sequence of writes has to be reconstructed manually, one can still look at the save point files' modification dates * give more informative error messages when saving a file fails
2014-11-22added globbing command ENRobin Haberkorn1-0/+1
* implements the same globbing as the EB command already did * uses Globber helper class that behaves more like UNIX glob(). glib only has a glob-style pattern matcher. * The Globber class may be extended later to provide more UNIX-like globbing. * lexer.tes has been updated to make use of globbing. Now, lexers can be automatically loaded and registered at startup. To install a new lexer, it's sufficient to copy a file to the lexers/ directory.
2014-11-17renamed the "NCurses" UI to "Curses" internallyRobin Haberkorn1-2/+2
* does not change ./configure parameters You still have to specifiy --with-interface=ncurses for the Curses interface with default settings * the "NCurses" UI was used for many different Curses variants, so plain "Curses" is a better name.
2014-11-16first working version of the one-view-per-buffer designRobin Haberkorn1-1/+1
The user interface provides a Scintilla view abstraction and every buffer is based on a view. All Q-Register strings use a single dedicated view to save memory and initialization time when using many string registers. * this means we can finally implement a working lexer configuration and it only has to be done once when the buffer is first added to the ring. It is unnecessary to magically restore the lexer styles upon rubout of EB (very hard to implement anyway). It is also not necessary to rerun the lexer configuration macro upon rubout which would be hard to reconcile with SciTECO's basic design since every side-effect should be attached to a character. * this means that opening buffers is slightly slower now because of the view initialization * on the other hand, macros with many string q-reg operations are faster now, since the document must no longer be changed on the buffer's view and restored later on. * also now we can make a difference between editing a document in a view and changing the current view, which reduces UI calls * the Document class has been retained as an abstraction about Scintilla documents, used by QRegister Strings. It had to be made virtual, so the view on which the document is created can be specified by a virtual function. There is no additional space overhead for Documents.
2014-11-11refactored SciTECO runtime errors: moved from parser.cpp to error.cppRobin Haberkorn1-0/+1
* the GError expection has been renamed to GlibError, to avoid nameclashes when working from the SciTECO namespace
2014-11-09implemented EC command (execute operating system command) in spawn.cppRobin Haberkorn1-0/+1
powerful command for filtering a SciTECO buffer through an external program. It will be described in the sciteco(7) man pages. The implementation uses an asynchronous background process with pipes but is platform independant thanks to glib's g_spawn functions, GIOChannels and event loops. There are however platform differences in how the operating system command is interpreted/parsed.
2014-10-07Merge branch 'master' of https://github.com/rhaberkorn/scitecoRobin Haberkorn1-0/+1
2014-08-22automatically build Scintilla as part of SciTECO's build system:Robin Haberkorn1-0/+1
this should simplify building SciTECO for new users * compiler and archiver are passed down from Autoconf, so cross-compiling should work transparently * `make clean` will also clean the Scintilla source tree * there is no longer any need for "source bundles" as tar balls also contain Scintilla/Scinterm now * building from Git is not much more difficult than building from a tar ball * The versions of Scintilla/Scinterm embedded as submodules already contain all the patches necessary (currently none are necessary), so there's no need to have patch files in the repository * INSTALL instructions have been rewritten * the --with-scintilla and --with-scinterm site-config options have been kept. But they should be rarely necessary now.
2014-04-25added generated symbols (symbols-*.cpp) to CLEANFILESRobin Haberkorn1-1/+2
this was broken in #de616e362ccd56aae8b26a08d9520ab9132a060f
2014-02-15added EMCurses/Emscripten supportRobin Haberkorn1-1/+2
by building with Emscripten support, SciTECO may be embedded into web pages. * sciteco.html is not a piece of documentation but a sample SciTECO embedding
2013-07-09fixed compilation of the GTK+ interfaceRobin Haberkorn1-1/+1
* there was a compile-time race condition that could result in the GObjects not being built (with Gob2). So I removed the symbols generation from BUILT_SOURCES. * apparently either Scintilla depends on gmodule since I last tested or the gtk+-2.0 pkg-config package no longer includes gmodule, so we must explicitly depend on it
2013-03-18add check for CLang: use clang-specific warnings only when compiling with CLangRobin Haberkorn1-1/+5
* fixes gcc-4.4 which does not have -Wno-mismatched-tags and no -Wunknown-warning
2013-03-18declare all global inter-dependant objects in main.cpp and get rid of ↵Robin Haberkorn1-3/+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-18disable some bogus warnings for LLVM/ClangRobin Haberkorn1-1/+1
* -Wmismatched-tags does not appear to exist on GCC: but we need to be able to refer to classes with both struct and class keywords because of the BSD data types * -Wchar-subscripts exists on GCC and may or may not be in -Wall. We disable it since we use character literals as subscripts - they are actually of type char in C++, in contrast to C where they are of type int.
2013-02-22added --with-default-scitecopath config option: default value of $SCITECOPATHRobin Haberkorn1-1/+1
useful for Windows where the desired default path does not correspond with the installation dir of the std lib macros
2013-02-22VPATH build fixes: SciTECO can now be built from a parallel source treeRobin Haberkorn1-8/+11
...which is useful when crosscompiling for MinGW
2013-02-22clean up QRegister vs. Buffer redundancies using TECODocument classRobin Haberkorn1-0/+1
* also encapsulates data properly (previously there were many public attributes to avoid permission issues) * new class also cares about saving/and restoring scroll state. now, buffer/q-reg edits and temporary accesses do not reset the scroll state anymore.
2013-02-22clean up SciTECO bootstrapping by building convenience libraryRobin Haberkorn1-23/+29
* pkg-config LIBS should be added to $LIBS so that link order is correct
2013-02-15install standard macros into special standard library path (pkgdatadir/lib)Robin Haberkorn1-1/+1
* SCITECOPATH environment variable defaults to this directory * manpage updated * default teco.ini updated: no need to generate it anymore
2013-01-31fixed bootstrapping using sciteco-minimal and bootstrap autodetectionRobin Haberkorn1-1/+1
was broken due to untested changes
2013-01-27moved redundant code related to bootstrapping and teco-driven substitutions ↵Robin Haberkorn1-3/+2
into automake include (bootstrap.am)
2013-01-23distribute new cmdline.hRobin Haberkorn1-1/+1
2012-12-05windows compatibility changesRobin Haberkorn1-2/+2
* respect executable extensions * do not use weak symbols which appear to be broken on MinGW. Instead, the generated symbol constants contain constructor functions initializing the corresponding objects. Constructor priorities are used to ensure that the initialization takes place after the dummy (NULL) initialization. * do not change the working dir (causes trouble when sciteco gets passed relative paths but the exe is not in the current dir) instead look for teco.ini in program's directory
2012-12-04bootstrapping of build process using preinstalled scitecoRobin Haberkorn1-4/+12
* will also enable crosscompiling SciTECO: first sciteco (or sciteco-minimal) is built for the host platform, then the target binary is built using the host sciteco