summaryrefslogtreecommitdiff
path: root/txttoc.sh
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-13 19:51:54 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-13 19:51:54 -0400
commitfa799768c4f6d97c5f60a37829ad1b457b7c0096 (patch)
treeed28b64735a6a79b10ecf1a87296f36e88745f4e /txttoc.sh
separate from libc
Diffstat (limited to 'txttoc.sh')
-rw-r--r--txttoc.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/txttoc.sh b/txttoc.sh
new file mode 100644
index 0000000..9d4571e
--- /dev/null
+++ b/txttoc.sh
@@ -0,0 +1,16 @@
+FUNCTION=${1:-tigetstr}
+while read long_name terminfo_name termcap_name description; do
+ cat <<-EOF > $long_name.c
+ #include <term.h>
+
+ #define $long_name ${FUNCTION}("$terminfo_name")
+
+ /** $description **/
+
+ /*
+ TERMINFO_NAME($terminfo_name)
+ TERMCAP_NAME($termcap_name)
+ XOPEN(400)
+ */
+EOF
+done