dir.c: make dir_add_name() and dir_add_ignored() static
These functions are not used by any other file. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
a476142fe7
commit
159b321270
4
dir.c
4
dir.c
@ -382,7 +382,7 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
|
|||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
|
static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
|
||||||
{
|
{
|
||||||
if (cache_name_exists(pathname, len, ignore_case))
|
if (cache_name_exists(pathname, len, ignore_case))
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -391,7 +391,7 @@ struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int
|
|||||||
return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
|
return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
|
static struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
|
||||||
{
|
{
|
||||||
if (cache_name_pos(pathname, len) >= 0)
|
if (cache_name_pos(pathname, len) >= 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
1
dir.h
1
dir.h
@ -73,7 +73,6 @@ extern void add_excludes_from_file(struct dir_struct *, const char *fname);
|
|||||||
extern void add_exclude(const char *string, const char *base,
|
extern void add_exclude(const char *string, const char *base,
|
||||||
int baselen, struct exclude_list *which);
|
int baselen, struct exclude_list *which);
|
||||||
extern int file_exists(const char *);
|
extern int file_exists(const char *);
|
||||||
extern struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len);
|
|
||||||
|
|
||||||
extern char *get_relative_cwd(char *buffer, int size, const char *dir);
|
extern char *get_relative_cwd(char *buffer, int size, const char *dir);
|
||||||
extern int is_inside_dir(const char *dir);
|
extern int is_inside_dir(const char *dir);
|
||||||
|
Loading…
Reference in New Issue
Block a user