Lines Matching refs:buf

486 PW32IO wchar_t *php_win32_ioutil_getcwd_w(wchar_t *buf, size_t len)  in php_win32_ioutil_getcwd_w()  argument
493 if (!buf) { in php_win32_ioutil_getcwd_w()
509 buf = tmp_buf; in php_win32_ioutil_getcwd_w()
512 if (!GetCurrentDirectoryW(tmp_len, buf)) { in php_win32_ioutil_getcwd_w()
519 return (wchar_t *)buf; in php_win32_ioutil_getcwd_w()
603 PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w(wchar_t **buf, size_… in php_win32_ioutil_normalize_path_w() argument
605 wchar_t *idx = *buf, canonicalw[MAXPATHLEN], _tmp[MAXPATHLEN], *pos = _tmp; in php_win32_ioutil_normalize_path_w()
614 for (; (size_t)(idx - *buf) <= len; idx++, pos++) { in php_win32_ioutil_normalize_path_w()
632 wchar_t *tmp = realloc(*buf, (ret_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_normalize_path_w()
639 *buf = tmp; in php_win32_ioutil_normalize_path_w()
641 memmove(*buf, canonicalw, (ret_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_normalize_path_w()
860 static int php_win32_ioutil_fstat_int(HANDLE h, php_win32_ioutil_stat_t *buf, const wchar_t *pathw,… in php_win32_ioutil_fstat_int() argument
877 buf->st_dev = _buf.st_dev; in php_win32_ioutil_fstat_int()
878 buf->st_ino = _buf.st_ino; in php_win32_ioutil_fstat_int()
879 buf->st_mode = _buf.st_mode; in php_win32_ioutil_fstat_int()
880 buf->st_nlink = _buf.st_nlink; in php_win32_ioutil_fstat_int()
881 buf->st_uid = _buf.st_uid; in php_win32_ioutil_fstat_int()
882 buf->st_gid = _buf.st_gid; in php_win32_ioutil_fstat_int()
883 buf->st_rdev = _buf.st_rdev; in php_win32_ioutil_fstat_int()
884 buf->st_size = _buf.st_size; in php_win32_ioutil_fstat_int()
885 buf->st_atime = _buf.st_atime; in php_win32_ioutil_fstat_int()
886 buf->st_mtime = _buf.st_mtime; in php_win32_ioutil_fstat_int()
887 buf->st_ctime = _buf.st_ctime; in php_win32_ioutil_fstat_int()
919 buf->st_dev = data->dwVolumeSerialNumber; in php_win32_ioutil_fstat_int()
921 buf->st_rdev = buf->st_uid = buf->st_gid = 0; in php_win32_ioutil_fstat_int()
923 buf->st_ino = (((uint64_t)data->nFileIndexHigh) << 32) + data->nFileIndexLow; in php_win32_ioutil_fstat_int()
925 buf->st_mode = 0; in php_win32_ioutil_fstat_int()
934 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
939 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
946 buf->st_mode |= (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
950 buf->st_mode |= S_IFCHR; in php_win32_ioutil_fstat_int()
953 buf->st_mode |= S_IFIFO; in php_win32_ioutil_fstat_int()
956 buf->st_mode |= S_IFREG; in php_win32_ioutil_fstat_int()
959buf->st_mode |= (data->dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREA… in php_win32_ioutil_fstat_int()
962 buf->st_nlink = data->nNumberOfLinks; in php_win32_ioutil_fstat_int()
967 buf->st_size = (zend_long)t.QuadPart; in php_win32_ioutil_fstat_int()
968 buf->st_atime = FILETIME_TO_TIME_T(data->ftLastAccessTime); in php_win32_ioutil_fstat_int()
969 buf->st_ctime = FILETIME_TO_TIME_T(data->ftCreationTime); in php_win32_ioutil_fstat_int()
970 buf->st_mtime = FILETIME_TO_TIME_T(data->ftLastWriteTime); in php_win32_ioutil_fstat_int()
975 …n32_ioutil_stat_ex_w(const wchar_t *path, size_t path_len, php_win32_ioutil_stat_t *buf, int lstat) in php_win32_ioutil_stat_ex_w() argument
992 ret = php_win32_ioutil_fstat_int(hLink, buf, path, path_len, &data); in php_win32_ioutil_stat_ex_w()
1007 buf->st_mode = S_IFLNK; in php_win32_ioutil_stat_ex_w()
1008buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD… in php_win32_ioutil_stat_ex_w()
1013 buf->st_mode |=; in php_win32_ioutil_stat_ex_w()
1025 PW32IO int php_win32_ioutil_fstat(int fd, php_win32_ioutil_stat_t *buf) in php_win32_ioutil_fstat() argument
1027 return php_win32_ioutil_fstat_int((HANDLE)_get_osfhandle(fd), buf, NULL, 0, NULL); in php_win32_ioutil_fstat()
1030 static ssize_t php_win32_ioutil_readlink_int(HANDLE h, wchar_t *buf, size_t buf_len) in php_win32_ioutil_readlink_int() argument
1139 memcpy(buf, reparse_target, reparse_target_len*sizeof(wchar_t)); in php_win32_ioutil_readlink_int()
1140 buf[reparse_target_len] = L'\0'; in php_win32_ioutil_readlink_int()
1145 PW32IO ssize_t php_win32_ioutil_readlink_w(const wchar_t *path, wchar_t *buf, size_t buf_len) in php_win32_ioutil_readlink_w() argument
1164 ret = php_win32_ioutil_readlink_int(h, buf, buf_len); in php_win32_ioutil_readlink_w()
1207 memcpy(buf, target + offset, (ret + 1)*sizeof(wchar_t)); in php_win32_ioutil_readlink_w()