If the output buffer size did not suffice for converting, the function returns
FALSE. Generally, if escape_carets is false, the output buffer needs
-strlen(str)+1 bytes, and if escape_carets is true, it can need strlen(str)+2
+strlen(str)+1 bytes, and if escape_carets is true, it can need strlen(str)*1.5+2
bytes. In any case, the function makes sure that the resulting string is
zero terminated.
in+=3;
break;
}
+ APPEND(STRING_COLOR_TAG);
+ if(escape_carets)
+ APPEND(STRING_COLOR_TAG);
+ APPEND(STRING_COLOR_RGB_DEFAULT);
+ break;
/*case 'a':
if ( in+1 != end && ( isxdigit(in[1]) || (in[1] == '+' || in[1] == '-') ) )
{
in+=4;
break;
}
+ *out++ = STRING_COLOR_TAG;
+ *out++ = STRING_COLOR_RGB_DEFAULT;
+ ++in;
+ break;
/*case 'a':
if ( isxdigit(in[2]) || in[2] == '+' || in[2] == '-' )
{
else if(buffer[match+1] == STRING_COLOR_RGB_DEFAULT)
{
if ( isxdigit(buffer[match+2]) && isxdigit(buffer[match+3]) && isxdigit(buffer[match+4]) )
+ {
r = buffer[match+2];
g = buffer[match+3];
b = buffer[match+4];
color = -1;
break;
+ }
}
}
}