cosmetic fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2480 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2005-04-19 20:13:13 +00:00
parent c596c0c4da
commit 3705924fc8
1 changed files with 3 additions and 1 deletions

View File

@ -179,7 +179,6 @@ void read_file(FILE *f, const char *filename)
/* If it's a *nix file (LF) or a DOS file (CR LF), and file /* If it's a *nix file (LF) or a DOS file (CR LF), and file
* conversion isn't disabled, handle it! */ * conversion isn't disabled, handle it! */
if (input == '\n') { if (input == '\n') {
#ifndef NANO_SMALL #ifndef NANO_SMALL
/* If there's a CR before the LF, set format to DOS if we /* If there's a CR before the LF, set format to DOS if we
* currently think this is a *nix file, or to both if we * currently think this is a *nix file, or to both if we
@ -1278,6 +1277,7 @@ int copy_file(FILE *inn, FILE *out)
int retval = 0; int retval = 0;
assert(inn != NULL && out != NULL); assert(inn != NULL && out != NULL);
do { do {
charsread = fread(buf, sizeof(char), BUFSIZ, inn); charsread = fread(buf, sizeof(char), BUFSIZ, inn);
if (charsread == 0 && ferror(inn)) { if (charsread == 0 && ferror(inn)) {
@ -1289,10 +1289,12 @@ int copy_file(FILE *inn, FILE *out)
break; break;
} }
} while (charsread > 0); } while (charsread > 0);
if (fclose(inn) == EOF) if (fclose(inn) == EOF)
retval = -1; retval = -1;
if (fclose(out) == EOF) if (fclose(out) == EOF)
retval = -2; retval = -2;
return retval; return retval;
} }