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:
855decd
)
Got rid of O_TEXT_STR and added code to strip '\r' from the end of the
author
Wayne Davison
<wayned@samba.org>
Sun, 26 Jan 2003 20:10:23 +0000
(20:10 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sun, 26 Jan 2003 20:10:23 +0000
(20:10 +0000)
lines we read.
exclude.c
patch
|
blob
|
blame
|
history
diff --git
a/exclude.c
b/exclude.c
index
848d561
..
e1b2588
100644
(file)
--- a/
exclude.c
+++ b/
exclude.c
@@
-224,9
+224,9
@@
struct exclude_struct **make_exclude_list(const char *fname,
char line[MAXPATHLEN];
if (strcmp(fname, "-")) {
char line[MAXPATHLEN];
if (strcmp(fname, "-")) {
- f = fopen(fname,"r"
O_TEXT_STR
);
+ f = fopen(fname,"r");
} else {
} else {
- f = fdopen(0, "r"
O_TEXT_STR
);
+ f = fdopen(0, "r");
}
if (!f) {
if (fatal) {
}
if (!f) {
if (fatal) {
@@
-241,7
+241,7
@@
struct exclude_struct **make_exclude_list(const char *fname,
while (fgets(line,MAXPATHLEN,f)) {
int l = strlen(line);
while (fgets(line,MAXPATHLEN,f)) {
int l = strlen(line);
-
if (l && line[l-1] == '\n'
) l--;
+
while (l && (line[l-1] == '\n' || line[l-1] == '\r')
) l--;
line[l] = 0;
if (line[0] && (line[0] != ';') && (line[0] != '#')) {
/* Skip lines starting with semicolon or pound.
line[l] = 0;
if (line[0] && (line[0] != ';') && (line[0] != '#')) {
/* Skip lines starting with semicolon or pound.