ftepp.cpp
/* Special unescape-string function which skips a leading quote
 * and stops at a quote, not just at \0
 */
Special unescape-string function which skips a leading quote
and stops at a quote, not just at \0
Special unescape - string function which skips a leading quote and stops at a quote not just at \ 0
static void unescape(const char *str, char *out) {
    ++str;
    while (*str && *str != '"') {
        if (*str == '\\') {
            ++str;
            switch (*str) {
                case '\\': *out++ = *str; break;
                case '"':  *out++ = *str; break;
                case 'a':  *out++ = '\a'; break;
                case 'b':  *out++ = '\b'; break;
                case 'r':  *out++ = '\r'; break;
                case 'n':  *out++ = '\n'; break;
                case 't':  *out++ = '\t'; break;
                case 'f':  *out++ = '\f'; break;
                case 'v':  *out++ = '\v'; break;
                default:
                    *out++ = '\\';
                    *out++ = *str;
                    break;
            }
            ++str;
            continue;
        }
        *out++ = *str++;
    }
    *out = 0;
}
static void unescape ( const char * str , char * out ) { ++ str ; while ( * str && * str != ' ' ) { if ( * str == ' \\ ' ) { ++ str ; switch ( * str ) { case ' \\ ' : * out ++ = * str ; break ; case ' ' : * out ++ = * str ; break ; case ' ' : * out ++ = ' \a ' ; break ; case ' ' : * out ++ = ' \b ' ; break ; case ' ' : * out ++ = ' \r ' ; break ; case ' ' : * out ++ = ' \n ' ; break ; case ' ' : * out ++ = ' \t ' ; break ; case ' ' : * out ++ = ' \f ' ; break ; case ' ' : * out ++ = ' \v ' ; break ; default : * out ++ = ' \\ ' ; * out ++ = * str ; break ; } ++ str ; continue ; } * out ++ = * str ++ ; } * out = 0 ; }
Special unescape-string function which skips a leading quote
 and stops at a quote, not just at \0
Special unescape - string function which skips a leading quote and stops at a quote not just at \ 0