File: modules.h

package info (click to toggle)
php3 3%3A3.0.18-0potato1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,736 kB
  • ctags: 11,198
  • sloc: ansic: 108,120; sh: 2,512; php: 2,024; yacc: 1,887; makefile: 1,038; perl: 537; pascal: 238; awk: 90; cpp: 28; sql: 11
file content (105 lines) | stat: -rw-r--r-- 3,896 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
   +----------------------------------------------------------------------+
   | PHP HTML Embedded Scripting Language Version 3.0                     |
   +----------------------------------------------------------------------+
   | Copyright (c) 1997-2000 PHP Development Team (See Credits file)      |
   +----------------------------------------------------------------------+
   | This program is free software; you can redistribute it and/or modify |
   | it under the terms of one of the following licenses:                 |
   |                                                                      |
   |  A) the GNU General Public License as published by the Free Software |
   |     Foundation; either version 2 of the License, or (at your option) |
   |     any later version.                                               |
   |                                                                      |
   |  B) the PHP License as published by the PHP Development Team and     |
   |     included in the distribution in the file: LICENSE                |
   |                                                                      |
   | This program is distributed in the hope that it will be useful,      |
   | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
   | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
   | GNU General Public License for more details.                         |
   |                                                                      |
   | You should have received a copy of both licenses referred to here.   |
   | If you did not, or have any questions about PHP licensing, please    |
   | contact core@php.net.                                                |
   +----------------------------------------------------------------------+
 */

/* $Id: modules.h,v 1.32 2000/01/01 04:44:07 sas Exp $ */

#ifndef _MODULES_H
#define _MODULES_H

#define INIT_FUNC_ARGS int type, int module_number
#define SHUTDOWN_FUNC_ARGS void
#define STANDARD_MODULE_PROPERTIES 0, 0, 0, NULL, 0

#define MODULE_PERSISTENT 1
#define MODULE_TEMPORARY 2

typedef struct {
	char *name;
	function_entry *functions;
	int (*module_startup_func)(INIT_FUNC_ARGS);
	int (*module_shutdown_func)(void);
	int (*request_startup_func)(INIT_FUNC_ARGS);
	int (*request_shutdown_func)(void);
	void (*info_func)(void);
	int request_started,module_started;
	unsigned char type;
	void *handle;
	int module_number;
} php3_module_entry;


typedef struct {
	char *name;
	php3_module_entry *module;
} php3_builtin_module;

extern HashTable module_registry;

extern void module_destructor(php3_module_entry *module);
extern int module_registry_cleanup(php3_module_entry *module);
extern int module_registry_request_startup(php3_module_entry *module);


/* configuration module */
extern int php3_init_config(void);
extern int php3_shutdown_config(void);

/* environment module */
extern int php3_init_environ(void);
extern int php3_shutdown_environ(void);

/* debugger module */
extern int php3_init_debugger(INIT_FUNC_ARGS);
extern int php3_shutdown_debugger(void);
extern void php3_debugger_error(char *message, int type, char *filename, int lineno);


#ifdef NEW_CODE
/* initial work on taking php3_ini initialization out of main.c, generalizing it,
 * and making it possible for users to override it on a per-script basis.
 *
 * Will *not* make it for 3.0, aim for 3.1 or 3.01
 */
typedef struct {
	char *name;
	int type;
	void *cached_location;
	long lval;
	double dval;
	char *strval;
	int strlen;
} php3_ini_entry;

php3_ini_entry configuration_entries[] =
{
	{ "max_execution_time",		IS_LONG,	&php3_ini.max_execution_time,	30L,	0.0,		NULL,			0 },
	{ "highlight.string",		IS_STRING,	&php3_ini.highlight_string,		0L,		0.0,		"#FFFFFF",		sizeof("#FFFFFF")-1 },
	{ NULL,						0,			NULL,							0L,		0.0,		NULL,			0 }
};
#endif /* new code */

#endif