Skip to content
Snippets Groups Projects
Commit b01e3782 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Create files in binary mode (on Windows)

We don't need the carriage returns and they cause Git warnings:
warning: in the working copy of 'src/sbbs3/text.h', CRLF will be replaced by LF the next time Git touches it
parent 51408ff2
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -177,7 +177,7 @@ int main(int argc, char **argv) ...@@ -177,7 +177,7 @@ int main(int argc, char **argv)
perror(path); perror(path);
return __LINE__; return __LINE__;
} }
if((text_h=fopen("text.h", "w"))==NULL) { if((text_h=fopen("text.h", "wb"))==NULL) {
perror("text.h"); perror("text.h");
return __LINE__; return __LINE__;
} }
...@@ -207,7 +207,7 @@ int main(int argc, char **argv) ...@@ -207,7 +207,7 @@ int main(int argc, char **argv)
if(p==NULL) if(p==NULL)
p = "/sbbs/exec"; p = "/sbbs/exec";
SAFEPRINTF(path,"%s/load/text.js",p); SAFEPRINTF(path,"%s/load/text.js",p);
if((text_js=fopen(path, "w"))==NULL) { if((text_js=fopen(path, "wb"))==NULL) {
perror(path); perror(path);
return __LINE__; return __LINE__;
} }
...@@ -220,7 +220,7 @@ int main(int argc, char **argv) ...@@ -220,7 +220,7 @@ int main(int argc, char **argv)
fputs("/* Auto-generated from ctrl/text.dat */\n",text_js); fputs("/* Auto-generated from ctrl/text.dat */\n",text_js);
fputs("/****************************************************************************/\n",text_js); fputs("/****************************************************************************/\n",text_js);
fputs("\n",text_js); fputs("\n",text_js);
if((text_defaults_c=fopen("text_defaults.c","w"))==NULL) { if((text_defaults_c=fopen("text_defaults.c","wb"))==NULL) {
fprintf(stderr,"Can't open text_defaults.c!\n"); fprintf(stderr,"Can't open text_defaults.c!\n");
return __LINE__; return __LINE__;
} }
...@@ -231,7 +231,7 @@ int main(int argc, char **argv) ...@@ -231,7 +231,7 @@ int main(int argc, char **argv)
fputs("#include \"text_defaults.h\"\n",text_defaults_c); fputs("#include \"text_defaults.h\"\n",text_defaults_c);
fputs("\n",text_defaults_c); fputs("\n",text_defaults_c);
fputs("const char * const text_defaults[TOTAL_TEXT]={\n",text_defaults_c); fputs("const char * const text_defaults[TOTAL_TEXT]={\n",text_defaults_c);
if ((text_id = fopen("text_id.c", "w")) == NULL) { if ((text_id = fopen("text_id.c", "wb")) == NULL) {
fprintf(stderr, "Can't open text_id.c!\n"); fprintf(stderr, "Can't open text_id.c!\n");
return __LINE__; return __LINE__;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment