Main Page   Data Structures   File List   Data Fields   Globals  

iswhat.c

Go to the documentation of this file.
00001 /*
00002  * InCode - [ iswhat.c ]
00003  * (c) 2002, J. Weeks
00004  * jweeks@mailandnews.com
00005  *
00006  */
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #include <ctype.h>
00018 
00019 #include "iswhat.h"
00020 
00021 int isAlpha(char c) {
00022   char upperC = toupper(c);
00023 
00024   return (upperC >= 'A' && upperC <= 'Z');
00025 }
00026 
00027 int isNum(char c) {
00028   return (c >= '0' && c <= '9');
00029 }
00030 
00031 int isAlphaNum(char c) {
00032   return(isAlpha(c) || isNum(c));
00033 }
00034 
00035 int isAddOp(char c) {
00036   return (c == '+' || c == '-');
00037 }
00038 
00039 int isMulOp(char c) {
00040   return (c == '*' || c == '/' /* || c == '\\' */ );
00041 }

Generated on Thu Feb 14 09:15:11 2002 for InCode by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001