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

/PHP_TRUNK/Zend/
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.c276 ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle) argument
278 zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles); local
280 file_handle->opened_path = NULL;
281 if (file_handle->free_filename) {
282 file_handle->filename = NULL;
497 ZEND_API int open_file_for_scanning(zend_file_handle *file_handle) argument
504 if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
505 if ((offset = ftell(file_handle->handle.fp)) == -1) {
510 if (zend_stream_fixup(file_handle,
514 zend_llist_add_element(&CG(open_files), file_handle); local
574 compile_file(zend_file_handle *file_handle, int type) argument
632 zend_file_handle file_handle; local
800 zend_file_handle file_handle; local
[all...]
H A Dzend_vm_def.h5369 zend_file_handle file_handle; variable
5381 } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
5383 if (!file_handle.opened_path) {
5384 file_handle.opened_path = zend_string_copy(resolved_path);
5387 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
5388 new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
5389 zend_destroy_file_handle(&file_handle); variable
5391 zend_file_handle_dtor(&file_handle); variable
H A Dzend_vm_execute.h3598 zend_file_handle file_handle; local
3610 } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
3612 if (!file_handle.opened_path) {
3613 file_handle.opened_path = zend_string_copy(resolved_path);
3616 if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path)) {
3617 new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE));
3618 zend_destroy_file_handle(&file_handle);
3620 zend_file_handle_dtor(&file_handle);
28968 zend_file_handle file_handle; local
28980 } else if (SUCCESS == zend_stream_open(ZSTR_VAL(resolved_path), &file_handle)) {
40359 zend_file_handle file_handle; local
[all...]
H A Dzend.c1384 zend_file_handle *file_handle; local
1389 file_handle = va_arg(files, zend_file_handle *);
1390 if (!file_handle) {
1394 op_array = zend_compile_file(file_handle, type);
1395 if (file_handle->opened_path) {
1396 zend_hash_add_empty_element(&EG(included_files), file_handle->opened_path);
1398 zend_destroy_file_handle(file_handle);
H A Dzend_dtrace.c27 ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
46 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type) argument
49 DTRACE_COMPILE_FILE_ENTRY(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename);
50 res = compile_file(file_handle, type);
51 DTRACE_COMPILE_FILE_RETURN(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename);
/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/main/
H A Dfopen_wrappers.c355 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle) argument
450 if (zend_stream_open(filename, file_handle) == FAILURE) {
/PHP_TRUNK/ext/standard/
H A Dfile.c1124 zval *file_handle; local
1129 if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs*", &file_handle, &format, &format_len, &args, &argc) == FAILURE) {
1133 what = zend_fetch_resource2(Z_RES_P(file_handle), "File-Handle", php_file_le_stream(), php_file_le_pstream());
H A Dbasic_functions.c5166 zend_file_handle file_handle = {{0}}; local
5174 file_handle.type = ZEND_HANDLE_FILENAME;
5175 file_handle.filename = filename;
5176 file_handle.free_filename = 0;
5177 file_handle.opened_path = NULL;
5179 if (open_file_for_scanning(&file_handle) == FAILURE) {
5187 zend_destroy_file_handle(&file_handle);
/PHP_TRUNK/ext/phar/
H A Dphar.c3254 zend_op_array *(*phar_orig_compile_file)(zend_file_handle *file_handle, int type);
3262 static zend_op_array *phar_compile_file(zend_file_handle *file_handle, int type) /* {{{ */ argument
3269 if (!file_handle || !file_handle->filename) {
3270 return phar_orig_compile_file(file_handle, type);
3272 if (strstr(file_handle->filename, ".phar") && !strstr(file_handle->filename, "://")) {
3273 if (SUCCESS == phar_open_from_filename((char*)file_handle->filename, strlen(file_handle->filename), NULL, 0, 0, &phar, NULL)) {
3275 zend_file_handle f = *file_handle;
[all...]
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);
/PHP_TRUNK/ext/opcache/
H A Dzend_file_cache.c1187 zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handle) argument
1189 zend_string *full_path = file_handle->opened_path;
1237 zend_get_file_handle_timestamp(file_handle, NULL) != info.timestamp) {
H A DZendAccelerator.c112 static zend_op_array *(*accelerator_orig_compile_file)(zend_file_handle *file_handle, int type);
697 static accel_time_t zend_get_file_handle_timestamp_win(zend_file_handle *file_handle, size_t *size) argument
703 if (!file_handle->opened_path) {
722 if (file_handle->opened_path && GetFileAttributesEx(file_handle->opened_path->val, GetFileExInfoStandard, &fdata) != 0) {
741 accel_time_t zend_get_file_handle_timestamp(zend_file_handle *file_handle, size_t *size) argument
750 file_handle->filename == SG(request_info).path_translated) {
763 res = zend_get_file_handle_timestamp_win(file_handle, size);
769 switch (file_handle->type) {
771 if (zend_fstat(file_handle
839 do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handle *file_handle) argument
897 validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file_handle) argument
1091 zend_file_handle file_handle; local
1387 opcache_compile_file(zend_file_handle *file_handle, int type, char *key, unsigned int key_length, zend_op_array **op_array_p) argument
1536 file_cache_compile_file(zend_file_handle *file_handle, int type) argument
1608 persistent_compile_file(zend_file_handle *file_handle, int type) argument
[all...]
/PHP_TRUNK/sapi/cgi/
H A Dcgi_main.c1716 zend_file_handle file_handle; local
2305 file_handle.type = ZEND_HANDLE_FILENAME;
2306 file_handle.filename = SG(request_info).path_translated;
2307 file_handle.handle.fp = NULL;
2309 file_handle.filename = "-";
2310 file_handle.type = ZEND_HANDLE_FP;
2311 file_handle.handle.fp = stdin;
2314 file_handle.opened_path = NULL;
2315 file_handle.free_filename = 0;
2338 if (php_fopen_primary_script(&file_handle)
[all...]
/PHP_TRUNK/sapi/cli/
H A Dphp_cli.c612 static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file, int *lineno) argument
618 file_handle->type = ZEND_HANDLE_FP;
619 file_handle->opened_path = NULL;
620 file_handle->free_filename = 0;
621 if (!(file_handle->handle.fp = VCWD_FOPEN(script_file, "rb"))) {
625 file_handle->filename = script_file;
628 c = fgetc(file_handle->handle.fp);
629 if (c == '#' && (c = fgetc(file_handle->handle.fp)) == '!') {
631 c = fgetc(file_handle->handle.fp); /* skip to end of line */
635 if (fgetc(file_handle
652 zend_file_handle file_handle; local
[all...]
/PHP_TRUNK/sapi/fpm/fpm/
H A Dfpm_main.c1551 zend_file_handle file_handle; local
1924 if (UNEXPECTED(php_fopen_primary_script(&file_handle) == FAILURE)) {
1945 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...]

Completed in 99 milliseconds