Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
914cc65c
Commit
914cc65c
authored
Mar 22, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc.
parent
6479c2ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
io.c
io.c
+9
-3
No files found.
io.c
View file @
914cc65c
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Copyright (C) 1996-2001 by Andrew Tridgell
Copyright (C) 1996-2001 by Andrew Tridgell
Copyright (C) Paul Mackerras 1996
Copyright (C) Paul Mackerras 1996
Copyright (C) 2001 by Martin Pool <mbp@samba.org>
Copyright (C) 2001
, 2002
by Martin Pool <mbp@samba.org>
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
*/
*/
/**
/**
*
* @file io.c
* @file io.c
*
*
* Socket and pipe IO utilities used in rsync.
* Socket and pipe IO utilities used in rsync.
...
@@ -624,12 +623,19 @@ void write_byte(int f,unsigned char c)
...
@@ -624,12 +623,19 @@ void write_byte(int f,unsigned char c)
/**
* Read a line of up to @p maxlen characters into @p buf. Does not
* contain a trailing newline or carriage return.
*
* @return 1 for success; 0 for io error or truncation.
**/
int
read_line
(
int
f
,
char
*
buf
,
size_t
maxlen
)
int
read_line
(
int
f
,
char
*
buf
,
size_t
maxlen
)
{
{
while
(
maxlen
)
{
while
(
maxlen
)
{
buf
[
0
]
=
0
;
buf
[
0
]
=
0
;
read_buf
(
f
,
buf
,
1
);
read_buf
(
f
,
buf
,
1
);
if
(
buf
[
0
]
==
0
)
return
0
;
if
(
buf
[
0
]
==
0
)
return
0
;
if
(
buf
[
0
]
==
'\n'
)
{
if
(
buf
[
0
]
==
'\n'
)
{
buf
[
0
]
=
0
;
buf
[
0
]
=
0
;
break
;
break
;
...
...
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