Lines Matching refs:dir
153 my_DIR *dir; in my_opendir() local
168 dir = (my_DIR *) malloc (sizeof (my_DIR)); in my_opendir()
169 if (dir == NULL) in my_opendir()
175 dir->level = filesystem[idx].level; in my_opendir()
176 dir->idx = idx; in my_opendir()
181 return dir; in my_opendir()
188 my_DIR *dir = gdir; in my_readdir() local
190 if (dir->idx == -1) in my_readdir()
193 dir->level, (long int) dir->idx); in my_readdir()
197 while (dir->idx < nfiles && filesystem[dir->idx].level > dir->level) in my_readdir()
198 ++dir->idx; in my_readdir()
200 if (dir->idx == nfiles || filesystem[dir->idx].level < dir->level) in my_readdir()
202 dir->idx = -1; in my_readdir()
204 dir->level, (long int) dir->idx); in my_readdir()
208 dir->d.d_ino = 1; /* glob should not skip this entry. */ in my_readdir()
210 dir->d.d_type = filesystem[dir->idx].type; in my_readdir()
212 strcpy (dir->d.d_name, filesystem[dir->idx].name); in my_readdir()
215 dir->level, (long int) dir->idx, dir->d.d_ino, dir->d.d_type, in my_readdir()
216 dir->d.d_name); in my_readdir()
218 ++dir->idx; in my_readdir()
220 return &dir->d; in my_readdir()
225 my_closedir (void *dir) in my_closedir() argument
228 free (dir); in my_closedir()