CVS update: php31/main
| From: | zeev | Date: | Fri, 21 Aug 1998 01:21:39 +0000 |
| Subject: | CVS update: php31/main | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-381@lists.php.net to get a copy of this message | ||
Date: Thursday August 20, 1998 @ 21:21
Author: zeev
Update of /repository/php31/main
In directory asf:/tmp/cvs-serv18881/main
Modified Files:
control_structures.h language-parser.y main.c main.h tls.h
Log Message:
A first step towards a better world
Index: php31/main/control_structures.h
diff -c php31/main/control_structures.h:2.1 php31/main/control_structures.h:2.2
*** php31/main/control_structures.h:2.1 Thu Aug 13 19:51:11 1998
--- php31/main/control_structures.h Thu Aug 20 21:21:38 1998
***************
*** 29,35 ****
*/
! /* $Id: control_structures.h,v 2.1 1998/08/13 23:51:11 shane Exp $ */
#ifndef _CONTROL_STRUCTURES_H
--- 29,35 ----
*/
! /* $Id: control_structures.h,v 2.2 1998/08/21 01:21:38 zeev Exp $ */
#ifndef _CONTROL_STRUCTURES_H
***************
*** 61,67 ****
#ifndef THREAD_SAFE
extern TokenCacheManager token_cache_manager;
! extern Stack css, input_source_stack, for_stack, function_state_stack,
switch_stack,variable_unassign_stack;
extern int ExecuteFlag, Execute;
extern int php3_display_source;
extern int php3_preprocess;
--- 61,68 ----
#ifndef THREAD_SAFE
extern TokenCacheManager token_cache_manager;
! extern Stack css, input_source_stack, for_stack, function_state_stack, switch_stack;
! extern Stack phpchar_stack, variable_unassign_stack;
extern int ExecuteFlag, Execute;
extern int php3_display_source;
extern int php3_preprocess;
Index: php31/main/language-parser.y
diff -c php31/main/language-parser.y:2.2 php31/main/language-parser.y:2.3
*** php31/main/language-parser.y:2.2 Thu Aug 13 18:48:59 1998
--- php31/main/language-parser.y Thu Aug 20 21:21:38 1998
***************
*** 31,37 ****
*/
! /* $Id: language-parser.y,v 2.2 1998/08/13 22:48:59 shane Exp $ */
/*
--- 31,37 ----
*/
! /* $Id: language-parser.y,v 2.3 1998/08/21 01:21:38 zeev Exp $ */
/*
***************
*** 78,83 ****
--- 78,85 ----
* of the file pointers when include()'ing
* files.
*/
+ Stack phpchar_stack;
+ int *active_phpchar;
Stack function_state_stack; /* Function State Stack, used to keep inforation
* about the function call, such as its
* loop nesting level, symbol table, etc.
***************
*** 268,274 ****
statement_list:
statement_list statement
! | /* empty */
;
--- 270,280 ----
statement_list:
statement_list statement
! | /* empty */ {
! active_phpchar = &yychar;
!
! stack_push(&GLOBAL(phpchar_stack), (void *) &active_phpchar, sizeof(int *));
! }
;
Index: php31/main/main.c
diff -c php31/main/main.c:2.9 php31/main/main.c:2.10
*** php31/main/main.c:2.9 Thu Aug 20 17:50:31 1998
--- php31/main/main.c Thu Aug 20 21:21:38 1998
***************
*** 29,35 ****
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 2.9 1998/08/20 21:50:31 zeev Exp $ */
/* #define CRASH_DETECTION */
--- 29,35 ----
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 2.10 1998/08/21 01:21:38 zeev Exp $ */
/* #define CRASH_DETECTION */
***************
*** 606,611 ****
--- 606,617 ----
}
GLOBAL(initialized) |= INIT_SWITCH_STACK;
+ if (stack_init(&GLOBAL(phpchar_stack)) == FAILURE) {
+ php3_printf("Unable to initialize phpchar stack.\n");
+ return FAILURE;
+ }
+ GLOBAL(initialized) |= INIT_PHPCHAR_STACK;
+
if (stack_init(&GLOBAL(input_source_stack)) == FAILURE) {
php3_printf("Unable to initialize include stack.\n");
return FAILURE;
***************
*** 712,717 ****
--- 718,733 ----
#if 0
debug_log("%d:INIT_SWITCH_STACK\n",GetCurrentThreadId());
#endif
+
+
+ if (GLOBAL(initialized) & INIT_PHPCHAR_STACK) {
+ stack_destroy(GLOBAL(&phpchar_stack));
+ GLOBAL(initialized) &= ~INIT_PHPCHAR_STACK;
+ }
+ #if 0
+ debug_log("%d:INIT_PHPCHAR_STACK\n", GetCurrentThreadId());
+ #endif
+
if (GLOBAL(initialized) & INIT_INCLUDE_STACK) {
clean_input_source_stack();
GLOBAL(initialized) &= ~INIT_INCLUDE_STACK;
Index: php31/main/main.h
diff -c php31/main/main.h:2.2 php31/main/main.h:2.3
*** php31/main/main.h:2.2 Thu Aug 13 18:49:00 1998
--- php31/main/main.h Thu Aug 20 21:21:38 1998
***************
*** 29,35 ****
*/
! /* $Id: main.h,v 2.2 1998/08/13 22:49:00 shane Exp $ */
#ifndef _MAIN_H
--- 29,35 ----
*/
! /* $Id: main.h,v 2.3 1998/08/21 01:21:38 zeev Exp $ */
#ifndef _MAIN_H
***************
*** 57,62 ****
--- 57,63 ----
#define INIT_MODULE_REGISTRY 0x80000
#define INIT_WINSOCK 0x100000
#define INIT_CONSTANTS 0x200000
+ #define INIT_PHPCHAR_STACK 0x400000
#define NORMAL_SHUTDOWN 1
#define NO_SHUTDOWN 0
Index: php31/main/tls.h
diff -c php31/main/tls.h:2.5 php31/main/tls.h:2.6
*** php31/main/tls.h:2.5 Thu Aug 20 20:15:28 1998
--- php31/main/tls.h Thu Aug 20 21:21:38 1998
***************
*** 90,95 ****
--- 90,97 ----
Stack css;
Stack for_stack;
Stack input_source_stack;
+ Stack phpchar_stack;
+ int *active_phpchar;
Stack function_state_stack;
Stack switch_stack;
Stack variable_unassign_stack;
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net