--- parser3/src/include/pa_common.h 2010/05/20 04:28:22 1.143 +++ parser3/src/include/pa_common.h 2011/02/18 06:01:21 1.144 @@ -8,7 +8,7 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char * const IDENT_COMMON_H="$Date: 2010/05/20 04:28:22 $"; +static const char * const IDENT_COMMON_H="$Date: 2011/02/18 06:01:21 $"; #include "pa_string.h" #include "pa_hash.h" @@ -274,6 +274,14 @@ int getMonthDays(int year, int month); int remove_crlf(char *start, char *end); +inline bool pa_isalpha(unsigned char c) { + return (((c>='A') && (c<='Z')) || ((c>='a') && (c<='z'))); +} + +inline bool pa_isalnum(unsigned char c) { + return (((c>='0') && (c<='9')) || pa_isalpha(c)); +} + void check_safe_mode(struct stat finfo, const String& file_spec, const char* fname); void pa_base64_decode(const char *in, size_t in_size, char*& result, size_t& result_size);