[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %s and %c in parameterized terminfo strings?
From: |
Thomas Dickey |
Subject: |
Re: %s and %c in parameterized terminfo strings? |
Date: |
Sat, 23 Apr 2016 21:42:56 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sat, Apr 23, 2016 at 04:05:36PM -0400, Anmol Sethi wrote:
> I'm reading the terminfo man page and I noticed that parameterized strings
> can have %s in them which pops the stack and prints the value with printf
> using %s. why is there both %c and %s? as far as I can tell, you can't push
> an actual string onto the stack, only characters/integers.
Actually tparm accepts strings (and a few entries use those, e.g., for
function-key labels).
Probably both %c and %s are there because (30 years ago) someone wanted
to make it more like printf, and also because emitting a single character
is done frequently in terminfo.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature