Lines Matching refs:buf
484 PW32IO wchar_t *php_win32_ioutil_getcwd_w(wchar_t *buf, size_t len) in php_win32_ioutil_getcwd_w() argument
491 if (!buf) { in php_win32_ioutil_getcwd_w()
507 buf = tmp_buf; in php_win32_ioutil_getcwd_w()
510 if (!GetCurrentDirectoryW(tmp_len, buf)) { in php_win32_ioutil_getcwd_w()
517 return (wchar_t *)buf; in php_win32_ioutil_getcwd_w()
601 PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w(wchar_t **buf, size_… in php_win32_ioutil_normalize_path_w() argument
603 wchar_t *idx = *buf, canonicalw[MAXPATHLEN], _tmp[MAXPATHLEN], *pos = _tmp; in php_win32_ioutil_normalize_path_w()
612 for (; (size_t)(idx - *buf) <= len; idx++, pos++) { in php_win32_ioutil_normalize_path_w()
630 wchar_t *tmp = realloc(*buf, (ret_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_normalize_path_w()
637 *buf = tmp; in php_win32_ioutil_normalize_path_w()
639 memmove(*buf, canonicalw, (ret_len + 1) * sizeof(wchar_t)); in php_win32_ioutil_normalize_path_w()
858 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
874 buf->st_dev = _buf.st_dev; in php_win32_ioutil_fstat_int()
875 buf->st_ino = _buf.st_ino; in php_win32_ioutil_fstat_int()
876 buf->st_mode = _buf.st_mode; in php_win32_ioutil_fstat_int()
877 buf->st_nlink = _buf.st_nlink; in php_win32_ioutil_fstat_int()
878 buf->st_uid = _buf.st_uid; in php_win32_ioutil_fstat_int()
879 buf->st_gid = _buf.st_gid; in php_win32_ioutil_fstat_int()
880 buf->st_rdev = _buf.st_rdev; in php_win32_ioutil_fstat_int()
881 buf->st_size = _buf.st_size; in php_win32_ioutil_fstat_int()
882 buf->st_atime = _buf.st_atime; in php_win32_ioutil_fstat_int()
883 buf->st_mtime = _buf.st_mtime; in php_win32_ioutil_fstat_int()
884 buf->st_ctime = _buf.st_ctime; in php_win32_ioutil_fstat_int()
916 buf->st_dev = data->dwVolumeSerialNumber; in php_win32_ioutil_fstat_int()
918 buf->st_rdev = buf->st_uid = buf->st_gid = 0; in php_win32_ioutil_fstat_int()
920 buf->st_ino = (((uint64_t)data->nFileIndexHigh) << 32) + data->nFileIndexLow; in php_win32_ioutil_fstat_int()
922 buf->st_mode = 0; in php_win32_ioutil_fstat_int()
931 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
936 buf->st_mode |= (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
943 buf->st_mode |= (S_IFDIR|S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6)); in php_win32_ioutil_fstat_int()
947 buf->st_mode |= S_IFCHR; in php_win32_ioutil_fstat_int()
950 buf->st_mode |= S_IFIFO; in php_win32_ioutil_fstat_int()
953 buf->st_mode |= S_IFREG; in php_win32_ioutil_fstat_int()
956 …buf->st_mode |= (data->dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREA… in php_win32_ioutil_fstat_int()
959 buf->st_nlink = data->nNumberOfLinks; in php_win32_ioutil_fstat_int()
964 buf->st_size = (zend_long)t.QuadPart; in php_win32_ioutil_fstat_int()
965 buf->st_atime = FILETIME_TO_TIME_T(data->ftLastAccessTime); in php_win32_ioutil_fstat_int()
966 buf->st_ctime = FILETIME_TO_TIME_T(data->ftCreationTime); in php_win32_ioutil_fstat_int()
967 buf->st_mtime = FILETIME_TO_TIME_T(data->ftLastWriteTime); in php_win32_ioutil_fstat_int()
972 …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
989 ret = php_win32_ioutil_fstat_int(hLink, buf, path, path_len, &data); in php_win32_ioutil_stat_ex_w()
1004 buf->st_mode = S_IFLNK; in php_win32_ioutil_stat_ex_w()
1005 …buf->st_mode |= (data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? (S_IREAD|(S_IREAD>>3)|(S_IREAD… in php_win32_ioutil_stat_ex_w()
1010 buf->st_mode |=; in php_win32_ioutil_stat_ex_w()
1022 PW32IO int php_win32_ioutil_fstat(int fd, php_win32_ioutil_stat_t *buf) in php_win32_ioutil_fstat() argument
1024 return php_win32_ioutil_fstat_int((HANDLE)_get_osfhandle(fd), buf, NULL, 0, NULL); in php_win32_ioutil_fstat()
1027 static ssize_t php_win32_ioutil_readlink_int(HANDLE h, wchar_t *buf, size_t buf_len) in php_win32_ioutil_readlink_int() argument
1136 memcpy(buf, reparse_target, reparse_target_len*sizeof(wchar_t)); in php_win32_ioutil_readlink_int()
1137 buf[reparse_target_len] = L'\0'; in php_win32_ioutil_readlink_int()
1142 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
1161 ret = php_win32_ioutil_readlink_int(h, buf, buf_len); in php_win32_ioutil_readlink_w()
1204 memcpy(buf, target + offset, (ret + 1)*sizeof(wchar_t)); in php_win32_ioutil_readlink_w()