use printf instead of write to not mix two ways of outputting data
Otherwise, the separator is not properly interleaved with output.
This commit is contained in:
parent
12b1bfa9b8
commit
0686906b89
@ -61,7 +61,7 @@ enum { O_DZEN2, O_XMOBAR, O_I3BAR, O_NONE } output_format;
|
||||
yajl_gen_string(json_gen, (const unsigned char *)"full_text", strlen("full_text")); \
|
||||
yajl_gen_string(json_gen, (const unsigned char *)text, strlen(text)); \
|
||||
} else { \
|
||||
write(STDOUT_FILENO, text, strlen(text)); \
|
||||
printf("%s", text); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user