/* checks for an alphanumeric character, not a black character * or a control character * */ intisnonaln(int c, int flag) { if (isalnum(c) == 0) { if (isblank(c) != 0 || iscntrl(c) != 0) { return0; } if (ispunct(c) != 0) { if (flag == TRUE) { return0; } else { return1; } // if flag } }
return1; }
/* compare the two strings s1 & s2 by their contents. the value returned is one * if the two string are equal by their contents, and a zero if not. * */ intstrccmp(constchar *s1, constchar *s2, int flag) { constchar *p1 = s1; constchar *p2 = s2; int ischar1 = FALSE; int ischar2 = FALSE;