Searched refs:dirp (Results 1 - 25 of 131) sorted by relevance

123456

/macosx-10.10.1/Libc-1044.1.2/gen/FreeBSD/
H A Dclosedir.c51 closedir(dirp)
52 DIR *dirp;
57 _pthread_mutex_lock(&dirp->dd_lock);
59 _seekdir(dirp, dirp->dd_rewind); /* free seekdir storage */
61 fd = dirp->dd_fd;
62 dirp->dd_fd = -1;
63 dirp->dd_loc = 0;
64 free((void *)dirp->dd_buf);
65 _reclaim_telldir(dirp);
[all...]
H A Drewinddir.c42 rewinddir(dirp)
43 DIR *dirp;
46 _seekdir(dirp, dirp->dd_rewind);
47 dirp->dd_rewind = telldir(dirp);
H A Dreaddir.c52 _readdir_unlocked(dirp, skip)
53 DIR *dirp;
59 if (dirp->dd_loc >= dirp->dd_size) {
60 if (dirp->dd_flags & __DTF_READALL)
62 dirp->dd_loc = 0;
64 if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) {
66 dirp->dd_size = __getdirentries64(dirp
[all...]
H A Dseekdir.c50 seekdir(dirp, loc)
51 DIR *dirp;
55 _pthread_mutex_lock(&dirp->dd_lock);
56 _seekdir(dirp, loc);
58 _pthread_mutex_unlock(&dirp->dd_lock);
H A Dtelldir.c61 telldir(dirp)
62 DIR *dirp;
68 _pthread_mutex_lock(&dirp->dd_lock);
69 LIST_FOREACH(lp, &dirp->dd_td->td_locq, loc_lqe) {
72 (lp->loc_seek == dirp->dd_td->seekoff)
74 (lp->loc_seek == dirp->dd_seek)
76 && (lp->loc_loc == dirp->dd_loc))
81 _pthread_mutex_unlock(&dirp->dd_lock);
88 _pthread_mutex_lock(&dirp->dd_lock);
90 lp->loc_index = dirp
[all...]
H A Dopendir.c110 DIR *dirp; local
115 if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL)
118 dirp->dd_td = (struct _telldir *)((char *)dirp + sizeof(DIR));
119 LIST_INIT(&dirp->dd_td->td_locq);
120 dirp->dd_td->td_loccnt = 0;
176 n = (int)__getdirentries64(fd, ddptr, space, &dirp->dd_td->seekoff);
178 n = _getdirentries(fd, ddptr, space, &dirp->dd_seek);
201 free(dirp);
211 dirp
[all...]
/macosx-10.10.1/Libc-1044.1.2/gen/
H A Ddirfd.c28 int dirfd(DIR *dirp) { argument
29 if (dirp == NULL || dirp->__dd_fd < 0) {
34 return dirp->__dd_fd;
H A Ddevname.c74 register struct dirent *dirp; local
83 while ( (dirp = readdir(dp)) ) {
84 bcopy(dirp->d_name, _buf + sizeof(_PATH_DEV) - 1,
85 dirp->d_namlen + 1);
92 if (dirp->d_namlen + 1 > len)
94 strcpy(buf, dirp->d_name);
/macosx-10.10.1/ruby-106/ruby/nacl/
H A Ddirent.h10 int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
11 void rewinddir(DIR *dirp);
12 long telldir(DIR *dirp);
13 void seekdir(DIR *dirp, long offset);
/macosx-10.10.1/ksh-23/ksh/src/lib/libast/dir/
H A Dopendir.c46 static DIR* freedirp; /* always keep one dirp */
51 register DIR* dirp = 0;
61 !(dirp = freedirp ? freedirp :
70 if (dirp)
72 if (!freedirp) freedirp = dirp;
73 else free(dirp);
78 dirp->dd_fd = fd;
79 dirp->dd_loc = dirp->dd_size = 0; /* refill needed */
81 dirp
[all...]
H A Dtelldir.c38 telldir(DIR* dirp)
40 return(lseek(dirp->dd_fd, 0L, SEEK_CUR) + (long)dirp->dd_loc);
H A Dreaddir.c40 readdir(register DIR* dirp)
46 if (dirp->dd_loc >= dirp->dd_size)
48 if (dirp->dd_size < 0) return(0);
49 dirp->dd_loc = 0;
50 if ((dirp->dd_size = getdents(dirp->dd_fd, dirp->dd_buf, DIRBLKSIZ)) <= 0)
53 dp = (struct dirent*)((char*)dirp->dd_buf + dirp
[all...]
H A Dseekdir.c41 seekdir(register DIR* dirp, long loc)
46 if (telldir(dirp) != loc)
48 lseek(dirp->dd_fd, 0L, SEEK_SET);
49 dirp->dd_loc = dirp->dd_size = 0;
50 while (telldir(dirp) != loc)
51 if (!readdir(dirp))
H A Drewinddir.c41 rewinddir(DIR* dirp)
43 seekdir(dirp, 0L);
/macosx-10.10.1/ruby-106/ruby/sample/
H A Ddir.rb3 dirp = Dir.open(".")
4 for f in dirp
12 dirp.close
/macosx-10.10.1/tcl-105/tcl84/tcl/compat/
H A Dopendir.c27 register DIR *dirp; local
34 if ((dirp = (DIR *)ckalloc(sizeof(DIR))) == NULL) {
38 dirp->dd_fd = fd;
39 dirp->dd_loc = 0;
40 return dirp;
67 readdir(dirp)
68 register DIR *dirp;
74 if (dirp->dd_loc == 0) {
75 dirp->dd_size = read(dirp
[all...]
H A Ddirent2.h55 extern void closedir _ANSI_ARGS_((DIR *dirp));
57 extern struct dirent * readdir _ANSI_ARGS_((DIR *dirp));
/macosx-10.10.1/tcl-105/tcl/tcl/compat/
H A Dopendir.c25 register DIR *dirp; local
33 dirp = (DIR *) ckalloc(sizeof(DIR));
34 if (dirp == NULL) {
39 dirp->dd_fd = fd;
40 dirp->dd_loc = 0;
41 return dirp;
70 register DIR *dirp)
76 if (dirp->dd_loc == 0) {
77 dirp->dd_size = read(dirp
69 readdir( register DIR *dirp) argument
105 closedir( register DIR *dirp) argument
[all...]
H A Ddirent2.h55 extern void closedir _ANSI_ARGS_((DIR *dirp));
57 extern struct dirent * readdir _ANSI_ARGS_((DIR *dirp));
/macosx-10.10.1/OpenSSH-189/openssh/openbsd-compat/
H A Dbsd-closefrom.c75 DIR *dirp; local
80 if (len > 0 && (size_t)len <= sizeof(fdpath) && (dirp = opendir(fdpath))) {
81 while ((dent = readdir(dirp)) != NULL) {
84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
87 (void) closedir(dirp);
/macosx-10.10.1/sudo-73/src/
H A Dclosefrom.c108 DIR *dirp; local
113 if ((dirp = opendir("/dev/fd")) != NULL) {
114 while ((dent = readdir(dirp)) != NULL) {
117 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp))
120 (void) closedir(dirp);
/macosx-10.10.1/BerkeleyDB-21/db/os/
H A Dos_dir.c29 DIR *dirp; local
46 if ((dirp = opendir(CHAR_STAR_CAST dir)) == NULL)
49 for (arraysz = cnt = 0; (dp = readdir(dirp)) != NULL;) {
87 (void)closedir(dirp);
95 if (dirp != NULL)
96 (void)closedir(dirp);
/macosx-10.10.1/bash-94.1.2/bash-3.2/lib/glob/
H A Dndir.h50 #define rewinddir(dirp) seekdir (dirp, 0L)
/macosx-10.10.1/emacs-93/emacs/src/
H A Dndir.h58 #define rewinddir( dirp ) seekdir( dirp, 0L )
/macosx-10.10.1/man-16/man/src/
H A Dndir.h51 #define rewinddir( dirp ) seekdir( dirp, 0L )

Completed in 124 milliseconds

123456