aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/spawn.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-03-16documented the automatic EOL translation featureRobin Haberkorn1-0/+12
2015-03-16implemented automatic EOL translation supportRobin Haberkorn1-37/+69
* activated via bit 4 of the ED flag (enabled by default) * automatic EOL guessing on file loading and translation to LFs. * works with files that have inconsistent EOL sequences. * automatic translation to original EOL sequences on file saving * works with inconsistent EOL sequences in the buffer. This should usually not happen if the file was read in with automatic EOL translation enabled. * also works with the EC and EG commands * performance is OK, depending on the file being translated. When reading files with UNIX EOLs, the overhead is minimal typically-sized files. For DOS EOLs the overhead is larger but still acceptable. * Return (line feed) is now an immediate editing command. This centralizes EOL sequence insertion. Later, other features like auto-indent could be added to the editing command. * get_eol() has been moved to main.cpp (now called get_eol_seq() * Warn if file ownership could not be preserved when saving files. * IOView has been almost completely rewritten based on GIOChannels. The EOL translation code is also in IOView.
2015-03-02fixed minor typos in <EC> documentationRobin Haberkorn1-2/+2
2015-02-14updated Scintilla submodule: fixed tab stop calculation on CursesRobin Haberkorn1-1/+1
* also did some whitespace cleanup in SciTECO now that tabs are displayed properly
2015-02-11updated copyright to 2015Robin Haberkorn1-1/+1
2014-12-15fixup: the spawn context's GError must not be memory-managed by the state objectRobin Haberkorn1-4/+0
this is because ownership of the GError may be passed to GlibError()
2014-12-15always free glib's GError structuresRobin Haberkorn1-0/+6
* when throwing GlibError(), this is taken care of automatically. * fixes a memleak since there may be resources associated with the GError.
2014-12-15add workaround for missing g_spawn_check_exit_status() in libglib v2.33 and ↵Robin Haberkorn1-0/+41
earlier * Debian 7 is still at libglib v2.33 and since it should be supported, I reimplemented the missing function (UNIX-only). * This workaround can be removed once libglib v2.34 becomes common place. Closes #2
2014-11-16first working version of the one-view-per-buffer designRobin Haberkorn1-2/+2
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-2/+3
* the GError expection has been renamed to GlibError, to avoid nameclashes when working from the SciTECO namespace
2014-11-11added all of SciTECO's declarations to the "SciTECO" namespaceRobin Haberkorn1-0/+4
normally, since SciTECO is not a library, this is not strictly necessary since every library should use proper name prefixes or namespaces for all global declarations to avoid name clashes. However * you cannot always rely on that * Scintilla does violate the practice of using prefixes or namespaces. The public APIs are OK, but it does define global functions/methods, e.g. for "Document" that clashed with SciTECO's "TECODocument" class at link-time. Scintilla can put its definitions in a namespace, but this feature cannot be easily enabled without patching Scintilla. * a "SciTECO" namespace will be necessary if "SciTECO" is ever to be turned into a library. Even if this library will have only a C-linkage API, it must ensure it doesn't clutter the global namespace. So the old "TECODocument" class was renamed back to "Document" (SciTECO::Document).
2014-11-10fixed EG command: make sure to reset the register argument on termination,Robin Haberkorn1-0/+2
else the next EC command will not work as expected or even crash
2014-11-09fixed EC command for negative line rangesRobin Haberkorn1-0/+6
2014-11-09allow "-EC" command even though we do not generally imply the sign prefixRobin Haberkorn1-3/+13
2014-11-09documented EC and EG commandsRobin Haberkorn1-0/+105
2014-11-09added EG command: pipe from buffer into Q-RegisterRobin Haberkorn1-7/+34
2014-11-09implemented EC command (execute operating system command) in spawn.cppRobin Haberkorn1-0/+366
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.