Logo Search packages:      
Sourcecode: uaputl version File versions  Download package

unsigned char hexc2bin ( char  chr )

convert char to hex integer

Parameters:
chrchar
Returns:
hex integer

Definition at line 81 of file uaputl.c.

Referenced by a2hex(), and convert2hex().

{
    if (chr >= '0' && chr <= '9')
        chr -= '0';
    else if (chr >= 'A' && chr <= 'F')
        chr -= ('A' - 10);
    else if (chr >= 'a' && chr <= 'f')
        chr -= ('a' - 10);

    return chr;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index