tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: terminfo implementation

In article <>,
Roy Marples  <> wrote:
>Christos Zoulas wrote:
>> curterm.c:
>>         - there are more baud rates defined on NetBSD.
>> defs.c:
>>         - the arrays of constants should be sorted so the index functions
>>           can use binary search instead of of linear.
>> setupterm.c:
>>         - use errx(3) in the exit case so that the program name gets printed.
>> term.c:
>>         - what frees tp->_extras?
>> termcap.c:
>>         - sort arrays and use binary search.
>> tputs.c:
>>         - to support multiple terminals outc should be passed a second
>>           void * argument that can be used from the application to determine
>>           the terminal context. ie. the signature for ti_puts should be
>>           int ti_puts(const TERMINAL *term, const char *str, int affcnt, 
>>               int (*outc)(int, void *), void *arg)
>OK, new snapshot with all the above changes done.
>I generate hash tables for terminfo and termcap strings now.

Looks good. I would not bother duplicating the functions in tputs.c. I would
just cast putchar to (int (*)(int, void *)) and pass NULL as the argument.


Home | Main Index | Thread Index | Old Index