isdigit(int c)
{
    return ((c)>='0'&&(c)<='9');
}

isupper(int c)
{
    return ((c)>='A'&&(c)<='Z');
}

islower(int c)
{
    return ((c)>='a'&&(c)<='z');
}

isalpha(int c)
{
    return (isupper(c)||islower(c));
}

isalnum(int c)
{
    return (isalpha(c)||isdigit(c));
}

isprint(int c)
{
    return ((c)>31&&(c)<128);
}

isascii(int c)
{
    return ((c)=>0&&(c)<128);
}

isspace(int c)
{
    return ((c)==' '  || (c)=='\t' || (c)=='\n' || (c)=='\v' || (c)=='\f' || (c)=='\r');
}

isodigit(int c)                            /* check if octal digit */
{
      return (c >= '0' && c <= '7');
}

isxdigit(int c)                            /* check if hexidecimal digit */
{
      return (isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'));
}

iscntrl(int c)
{
      return ((c >= 0 && c < 32) || c == 127);
}

ispunct(int c)
{
      return (isascii(c) && !(isalnum(c) || iscntrl(c)));
}
