/* returns the corresponding ascii symbol value for the given base64 code  */
static char getsymbol(unsigned char code)
/* returns the corresponding ascii symbol value for the given base64 code  */
static char getsymbol(unsigned char code)
{
    if (code == BASE64_SLASH) {
        return '/';
    }
    if (code == BASE64_PLUS) {
        return '+';
    }
    if (code <= BASE64_CAPITAL_UPPER_BOUND) {
        return (code + 'A');
    }
    if (code <= BASE64_SMALL_UPPER_BOUND) {
        return (code + ('z' - BASE64_SMALL_UPPER_BOUND));
    }
    if (code <= BASE64_NUMBER_UPPER_BOUND) {
        return (code + ('9' - BASE64_NUMBER_UPPER_BOUND));
    }
    return (char)BASE64_NOT_DEFINED;
}