when not providing an --input or --output, stdin and stdout are used. Also the c2html function outputs the length of the string
This commit is contained in:
@@ -487,8 +487,8 @@ static void print_escaped(buff_t *buff, const char *str, long len)
|
||||
}
|
||||
}
|
||||
|
||||
char *c2html(const char *str, long len,
|
||||
const char *prefix, const char **error)
|
||||
char *c2html(const char *str, long len, const char *prefix,
|
||||
long *output_len, const char **error)
|
||||
{
|
||||
if(str == NULL)
|
||||
str = "";
|
||||
@@ -639,6 +639,9 @@ char *c2html(const char *str, long len,
|
||||
res = NULL;
|
||||
}
|
||||
|
||||
if(output_len != NULL)
|
||||
*output_len = buff.used;
|
||||
|
||||
free(tokens);
|
||||
return res;
|
||||
}
|
||||
Reference in New Issue
Block a user