aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-03 15:41:28 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-08-03 16:09:33 +0300
commit51bd183f064d0c0ea5e0184d9f6b6b62e5c01e50 (patch)
tree9820e9671db37fbf5657d1327ef93e3081f8a6ab /src/interface.h
parent5a85721a0a1b592287cb67188c5f0c5b55b3e348 (diff)
downloadsciteco-51bd183f064d0c0ea5e0184d9f6b6b62e5c01e50.tar.gz
added --quiet, --stdin and --stdout for easier integration into UNIX pipelines
* In principle --stdin and --stdout could have been done in pure TECO code using the <^T> command. Having built-in command-line arguments however has several advantages: * Significantly faster than reading byte-wise with ^T. * Performs EOL normalization unless specifying --8bit of course. * Significantly shortens command-lines. `sciteco -qio` and `sciteco -qi` can be real replacements for sed and awk. * You can even place SciTECO into the middle of a pipeline while editing interactively: foo | sciteco -qio --no-profile | bar Unfortunately, this will not currently work when munging the profile as command-line parameters are also transmitted via the unnamed buffer. This should be changed to use special Q-registers (FIXME). * --quiet can help to improve the test suite (TODO). Should probably be the default in TE_CHECK(). * --stdin and --stdout allow to simplify many SciTECO scripts, avoiding temporary files, especially for womenpage generation (TODO). * For processing potentially infinite streams, you will still have to read using ^T.
Diffstat (limited to 'src/interface.h')
-rw-r--r--src/interface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/interface.h b/src/interface.h
index 02af8a2..c0c41bd 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -66,6 +66,8 @@ typedef enum {
TECO_MSG_ERROR
} teco_msg_t;
+extern teco_msg_t teco_interface_msg_level;
+
/** @pure */
void teco_interface_msg_literal(teco_msg_t type, const gchar *str, gsize len);