/************************************************************************ * * * Copyright (c) 1982, Fred Fish * * All Rights Reserved * * * * This software and/or documentation is released for public * * distribution for personal, non-commercial use only. * * Limited rights to use, modify, and redistribute are hereby * * granted for non-commercial purposes, provided that all * * copyright notices remain intact and all changes are clearly * * documented. The author makes no warranty of any kind with * * respect to this product and explicitly disclaims any implied * * warranties of merchantability or fitness for any particular * * purpose. * * * ************************************************************************ */ /* * Modified: * 30-Apr-86 Mic Kaczmarczik * #define index to strchr if VAX C * * 28-Jul-88 Tom Hageman * Use _tfind(), include "_termcap.h" * March 1990 [TRH] * Adapt for FASTCAP implementation. * (See Log at end) */ #ifdef RCS_ID static const char rcsid[] = "$Id: tgetflag.c,v 1.4 1993/04/07 01:37:42 tom Exp tom $"; #endif /* * LIBRARY FUNCTION * * tgetflag extract boolean termcap capability * * KEY WORDS * * termcap * * SYNOPSIS * * tgetflag(id) * const char *id; * * DESCRIPTION * * Returns TRUE if specified id is present in terminal * entry, FALSE otherwise. * */ #include "_termcap.h" /* * PSEUDO CODE * * Begin tgetflag * Find the entry we want in termcap entry buffer * If found, and the entry is identifier only then * Return TRUE * End If * Return FALSE as default. * End tgetflag * */ int tgetflag(cap) const char *cap; { register char *s; #if FASTCAP return ((s = _tcpfind(cap)) && (*s == '\0')); #else return ((s = _tcpfind(cap)) && (*s == ':' || *s == '\0')); #endif } /*======================================================================* * $Log: tgetflag.c,v $ * Revision 1.4 1993/04/07 01:37:42 tom * fix typo in RCS Log. * *======================================================================*/