home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / texchk / part2 / texchars.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  599 b   |  23 lines

  1. #include "texchars.h"
  2.  
  3. static char *Latex_Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:;,?!`'()[]-/*@#$%&~_^\\{}+=|<>\"\t \n";
  4.  
  5. static char *Lgl_Command_Chars = " !\"#$%&'()+,-./:;<=>@[\\]^_`{|}~";
  6.  
  7. char Lgl_Chars[256];
  8. char Lgl_Single_Char_Commands[256];
  9.  
  10. init_legal_chars () 
  11. {
  12.   int j;
  13.   char *lc = Latex_Chars;
  14.   char *ls = Lgl_Command_Chars;
  15.   for (j = 0; j < 256; j++) { 
  16.       Lgl_Chars[j] = 0;
  17.       Lgl_Single_Char_Commands[j] = 0;
  18.   }
  19.   while (*lc != '\0') Lgl_Chars[*lc++] = '1';  
  20.   while (*ls != '\0') Lgl_Single_Char_Commands[*ls++] = '1';  
  21.   return(1);
  22. }
  23.