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
e0c572c5
Commit
e0c572c5
authored
Sep 27, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the flist_ndx_{push,pop}() routines from io.c into util.c.
parent
315c2152
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
43 deletions
+43
-43
io.c
io.c
+1
-43
rsync.h
rsync.h
+9
-0
util.c
util.c
+33
-0
No files found.
io.c
View file @
e0c572c5
...
...
@@ -124,16 +124,7 @@ static void writefd(int fd, const char *buf, size_t len);
static
void
writefd_unbuffered
(
int
fd
,
const
char
*
buf
,
size_t
len
);
static
void
mplex_write
(
int
fd
,
enum
msgcode
code
,
const
char
*
buf
,
size_t
len
,
int
convert
);
struct
flist_ndx_item
{
struct
flist_ndx_item
*
next
;
int
ndx
;
};
struct
flist_ndx_list
{
struct
flist_ndx_item
*
head
,
*
tail
;
};
static
struct
flist_ndx_list
redo_list
,
hlink_list
;
static
flist_ndx_list
redo_list
,
hlink_list
;
struct
msg_list_item
{
struct
msg_list_item
*
next
;
...
...
@@ -147,39 +138,6 @@ struct msg_list {
static
struct
msg_list
msg_queue
;
static
void
flist_ndx_push
(
struct
flist_ndx_list
*
lp
,
int
ndx
)
{
struct
flist_ndx_item
*
item
;
if
(
!
(
item
=
new
(
struct
flist_ndx_item
)))
out_of_memory
(
"flist_ndx_push"
);
item
->
next
=
NULL
;
item
->
ndx
=
ndx
;
if
(
lp
->
tail
)
lp
->
tail
->
next
=
item
;
else
lp
->
head
=
item
;
lp
->
tail
=
item
;
}
static
int
flist_ndx_pop
(
struct
flist_ndx_list
*
lp
)
{
struct
flist_ndx_item
*
next
;
int
ndx
;
if
(
!
lp
->
head
)
return
-
1
;
ndx
=
lp
->
head
->
ndx
;
next
=
lp
->
head
->
next
;
free
(
lp
->
head
);
lp
->
head
=
next
;
if
(
!
next
)
lp
->
tail
=
NULL
;
return
ndx
;
}
static
void
got_flist_entry_status
(
enum
festatus
status
,
const
char
*
buf
)
{
int
ndx
=
IVAL
(
buf
,
0
);
...
...
rsync.h
View file @
e0c572c5
...
...
@@ -834,6 +834,15 @@ struct stats {
struct
chmod_mode_struct
;
struct
flist_ndx_item
{
struct
flist_ndx_item
*
next
;
int
ndx
;
};
typedef
struct
{
struct
flist_ndx_item
*
head
,
*
tail
;
}
flist_ndx_list
;
#define EMPTY_ITEM_LIST {NULL, 0, 0}
typedef
struct
{
...
...
util.c
View file @
e0c572c5
...
...
@@ -1540,6 +1540,39 @@ int bitbag_next_bit(struct bitbag *bb, int after)
return
-
1
;
}
void
flist_ndx_push
(
flist_ndx_list
*
lp
,
int
ndx
)
{
struct
flist_ndx_item
*
item
;
if
(
!
(
item
=
new
(
struct
flist_ndx_item
)))
out_of_memory
(
"flist_ndx_push"
);
item
->
next
=
NULL
;
item
->
ndx
=
ndx
;
if
(
lp
->
tail
)
lp
->
tail
->
next
=
item
;
else
lp
->
head
=
item
;
lp
->
tail
=
item
;
}
int
flist_ndx_pop
(
flist_ndx_list
*
lp
)
{
struct
flist_ndx_item
*
next
;
int
ndx
;
if
(
!
lp
->
head
)
return
-
1
;
ndx
=
lp
->
head
->
ndx
;
next
=
lp
->
head
->
next
;
free
(
lp
->
head
);
lp
->
head
=
next
;
if
(
!
next
)
lp
->
tail
=
NULL
;
return
ndx
;
}
void
*
expand_item_list
(
item_list
*
lp
,
size_t
item_size
,
const
char
*
desc
,
int
incr
)
{
...
...
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