Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
f773d715
Commit
f773d715
authored
8 years ago
by
David Lawrence Ramsey
Committed by
Benno Schulenberg
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rewrap two lines and fix two typos
parent
407f2d5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/files.c
+4
-3
src/files.c
src/proto.h
+2
-1
src/proto.h
with
6 additions
and
4 deletions
+6
-4
src/files.c
View file @
f773d715
...
...
@@ -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 (i
f
we care) */
/*
Whether
the file
is
writable (i
n 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
*
T
his file is '\r', set format to Mac if we currently think
*
t
his 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
)
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
f773d715
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment