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:
Michael Stapelberg 2012-03-25 22:07:43 +02:00
parent 12b1bfa9b8
commit 0686906b89

View File

@ -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)