X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fnames.c;h=0c3aebfc6cd4513cb8034bdcad37a588b728ba08;hb=c78356fedadbe36aae1e063c69d11636c86d35e6;hp=585ad39ba7238ff6e7583a6afe89c08c6da35923;hpb=e2b8c8fa9f6567ddf60634650dbb4f5ea3462642;p=chaz%2Ftar diff --git a/src/names.c b/src/names.c index 585ad39..0c3aebf 100644 --- a/src/names.c +++ b/src/names.c @@ -289,9 +289,8 @@ static int matching_flags; /* exclude_fnmatch options */ static storage and can't be relied upon across two calls. If CHANGE_DIRS is true, treat any entries of type NELT_CHDIR as - the request to change to the given directory. If filename_terminator - is NUL, CHANGE_DIRS is effectively always false. - + the request to change to the given directory. + Entries of type NELT_FMASK cause updates of the matching_flags value. */ struct name_elt * @@ -301,9 +300,6 @@ name_next_elt (int change_dirs) const char *source; char *cursor; - if (filename_terminator == '\0') - change_dirs = 0; - while (name_index != names) { struct name_elt *ep; @@ -734,7 +730,7 @@ static void add_hierarchy_to_namelist (struct name *name, dev_t device) { char *file_name = name->name; - char *buffer = get_directory_contents (file_name, device); + const char *buffer = get_directory_contents (file_name, device); if (! buffer) name->dir_contents = "\0\0\0\0"; @@ -746,7 +742,7 @@ add_hierarchy_to_namelist (struct name *name, dev_t device) : NAME_FIELD_SIZE); char *namebuf = xmalloc (allocated_length + 1); /* FIXME: + 2 above? */ - char *string; + const char *string; size_t string_length; int change_dir = name->change_dir;