diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2014-07-18 21:41:28 +0100 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2014-07-18 21:41:28 +0100 |
| commit | 4233f6c3fa0928b773a1076eda4e82b3e75af97e (patch) | |
| tree | 7d49695815ea23e8986b6495b3c4b17fa05389a5 | |
| parent | d3d405d257a328e8454b851846703bb708e0a975 (diff) | |
| download | wargames-server-4233f6c3fa0928b773a1076eda4e82b3e75af97e.zip wargames-server-4233f6c3fa0928b773a1076eda4e82b3e75af97e.tar.gz wargames-server-4233f6c3fa0928b773a1076eda4e82b3e75af97e.tar.bz2 wargames-server-4233f6c3fa0928b773a1076eda4e82b3e75af97e.tar.xz | |
Added CR/LF to print_string
| -rw-r--r-- | util.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |