Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a6f3fe
)
Changed the prefix on the fnc_state enums.
author
Wayne Davison
<wayned@samba.org>
Sun, 13 Feb 2005 10:23:56 +0000
(10:23 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sun, 13 Feb 2005 10:23:56 +0000
(10:23 +0000)
flist.c
patch
|
blob
|
blame
|
history
diff --git
a/flist.c
b/flist.c
index
8d4defb
..
252b91a
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-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
/* 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) {
if (c1 == c2)
c1 = c2 = NULL;
if (!c1) {
- state1 =
fnc
_BASE;
+ state1 =
s
_BASE;
c1 = (uchar*)f1->basename;
} else if (!*c1) {
c1 = (uchar*)f1->basename;
} else if (!*c1) {
- state1 =
fnc
_SLASH;
+ state1 =
s
_SLASH;
c1 = (uchar*)"/";
} else
c1 = (uchar*)"/";
} else
- state1 =
fnc
_DIR;
+ state1 =
s
_DIR;
if (!c2) {
if (!c2) {
- state2 =
fnc
_BASE;
+ state2 =
s
_BASE;
c2 = (uchar*)f2->basename;
} else if (!*c2) {
c2 = (uchar*)f2->basename;
} else if (!*c2) {
- state2 =
fnc
_SLASH;
+ state2 =
s
_SLASH;
c2 = (uchar*)"/";
} else
c2 = (uchar*)"/";
} else
- state2 =
fnc
_DIR;
+ state2 =
s
_DIR;
while (1) {
if ((dif = (int)*c1 - (int)*c2) != 0)
break;
if (!*++c1) {
switch (state1) {
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;
c1 = (uchar*)"/";
break;
- case
fnc
_SLASH:
- state1 =
fnc
_BASE;
+ case
s
_SLASH:
+ state1 =
s
_BASE;
c1 = (uchar*)f1->basename;
break;
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;
if (protocol_version >= 29 && S_ISDIR(f1->mode))
c1 = (uchar*)"/";
break;
- case
fnc
_TRAILING:
+ case
s
_TRAILING:
break;
}
}
if (!*++c2) {
switch (state2) {
break;
}
}
if (!*++c2) {
switch (state2) {
- case
fnc
_DIR:
- state2 =
fnc
_SLASH;
+ case
s
_DIR:
+ state2 =
s
_SLASH;
c2 = (uchar*)"/";
break;
c2 = (uchar*)"/";
break;
- case
fnc
_SLASH:
- state2 =
fnc
_BASE;
+ case
s
_SLASH:
+ state2 =
s
_BASE;
c2 = (uchar*)f2->basename;
break;
c2 = (uchar*)f2->basename;
break;
- case
fnc
_BASE:
- if (state1 ==
fnc
_TRAILING)
+ case
s
_BASE:
+ if (state1 ==
s
_TRAILING)
return 0;
return 0;
- state2 =
fnc
_TRAILING;
+ state2 =
s
_TRAILING;
if (protocol_version >= 29 && S_ISDIR(f2->mode))
c2 = (uchar*)"/";
break;
if (protocol_version >= 29 && S_ISDIR(f2->mode))
c2 = (uchar*)"/";
break;
- case
fnc
_TRAILING:
+ case
s
_TRAILING:
break;
}
}
break;
}
}