From fce2363feca909f1423ef2577874b8a9e90f7efe Mon Sep 17 00:00:00 2001 From: Unix-Ninja Date: Fri, 24 Jun 2016 18:08:02 -0400 Subject: [PATCH] Clean end-of-line output usage (not actually POSIX) --- include/types.h | 6 ++++++ src/hashcat.c | 10 +--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/types.h b/include/types.h index 8578347..67a91b1 100644 --- a/include/types.h +++ b/include/types.h @@ -6,6 +6,12 @@ #ifndef TYPES_H #define TYPES_H +#ifdef _WIN +#define EOL "\r\n" +#else +#define EOL "\n" +#endif + typedef struct { uint salt_buf[16]; diff --git a/src/hashcat.c b/src/hashcat.c index 1f95f17..b205cc8 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -907,15 +907,7 @@ void status_display_machine_readable () * flush */ - #ifdef _WIN - fputc ('\r', out); - fputc ('\n', out); - #endif - - #ifdef _POSIX - fputc ('\n', out); - #endif - + fputs (EOL, out); fflush (out); } -- 2.25.1