Lines Matching refs:new_state

1247 	cwd_state new_state;  in virtual_realpath()  local
1253 new_state.cwd = (char*)emalloc(1); in virtual_realpath()
1254 new_state.cwd[0] = '\0'; in virtual_realpath()
1255 new_state.cwd_length = 0; in virtual_realpath()
1260 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_realpath()
1262 new_state.cwd = (char*)emalloc(1); in virtual_realpath()
1263 new_state.cwd[0] = '\0'; in virtual_realpath()
1264 new_state.cwd_length = 0; in virtual_realpath()
1267 if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)==0) { in virtual_realpath()
1268 size_t len = new_state.cwd_length>MAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length; in virtual_realpath()
1270 memcpy(real_path, new_state.cwd, len); in virtual_realpath()
1277 CWD_STATE_FREE(&new_state); in virtual_realpath()
1285 cwd_state new_state; in virtual_filepath_ex() local
1288 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_filepath_ex()
1289 retval = virtual_file_ex(&new_state, path, verify_path, CWD_FILEPATH); in virtual_filepath_ex()
1291 *filepath = new_state.cwd; in virtual_filepath_ex()
1307 cwd_state new_state; in virtual_fopen() local
1314 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_fopen()
1315 if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) { in virtual_fopen()
1316 CWD_STATE_FREE_ERR(&new_state); in virtual_fopen()
1321 f = php_win32_ioutil_fopen(new_state.cwd, mode); in virtual_fopen()
1323 f = fopen(new_state.cwd, mode); in virtual_fopen()
1326 CWD_STATE_FREE_ERR(&new_state); in virtual_fopen()
1334 cwd_state new_state; in virtual_access() local
1337 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_access()
1338 if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) { in virtual_access()
1339 CWD_STATE_FREE_ERR(&new_state); in virtual_access()
1344 ret = tsrm_win32_access(new_state.cwd, mode); in virtual_access()
1346 ret = access(new_state.cwd, mode); in virtual_access()
1349 CWD_STATE_FREE_ERR(&new_state); in virtual_access()
1358 cwd_state new_state; in virtual_utime() local
1361 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_utime()
1362 if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { in virtual_utime()
1363 CWD_STATE_FREE_ERR(&new_state); in virtual_utime()
1368 ret = win32_utime(new_state.cwd, buf); in virtual_utime()
1370 ret = utime(new_state.cwd, buf); in virtual_utime()
1373 CWD_STATE_FREE_ERR(&new_state); in virtual_utime()
1381 cwd_state new_state; in virtual_chmod() local
1384 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_chmod()
1385 if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { in virtual_chmod()
1386 CWD_STATE_FREE_ERR(&new_state); in virtual_chmod()
1402 ret = php_win32_ioutil_chmod(new_state.cwd, mode); in virtual_chmod()
1405 ret = chmod(new_state.cwd, mode); in virtual_chmod()
1408 CWD_STATE_FREE_ERR(&new_state); in virtual_chmod()
1416 cwd_state new_state; in virtual_chown() local
1419 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_chown()
1420 if (virtual_file_ex(&new_state, filename, NULL, CWD_REALPATH)) { in virtual_chown()
1421 CWD_STATE_FREE_ERR(&new_state); in virtual_chown()
1427 ret = lchown(new_state.cwd, owner, group); in virtual_chown()
1432 ret = chown(new_state.cwd, owner, group); in virtual_chown()
1435 CWD_STATE_FREE_ERR(&new_state); in virtual_chown()
1443 cwd_state new_state; in virtual_open() local
1446 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_open()
1447 if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH)) { in virtual_open()
1448 CWD_STATE_FREE_ERR(&new_state); in virtual_open()
1461 f = php_win32_ioutil_open(new_state.cwd, flags, mode); in virtual_open()
1463 f = open(new_state.cwd, flags, mode); in virtual_open()
1467 f = php_win32_ioutil_open(new_state.cwd, flags); in virtual_open()
1469 f = open(new_state.cwd, flags); in virtual_open()
1472 CWD_STATE_FREE_ERR(&new_state); in virtual_open()
1479 cwd_state new_state; in virtual_creat() local
1482 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_creat()
1483 if (virtual_file_ex(&new_state, path, NULL, CWD_FILEPATH)) { in virtual_creat()
1484 CWD_STATE_FREE_ERR(&new_state); in virtual_creat()
1488 f = creat(new_state.cwd, mode); in virtual_creat()
1490 CWD_STATE_FREE_ERR(&new_state); in virtual_creat()
1498 cwd_state new_state; in virtual_rename() local
1508 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_rename()
1509 if (virtual_file_ex(&new_state, newname, NULL, CWD_EXPAND)) { in virtual_rename()
1511 CWD_STATE_FREE_ERR(&new_state); in virtual_rename()
1514 newname = new_state.cwd; in virtual_rename()
1526 CWD_STATE_FREE_ERR(&new_state); in virtual_rename()
1534 cwd_state new_state; in virtual_stat() local
1537 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_stat()
1538 if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) { in virtual_stat()
1539 CWD_STATE_FREE_ERR(&new_state); in virtual_stat()
1543 retval = php_sys_stat(new_state.cwd, buf); in virtual_stat()
1545 CWD_STATE_FREE_ERR(&new_state); in virtual_stat()
1552 cwd_state new_state; in virtual_lstat() local
1555 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_lstat()
1556 if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) { in virtual_lstat()
1557 CWD_STATE_FREE_ERR(&new_state); in virtual_lstat()
1561 retval = php_sys_lstat(new_state.cwd, buf); in virtual_lstat()
1563 CWD_STATE_FREE_ERR(&new_state); in virtual_lstat()
1570 cwd_state new_state; in virtual_unlink() local
1573 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_unlink()
1574 if (virtual_file_ex(&new_state, path, NULL, CWD_EXPAND)) { in virtual_unlink()
1575 CWD_STATE_FREE_ERR(&new_state); in virtual_unlink()
1580 retval = php_win32_ioutil_unlink(new_state.cwd); in virtual_unlink()
1582 retval = unlink(new_state.cwd); in virtual_unlink()
1585 CWD_STATE_FREE_ERR(&new_state); in virtual_unlink()
1592 cwd_state new_state; in virtual_mkdir() local
1595 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_mkdir()
1596 if (virtual_file_ex(&new_state, pathname, NULL, CWD_FILEPATH)) { in virtual_mkdir()
1597 CWD_STATE_FREE_ERR(&new_state); in virtual_mkdir()
1602 retval = php_win32_ioutil_mkdir(new_state.cwd, mode); in virtual_mkdir()
1604 retval = mkdir(new_state.cwd, mode); in virtual_mkdir()
1606 CWD_STATE_FREE_ERR(&new_state); in virtual_mkdir()
1613 cwd_state new_state; in virtual_rmdir() local
1616 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_rmdir()
1617 if (virtual_file_ex(&new_state, pathname, NULL, CWD_EXPAND)) { in virtual_rmdir()
1618 CWD_STATE_FREE_ERR(&new_state); in virtual_rmdir()
1623 retval = php_win32_ioutil_rmdir(new_state.cwd); in virtual_rmdir()
1625 retval = rmdir(new_state.cwd); in virtual_rmdir()
1627 CWD_STATE_FREE_ERR(&new_state); in virtual_rmdir()
1638 cwd_state new_state; in virtual_opendir() local
1641 CWD_STATE_COPY(&new_state, &CWDG(cwd)); in virtual_opendir()
1642 if (virtual_file_ex(&new_state, pathname, NULL, CWD_REALPATH)) { in virtual_opendir()
1643 CWD_STATE_FREE_ERR(&new_state); in virtual_opendir()
1647 retval = opendir(new_state.cwd); in virtual_opendir()
1649 CWD_STATE_FREE_ERR(&new_state); in virtual_opendir()
1719 cwd_state new_state; in tsrm_realpath() local
1724 new_state.cwd = (char*)emalloc(1); in tsrm_realpath()
1725 new_state.cwd[0] = '\0'; in tsrm_realpath()
1726 new_state.cwd_length = 0; in tsrm_realpath()
1732 new_state.cwd = estrdup(cwd); in tsrm_realpath()
1733 new_state.cwd_length = strlen(cwd); in tsrm_realpath()
1735 new_state.cwd = (char*)emalloc(1); in tsrm_realpath()
1736 new_state.cwd[0] = '\0'; in tsrm_realpath()
1737 new_state.cwd_length = 0; in tsrm_realpath()
1740 if (virtual_file_ex(&new_state, path, NULL, CWD_REALPATH)) { in tsrm_realpath()
1741 efree(new_state.cwd); in tsrm_realpath()
1746 size_t copy_len = new_state.cwd_length>MAXPATHLEN-1 ? MAXPATHLEN-1 : new_state.cwd_length; in tsrm_realpath()
1747 memcpy(real_path, new_state.cwd, copy_len); in tsrm_realpath()
1749 efree(new_state.cwd); in tsrm_realpath()
1752 return new_state.cwd; in tsrm_realpath()