00001 /* BeeOS v0.1. Created: 2003/08/10 Modified: 2004/03/03 00002 * Copyright (C) 2004 Paul Harvey - ROMA, Australia. 00003 * csirac@users.sourceforge.net 00004 * - PLEASE DON'T LOOK AT THIS CODE - IT IS DISGUSTING! 00005 * - Full rewrite in progress. 00006 * - "what was I thinking - must have been bored" :-) 00007 */ 00008 00009 /* This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00026 #include "../include/beeos.h" 00027 #include "../include/bctype.h" 00028 00035 /*@-redef@*/ 00036 bool bisnum(char c) 00037 /*@=redef@*/ 00038 { 00039 if ((c >= '0') && (c <= '9')) return true; 00040 else return false; 00041 } 00042 00049 /*@-redef@*/ 00050 bool bishex(char c) 00051 /*@=redef@*/ 00052 { 00053 if (((c >= '0') && (c <= '9')) || (((c | 32) >= 'a') && ((c | 32) <= 'f'))) 00054 return true; 00055 else return false; 00056 } 00057 00064 /*@-redef@*/ 00065 bool bisalpha(char c) 00066 /*@=redef@*/ 00067 { 00068 if ( ((c | 32) >= 'a') && ((c | 32) <= 'z')) return true; 00069 else return false; 00070 }