Lines Matching refs:dp

30 	DIR *dp;  in opendir()  local
70 dp = (DIR *) calloc(1, sizeof(DIR) + (_MAX_FNAME*5+1)*sizeof(char)); in opendir()
71 if (dp == NULL) { in opendir()
77 …if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch,… in opendir()
80 dp->finished = 1; in opendir()
82 free(dp); in opendir()
88 dp->dirw = _wcsdup(resolvedw); in opendir()
89 dp->handle = handle; in opendir()
90 dp->offset = 0; in opendir()
91 dp->finished = 0; in opendir()
96 return dp; in opendir()
99 struct dirent *readdir(DIR *dp) in readdir() argument
104 if (!dp || dp->finished) in readdir()
107 if (dp->offset != 0) { in readdir()
108 if (FindNextFileW(dp->handle, &(dp->fileinfo)) == 0) { in readdir()
109 dp->finished = 1; in readdir()
114 _tmp = php_win32_cp_conv_w_to_any(dp->fileinfo.cFileName, PHP_WIN32_CP_IGNORE_LEN, &reclen); in readdir()
119 memmove(dp->dent.d_name, _tmp, reclen + 1); in readdir()
121 dp->dent.d_reclen = (unsigned short)reclen; in readdir()
123 dp->offset++; in readdir()
125 dp->dent.d_ino = 1; in readdir()
126 dp->dent.d_off = dp->offset; in readdir()
128 return &(dp->dent); in readdir()
131 int closedir(DIR *dp) in closedir() argument
133 if (!dp) in closedir()
137 if (dp->handle != INVALID_HANDLE_VALUE) { in closedir()
138 FindClose(dp->handle); in closedir()
140 if (dp->dirw) in closedir()
141 free(dp->dirw); in closedir()
142 if (dp) in closedir()
143 free(dp); in closedir()
148 int rewinddir(DIR *dp) in rewinddir() argument
156 FindClose(dp->handle); in rewinddir()
158 dp->offset = 0; in rewinddir()
159 dp->finished = 0; in rewinddir()
162 dirw_len = wcslen((wchar_t *)dp->dirw); in rewinddir()
164 …w_len >= 3 && PHP_WIN32_IOUTIL_IS_LETTERW(dp->dirw[0]) && L':' == dp->dirw[1] && PHP_WIN32_IOUTIL_… in rewinddir()
178 wcscpy(filespecw + PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW, dp->dirw); in rewinddir()
181 wcscpy(filespecw, dp->dirw); in rewinddir()
190 …if ((handle = FindFirstFileExW(filespecw, FindExInfoBasic, &(dp->fileinfo), FindExSearchNameMatch,… in rewinddir()
191 dp->finished = 1; in rewinddir()
195 dp->handle = handle; in rewinddir()