From 85640c882fb700304ef4740c46ec3309f2fb3d62 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 23 Feb 2019 13:40:59 -0500 Subject: take function name as parameter --- src/term/txttoc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/term') diff --git a/src/term/txttoc.sh b/src/term/txttoc.sh index 7b360b1d..9d4571e6 100644 --- a/src/term/txttoc.sh +++ b/src/term/txttoc.sh @@ -1,8 +1,9 @@ +FUNCTION=${1:-tigetstr} while read long_name terminfo_name termcap_name description; do cat <<-EOF > $long_name.c - #include + #include - #define $long_name tigetstr("$terminfo_name") + #define $long_name ${FUNCTION}("$terminfo_name") /** $description **/ -- cgit v1.2.1