home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 406_01 / atoc / isid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-09  |  754 b   |  27 lines

  1. /*=========================================================================
  2.  
  3.     ATOC isid module
  4.  
  5. =========================================================================*/
  6.  
  7. #include <stdio.h>
  8. #include "atoc.h"
  9.  
  10.  
  11. /*-------------------------------------------------------------------------
  12. isid( c ) returns TRUE if c could be in an identifier, or FALSE otherwise.
  13. -------------------------------------------------------------------------*/
  14. int isid( c )
  15. char c;
  16. {
  17.     static char s[] =
  18.       "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  19.     char *strchr();
  20.  
  21.     if ( c )
  22.         if ( strchr( s, c ) != NULL )
  23.             return( TRUE );
  24.     return( FALSE );
  25. }
  26. /*=======================================================================*/
  27.