tweaks: rewrap two lines and fix two typos

master
David Lawrence Ramsey 2017-02-09 12:17:54 -06:00 committed by Benno Schulenberg
parent 407f2d5bcf
commit f773d715e8
2 changed files with 6 additions and 4 deletions

View File

@ -731,7 +731,8 @@ filestruct *read_line(char *buf, size_t buf_len, filestruct *prevnode)
* undoable means do we want to create undo records to try and undo
* this. Will also attempt to check file writability if fd > 0 and
* checkwritable == TRUE. */
void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkwritable)
void read_file(FILE *f, int fd, const char *filename, bool undoable,
bool checkwritable)
{
size_t num_lines = 0;
/* The number of lines in the file. */
@ -749,7 +750,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
/* The current value we read from the file, whether an input
* character or EOF. */
bool writable = TRUE;
/* Is the file writable (if we care) */
/* Whether the file is writable (in case we care). */
#ifndef NANO_TINY
int format = 0;
/* 0 = *nix, 1 = DOS, 2 = Mac, 3 = both DOS and Mac. */
@ -837,7 +838,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkw
if (len > 0) {
#ifndef NANO_TINY
/* If file conversion isn't disabled and the last character in
* This file is '\r', set format to Mac if we currently think
* this file is '\r', set format to Mac if we currently think
* the file is a *nix file, or to both DOS and Mac if we
* currently think the file is a DOS file. */
if (buf[len - 1] == '\r' && !ISSET(NO_CONVERT) && format < 2)

View File

@ -302,7 +302,8 @@ void switch_to_next_buffer_void(void);
bool close_buffer(void);
#endif
filestruct *read_line(char *buf, size_t buf_len, filestruct *prevnode);
void read_file(FILE *f, int fd, const char *filename, bool undoable, bool checkwritable);
void read_file(FILE *f, int fd, const char *filename, bool undoable,
bool checkwritable);
int open_file(const char *filename, bool newfie, bool quiet, FILE **f);
char *get_next_filename(const char *name, const char *suffix);
void do_insertfile_void(void);