From ff569d7114292bf39cf070ecc58d8c4ddd31ee29 Mon Sep 17 00:00:00 2001 From: nick black Date: Mon, 13 Jul 2020 05:54:59 -0400 Subject: [PATCH] terminfo: chop off $ syntax #769 --- src/lib/terminfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/terminfo.c b/src/lib/terminfo.c index 71dc7d7ed..5c7b01295 100644 --- a/src/lib/terminfo.c +++ b/src/lib/terminfo.c @@ -32,6 +32,14 @@ int terminfostr(char** gseq, const char* name){ *gseq = NULL; return -1; } + // terminfo syntax allows a number N of milliseconds worth of pause to be + // specified using $ syntax. this is then honored by tputs(). but we don't + // use tputs(), instead preferring the much faster stdio+tiparm(). to avoid + // dumping "$" sequences all over stdio, we chop them out. + char* pause; + if( (pause = strchr(*gseq, '$')) ){ + *pause = '\0'; + } return 0; }