From 4233f6c3fa0928b773a1076eda4e82b3e75af97e Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Fri, 18 Jul 2014 21:41:28 +0100 Subject: Added CR/LF to print_string --- util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index c27981a..a72a1bb 100644 --- a/util.c +++ b/util.c @@ -38,7 +38,10 @@ void print_string(const char* str) /* print string, slowly */ int i=0; while(str[i]) { - write(out_fd, &str[i], 1); + if(str[i]=='\n') + write(out_fd, "\r\n", 2); + else + write(out_fd, &str[i], 1); fsync(out_fd); usleep(SLEEP_TIME); ++i; -- cgit v1.1