Searched defs:file_handle (Results 1 - 18 of 18) sorted by relevance

/PHP_TRUNK/Zend/
H A Dzend_dtrace.c41 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type) argument
44 DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, (char *)file_handle->filename);
45 res = compile_file(file_handle, type);
46 DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, (char *)file_handle->filename);
H A Dzend_stream.c102 static inline int zend_stream_is_mmap(zend_file_handle *file_handle) { /* {{{ */ argument
103 return file_handle->type == ZEND_HANDLE_MAPPED;
106 static size_t zend_stream_fsize(zend_file_handle *file_handle) /* {{{ */ argument
110 if (zend_stream_is_mmap(file_handle)) {
111 return file_handle->handle.stream.mmap.len;
113 if (file_handle->type == ZEND_HANDLE_STREAM || file_handle->type == ZEND_HANDLE_MAPPED) {
114 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle);
116 if (file_handle
143 zend_stream_getc(zend_file_handle *file_handle) argument
153 zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len) argument
180 zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t *len) argument
[all...]
H A Dzend_language_scanner.c271 ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle) argument
273 zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles); local
275 file_handle->opened_path = NULL;
276 if (file_handle->free_filename) {
277 file_handle->filename = NULL;
485 ZEND_API int open_file_for_scanning(zend_file_handle *file_handle) argument
492 if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
493 if ((offset = ftell(file_handle->handle.fp)) == -1) {
498 if (zend_stream_fixup(file_handle,
502 zend_llist_add_element(&CG(open_files), file_handle); local
562 compile_file(zend_file_handle *file_handle, int type) argument
615 zend_file_handle file_handle; local
778 zend_file_handle file_handle; local
[all...]
H A Dzend.c1376 zend_file_handle *file_handle; local
1381 file_handle = va_arg(files, zend_file_handle *);
1382 if (!file_handle) {
1386 op_array = zend_compile_file(file_handle, type);
1387 if (file_handle->opened_path) {
1388 zend_hash_add_empty_element(&EG(included_files), file_handle->opened_path);
1390 zend_destroy_file_handle(file_handle);
H A Dzend_vm_def.h5317 zend_file_handle file_handle; variable
5329 } else if (SUCCESS == zend_stream_open(resolved_path->val, &file_handle)) {
5331 if (!file_handle.opened_path) {
5332 file_handle.opened_path = zend_string_copy(resolved_path);
5335 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
5336 new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
5337 zend_destroy_file_handle(&file_handle); variable
5339 zend_file_handle_dtor(&file_handle); variable
H A Dzend_vm_execute.h3527 zend_file_handle file_handle; local
3539 } else if (SUCCESS == zend_stream_open(resolved_path->val, &file_handle)) {
3541 if (!file_handle.opened_path) {
3542 file_handle.opened_path = zend_string_copy(resolved_path);
3545 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
3546 new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
3547 zend_destroy_file_handle(&file_handle);
3549 zend_file_handle_dtor(&file_handle);
28458 zend_file_handle file_handle; local
28470 } else if (SUCCESS == zend_stream_open(resolved_path->val, &file_handle)) {
39722 zend_file_handle file_handle; local
[all...]
/PHP_TRUNK/sapi/nsapi/
H A Dnsapi.c962 zend_file_handle file_handle = {0}; local
1033 file_handle.type = ZEND_HANDLE_FILENAME;
1034 file_handle.filename = SG(request_info).path_translated;
1035 file_handle.free_filename = 0;
1036 file_handle.opened_path = NULL;
1041 php_execute_script(&file_handle);
/PHP_TRUNK/sapi/litespeed/
H A Dlsapi_main.c480 static int lsapi_chdir_primary_script( zend_file_handle * file_handle )
489 p = strrchr( file_handle->filename, '/' );
493 if ( strcmp( file_handle->filename, s_cur_chdir ) != 0 ) {
494 chdir( file_handle->filename );
500 ( strcmp( file_handle->filename, CWDG(cwd).cwd ) != 0 ) ) {
501 CWDG(cwd).cwd_length = p - file_handle->filename;
503 memmove( CWDG(cwd).cwd, file_handle->filename, CWDG(cwd).cwd_length+1 );
507 /* virtual_file_ex(&CWDG(cwd), file_handle->filename, NULL, CWD_REALPATH); */
509 VCWD_CHDIR_FILE( file_handle->filename );
514 static int lsapi_fopen_primary_script( zend_file_handle * file_handle )
534 lsapi_execute_script( zend_file_handle * file_handle) argument
561 zend_file_handle file_handle = {0}; local
842 zend_file_handle file_handle = {0}; local
[all...]
/PHP_TRUNK/ext/spl/
H A Dphp_spl.c253 zend_file_handle file_handle; local
271 ret = php_stream_open_for_zend_ex(class_file, &file_handle, USE_PATH|STREAM_OPEN_FOR_INCLUDE);
275 if (!file_handle.opened_path) {
276 file_handle.opened_path = zend_string_init(class_file, class_file_len, 0);
278 opened_path = zend_string_copy(file_handle.opened_path);
281 new_op_array = zend_compile_file(&file_handle, ZEND_REQUIRE);
282 zend_destroy_file_handle(&file_handle);
285 zend_file_handle_dtor(&file_handle);
/PHP_TRUNK/sapi/cgi/
H A Dcgi_main.c1706 zend_file_handle file_handle; local
2285 file_handle.type = ZEND_HANDLE_FILENAME;
2286 file_handle.filename = SG(request_info).path_translated;
2287 file_handle.handle.fp = NULL;
2289 file_handle.filename = "-";
2290 file_handle.type = ZEND_HANDLE_FP;
2291 file_handle.handle.fp = stdin;
2294 file_handle.opened_path = NULL;
2295 file_handle.free_filename = 0;
2318 if (php_fopen_primary_script(&file_handle)
[all...]
/PHP_TRUNK/sapi/cli/
H A Dphp_cli.c608 static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file, int *lineno) argument
614 file_handle->type = ZEND_HANDLE_FP;
615 file_handle->opened_path = NULL;
616 file_handle->free_filename = 0;
617 if (!(file_handle->handle.fp = VCWD_FOPEN(script_file, "rb"))) {
621 file_handle->filename = script_file;
624 c = fgetc(file_handle->handle.fp);
625 if (c == '#' && (c = fgetc(file_handle->handle.fp)) == '!') {
627 c = fgetc(file_handle->handle.fp); /* skip to end of line */
631 if (fgetc(file_handle
648 zend_file_handle file_handle; local
[all...]
/PHP_TRUNK/sapi/fpm/fpm/
H A Dfpm_main.c1505 zend_file_handle file_handle; local
1870 if (php_fopen_primary_script(&file_handle) == FAILURE) {
1891 php_execute_script(&file_handle);
/PHP_TRUNK/main/
H A Dfopen_wrappers.c359 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle) argument
454 if (zend_stream_open(filename, file_handle) == FAILURE) {
/PHP_TRUNK/ext/opcache/
H A DZendAccelerator.c106 static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type);
684 static accel_time_t zend_get_file_handle_timestamp_win(zend_file_handle *file_handle, size_t *size) argument
690 if (!file_handle->opened_path) {
709 if (file_handle->opened_path && GetFileAttributesEx(file_handle->opened_path->val, GetFileExInfoStandard, &fdata) != 0) {
728 static accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size) argument
737 file_handle->filename == SG(request_info).path_translated) {
750 res = zend_get_file_handle_timestamp_win(file_handle, size);
756 switch (file_handle->type) {
758 if (zend_fstat(file_handle
826 do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handle *file_handle) argument
884 validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle) argument
1092 zend_file_handle file_handle; local
1316 compile_and_cache_file(zend_file_handle *file_handle, int type, char *key, unsigned int key_length, zend_op_array **op_array_p, int *from_shared_memory) argument
1465 persistent_compile_file(zend_file_handle *file_handle, int type) argument
[all...]
/PHP_TRUNK/ext/phar/
H A Dphar_object.c154 zend_file_handle file_handle; local
233 file_handle.type = ZEND_HANDLE_FILENAME;
234 file_handle.handle.fd = 0;
235 file_handle.filename = name;
236 file_handle.opened_path = NULL;
237 file_handle.free_filename = 0;
259 new_op_array = zend_compile_file(&file_handle, ZEND_REQUIRE);
265 zend_destroy_file_handle(&file_handle);
H A Dphar.c3253 zend_op_array *(*phar_orig_compile_file)(zend_file_handle *file_handle, int type);
3261 static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type) /* {{{ */ argument
3268 if (!file_handle || !file_handle->filename) {
3269 return phar_orig_compile_file(file_handle, type);
3271 if (strstr(file_handle->filename, ".phar") && !strstr(file_handle->filename, "://")) {
3272 if (SUCCESS == phar_open_from_filename((char*)file_handle->filename, strlen(file_handle->filename), NULL, 0, 0, &phar, NULL)) {
3274 zend_file_handle f = *file_handle;
[all...]
/PHP_TRUNK/ext/standard/
H A Dfile.c1150 zval *file_handle; local
1155 if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs*", &file_handle, &format, &format_len, &args, &argc) == FAILURE) {
1159 what = zend_fetch_resource2(Z_RES_P(file_handle), "File-Handle", php_file_le_stream(), php_file_le_pstream());
H A Dbasic_functions.c5141 zend_file_handle file_handle = {{0}}; local
5149 file_handle.type = ZEND_HANDLE_FILENAME;
5150 file_handle.filename = filename;
5151 file_handle.free_filename = 0;
5152 file_handle.opened_path = NULL;
5154 if (open_file_for_scanning(&file_handle) == FAILURE) {
5162 zend_destroy_file_handle(&file_handle);

Completed in 103 milliseconds