From: Unix-Ninja Date: Fri, 24 Jun 2016 22:08:02 +0000 (-0400) Subject: Clean end-of-line output usage (not actually POSIX) X-Git-Tag: v3.00~4^2~2 X-Git-Url: https://www.flypig.org.uk/git/?p=hashcat.git;a=commitdiff_plain;h=fce2363feca909f1423ef2577874b8a9e90f7efe Clean end-of-line output usage (not actually POSIX) --- 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); }