Try forcing ed to produce LF output files rather than CRLF ones.

This commit is contained in:
David Given 2022-07-15 23:42:23 +02:00
parent b727599882
commit 020c84db3d
2 changed files with 2 additions and 3 deletions

View file

@ -52,7 +52,6 @@ for _, f in ipairs(filenamesof(xh_files)) do
outleaves = { name..".h" }, outleaves = { name..".h" },
commands = { commands = {
"%{ins[1]} < %{ins[2]} > %{outs}", "%{ins[1]} < %{ins[2]} > %{outs}",
"cat %{outs}",
} }
} }
end end

View file

@ -981,7 +981,7 @@ char *fname;
nonascii = nullchar = truncated = 0; nonascii = nullchar = truncated = 0;
if (diag) printf("\"%s\" ", fname); if (diag) printf("\"%s\" ", fname);
if ((fp = fopen(fname, "r")) == NULL) { if ((fp = fopen(fname, "rb")) == NULL) {
printf("file open err\n"); printf("file open err\n");
return(ERR); return(ERR);
} }
@ -1028,7 +1028,7 @@ int apflg;
lines = bytes = 0; lines = bytes = 0;
if (diag) printf("\"%s\" ", fname); if (diag) printf("\"%s\" ", fname);
if ((fp = fopen(fname, (apflg ? "a" : "w"))) == NULL) { if ((fp = fopen(fname, (apflg ? "ab" : "wb"))) == NULL) {
printf("file open error\n"); printf("file open error\n");
return(ERR); return(ERR);
} }