home *** CD-ROM | disk | FTP | other *** search
- /* The following software is (C) 1984 Peter da Silva,
- the Mad Australian, in the public domain. It may
- be re-distributed for any purpose with the inclusion
- of this notice. */
- /* TERMLIB: Terminal independant database.
- *
- * Module: tgetflag
- *
- * Purpose: returns flag true or false as to the existence of a given
- * entry. used with 'bs', 'am', etc...
- *
- * Calling conventions: id is the 2 character capability id.
- *
- * Returned values: 1 for success, 0 for failure.
- */
- #include <stdio.h>
- #include <ctype.h>
- #include "termlib.h"
-
- /* tgetflag.c (libtermlib.a)
- *
- BUILD
- OBJS=tinit.o tutil.o tvars.o \
- tgoto.o tputs.o tgetent.o tgetflag.o tgetnum.o tgetstr.o
- CFLAGS=-O
-
- libtermlib.a: $(OBJS) termlib.h
- ar cr libtermlib.a $(OBJS)
- ranlib libtermlib.a
-
- $(OBJS):: termlib.h
- END
- */
-
- tgetflag(id)
- char *id;
- {
- char buf[256], *ptr = buf;
-
- return tgetstr(id, &ptr) ? 1 : 0;
- }
-