[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %s and %c in parameterized terminfo strings?
From: |
Anmol Sethi |
Subject: |
Re: %s and %c in parameterized terminfo strings? |
Date: |
Sat, 23 Apr 2016 21:44:01 -0400 |
gotcha, thanks!
> On Apr 23, 2016, at 9:42 PM, Thomas Dickey <address@hidden> wrote:
>
> 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