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
8824e2ce
Commit
8824e2ce
authored
Feb 13, 2005
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed the prefix on the fnc_state enums.
parent
8a6f3fea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
flist.c
flist.c
+22
-22
No files found.
flist.c
View file @
8824e2ce
...
...
@@ -1515,7 +1515,7 @@ static void output_flist(struct file_list *flist, const char *whose_list)
}
enum
fnc_state
{
fnc_DIR
,
fnc_SLASH
,
fnc_BASE
,
fnc
_TRAILING
};
enum
fnc_state
{
s_DIR
,
s_SLASH
,
s_BASE
,
s
_TRAILING
};
/* Compare the names of two file_struct entities, similar to how strcmp()
* would do if it were operating on the joined strings. The only difference
...
...
@@ -1547,62 +1547,62 @@ int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
if
(
c1
==
c2
)
c1
=
c2
=
NULL
;
if
(
!
c1
)
{
state1
=
fnc
_BASE
;
state1
=
s
_BASE
;
c1
=
(
uchar
*
)
f1
->
basename
;
}
else
if
(
!*
c1
)
{
state1
=
fnc
_SLASH
;
state1
=
s
_SLASH
;
c1
=
(
uchar
*
)
"/"
;
}
else
state1
=
fnc
_DIR
;
state1
=
s
_DIR
;
if
(
!
c2
)
{
state2
=
fnc
_BASE
;
state2
=
s
_BASE
;
c2
=
(
uchar
*
)
f2
->
basename
;
}
else
if
(
!*
c2
)
{
state2
=
fnc
_SLASH
;
state2
=
s
_SLASH
;
c2
=
(
uchar
*
)
"/"
;
}
else
state2
=
fnc
_DIR
;
state2
=
s
_DIR
;
while
(
1
)
{
if
((
dif
=
(
int
)
*
c1
-
(
int
)
*
c2
)
!=
0
)
break
;
if
(
!*++
c1
)
{
switch
(
state1
)
{
case
fnc
_DIR
:
state1
=
fnc
_SLASH
;
case
s
_DIR
:
state1
=
s
_SLASH
;
c1
=
(
uchar
*
)
"/"
;
break
;
case
fnc
_SLASH
:
state1
=
fnc
_BASE
;
case
s
_SLASH
:
state1
=
s
_BASE
;
c1
=
(
uchar
*
)
f1
->
basename
;
break
;
case
fnc
_BASE
:
state1
=
fnc
_TRAILING
;
case
s
_BASE
:
state1
=
s
_TRAILING
;
if
(
protocol_version
>=
29
&&
S_ISDIR
(
f1
->
mode
))
c1
=
(
uchar
*
)
"/"
;
break
;
case
fnc
_TRAILING
:
case
s
_TRAILING
:
break
;
}
}
if
(
!*++
c2
)
{
switch
(
state2
)
{
case
fnc
_DIR
:
state2
=
fnc
_SLASH
;
case
s
_DIR
:
state2
=
s
_SLASH
;
c2
=
(
uchar
*
)
"/"
;
break
;
case
fnc
_SLASH
:
state2
=
fnc
_BASE
;
case
s
_SLASH
:
state2
=
s
_BASE
;
c2
=
(
uchar
*
)
f2
->
basename
;
break
;
case
fnc
_BASE
:
if
(
state1
==
fnc
_TRAILING
)
case
s
_BASE
:
if
(
state1
==
s
_TRAILING
)
return
0
;
state2
=
fnc
_TRAILING
;
state2
=
s
_TRAILING
;
if
(
protocol_version
>=
29
&&
S_ISDIR
(
f2
->
mode
))
c2
=
(
uchar
*
)
"/"
;
break
;
case
fnc
_TRAILING
:
case
s
_TRAILING
:
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