Lines Matching refs:dir

178   DIR *dir;  in vmsstat_dir()  local
180 dir = opendir (name); in vmsstat_dir()
181 if (dir == 0) in vmsstat_dir()
183 closedir (dir); in vmsstat_dir()
414 static int dir_contents_file_exists_p PARAMS ((struct directory_contents *dir, char *filename));
423 register struct directory *dir; in find_directory() local
444 dir = *dir_slot; in find_directory()
446 if (HASH_VACANT (dir)) in find_directory()
453 dir = (struct directory *) xmalloc (sizeof (struct directory)); in find_directory()
454 dir->name = savestring (name, p - name); in find_directory()
455 hash_insert_at (&directories, dir, dir_slot); in find_directory()
483 dir->contents = 0; in find_directory()
569 dir->contents = dc; in find_directory()
573 return dir; in find_directory()
580 dir_contents_file_exists_p (struct directory_contents *dir, char *filename) in dir_contents_file_exists_p() argument
590 if (dir == 0 || dir->dirfiles.ht_vec == 0) in dir_contents_file_exists_p()
624 df = (struct dirfile *) hash_find_item (&dir->dirfiles, &dirfile_key); in dir_contents_file_exists_p()
634 if (dir->dirstream == 0) in dir_contents_file_exists_p()
642 if (dir->path_key) in dir_contents_file_exists_p()
644 if ((dir->fs_flags & FS_FAT) != 0) in dir_contents_file_exists_p()
646 dir->mtime = time ((time_t *) 0); in dir_contents_file_exists_p()
649 else if (stat(dir->path_key, &st) == 0 && st.st_mtime > dir->mtime) in dir_contents_file_exists_p()
652 dir->mtime = st.st_mtime; in dir_contents_file_exists_p()
661 dir->dirstream = opendir(dir->path_key); in dir_contents_file_exists_p()
662 if (!dir->dirstream) in dir_contents_file_exists_p()
678 ENULLLOOP (d, readdir (dir->dirstream)); in dir_contents_file_exists_p()
696 dirfile_slot = (struct dirfile **) hash_find_slot (&dir->dirfiles, &dirfile_key); in dir_contents_file_exists_p()
709 hash_insert_at (&dir->dirfiles, df, dirfile_slot); in dir_contents_file_exists_p()
723 closedir (dir->dirstream); in dir_contents_file_exists_p()
724 dir->dirstream = 0; in dir_contents_file_exists_p()
808 register struct directory *dir; in file_impossible() local
817 dir = find_directory ("[]"); in file_impossible()
833 dir = find_directory (""); in file_impossible()
835 dir = find_directory ("."); in file_impossible()
856 dir = find_directory (dirname); in file_impossible()
860 if (dir->contents == 0) in file_impossible()
864 dir->contents = (struct directory_contents *) in file_impossible()
866 bzero ((char *) dir->contents, sizeof (struct directory_contents)); in file_impossible()
869 if (dir->contents->dirfiles.ht_vec == 0) in file_impossible()
871 hash_init (&dir->contents->dirfiles, DIRFILE_BUCKETS, in file_impossible()
881 hash_insert (&dir->contents->dirfiles, new); in file_impossible()
891 register struct directory_contents *dir; in file_impossible_p() local
898 dir = find_directory ("[]")->contents; in file_impossible_p()
914 dir = find_directory ("")->contents; in file_impossible_p()
916 dir = find_directory (".")->contents; in file_impossible_p()
937 dir = find_directory (dirname)->contents; in file_impossible_p()
941 if (dir == 0 || dir->dirfiles.ht_vec == 0) in file_impossible_p()
957 dirfile = (struct dirfile *) hash_find_item (&dir->dirfiles, &dirfile_key); in file_impossible_p()
968 dir_name (char *dir) in dir_name() argument
970 return find_directory (dir)->name; in dir_name()
991 register struct directory *dir = *dir_slot; in print_dir_data_base() local
992 if (! HASH_VACANT (dir)) in print_dir_data_base()
994 if (dir->contents == 0) in print_dir_data_base()
995 printf (_("# %s: could not be stat'd.\n"), dir->name); in print_dir_data_base()
996 else if (dir->contents->dirfiles.ht_vec == 0) in print_dir_data_base()
1000 dir->name, dir->contents->path_key,dir->contents->mtime); in print_dir_data_base()
1004 dir->name, dir->contents->dev, in print_dir_data_base()
1005 dir->contents->ino[0], dir->contents->ino[1], in print_dir_data_base()
1006 dir->contents->ino[2]); in print_dir_data_base()
1009 dir->name, (long int) dir->contents->dev, in print_dir_data_base()
1010 (long int) dir->contents->ino); in print_dir_data_base()
1021 files_slot = (struct dirfile **) dir->contents->dirfiles.ht_vec; in print_dir_data_base()
1022 files_end = files_slot + dir->contents->dirfiles.ht_size; in print_dir_data_base()
1036 dir->name, dir->contents->path_key, dir->contents->mtime); in print_dir_data_base()
1040 dir->name, dir->contents->dev, in print_dir_data_base()
1041 dir->contents->ino[0], dir->contents->ino[1], in print_dir_data_base()
1042 dir->contents->ino[2]); in print_dir_data_base()
1045 dir->name, in print_dir_data_base()
1046 (long)dir->contents->dev, (long)dir->contents->ino); in print_dir_data_base()
1059 if (dir->contents->dirstream == 0) in print_dir_data_base()
1102 struct directory *dir = find_directory ((char *)directory); in open_dirstream() local
1104 if (dir->contents == 0 || dir->contents->dirfiles.ht_vec == 0) in open_dirstream()
1112 (void) dir_contents_file_exists_p (dir->contents, (char *) 0); in open_dirstream()
1115 new->contents = dir->contents; in open_dirstream()