X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/07a874fd9b990c4ea1e370d350fc77f9ecc171b5..536b84680b4ab1f29fa456b4fa7b5b16eff4af8f:/exclude.c diff --git a/exclude.c b/exclude.c index 27dd303b..848d5613 100644 --- a/exclude.c +++ b/exclude.c @@ -220,8 +220,14 @@ struct exclude_struct **make_exclude_list(const char *fname, int fatal, int include) { struct exclude_struct **list=list1; - FILE *f = fopen(fname,"r"); + FILE *f; char line[MAXPATHLEN]; + + if (strcmp(fname, "-")) { + f = fopen(fname,"r" O_TEXT_STR); + } else { + f = fdopen(0, "r" O_TEXT_STR); + } if (!f) { if (fatal) { rsyserr(FERROR, errno, @@ -335,7 +341,7 @@ char *get_exclude_tok(char *p) return(NULL); /* Skip over any initial spaces */ - while(isspace((int) *s)) + while (isspace(* (unsigned char *) s)) s++; /* Are we at the end of the string? */ @@ -348,7 +354,7 @@ char *get_exclude_tok(char *p) s+=2; /* Skip to the next space or the end of the string */ - while(!isspace((int) *s) && *s != '\0') + while (!isspace(* (unsigned char *) s) && *s != '\0') s++; } else { t=NULL; @@ -387,12 +393,11 @@ void add_include_line(char *p) static char *cvs_ignore_list[] = { - "RCS","SCCS","CVS","CVS.adm","RCSLOG","cvslog.*", - "tags","TAGS",".make.state",".nse_depinfo", - "*~", "#*", ".#*", ",*", "*.old", "*.bak", "*.BAK", "*.orig", + "RCS/", "SCCS/", "CVS/", ".svn/", "CVS.adm", "RCSLOG", "cvslog.*", + "tags", "TAGS", ".make.state", ".nse_depinfo", + "*~", "#*", ".#*", ", *", "*.old", "*.bak", "*.BAK", "*.orig", "*.rej", ".del-*", "*.a", "*.o", "*.obj", "*.so", "*.Z", "*.elc", "*.ln", - "core",NULL}; - + "core", NULL}; void add_cvs_excludes(void)