From 48e4af9653cfe430708a2a1a7ad77834a4199eb6 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Fri, 5 Jun 2020 10:42:36 +0100 Subject: [PATCH] Fixes newline issue on windows with the paq script --- .gitattributes | 3 +++ src/build.py | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 5a5328c..a43b7bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ # Github language settings *.h linguist-language=c *.c linguist-language=c + +*.h text eol=auto +*.c text eol=auto diff --git a/src/build.py b/src/build.py index e0d6565..804b23f 100644 --- a/src/build.py +++ b/src/build.py @@ -134,7 +134,7 @@ for f in intro_files: sys.stdout.write(open(f, 'r').read()) print("*/") -# print(os.linesep + "#ifndef " + macro + "_SINGLE_HEADER"); +# print("\n#ifndef " + macro + "_SINGLE_HEADER"); # print("#define " + macro + "_SINGLE_HEADER"); print("#ifndef NK_SINGLE_FILE"); print(" #define NK_SINGLE_FILE"); @@ -145,7 +145,7 @@ for f in pub_files: sys.stdout.write(open(f, 'r').read()) # print("#endif /* " + macro + "_SINGLE_HEADER */"); -print(os.linesep + "#ifdef " + macro + "_IMPLEMENTATION"); +print("\n#ifdef " + macro + "_IMPLEMENTATION"); print(""); for f in priv_files1: @@ -160,8 +160,8 @@ for f in priv_files2: print("#endif /* " + macro + "_IMPLEMENTATION */"); -print(os.linesep + "/*") +print("\n/*") for f in outro_files: sys.stdout.write(open(f, 'r').read()) -print("*/" + os.linesep) +print("*/\n")