home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / include / php / ext / standard / basic_functions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  6.0 KB  |  211 lines

  1. /* 
  2.    +----------------------------------------------------------------------+
  3.    | PHP HTML Embedded Scripting Language Version 3.0                     |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997,1998 PHP Development Team (See Credits file)      |
  6.    +----------------------------------------------------------------------+
  7.    | This program is free software; you can redistribute it and/or modify |
  8.    | it under the terms of one of the following licenses:                 |
  9.    |                                                                      |
  10.    |  A) the GNU General Public License as published by the Free Software |
  11.    |     Foundation; either version 2 of the License, or (at your option) |
  12.    |     any later version.                                               |
  13.    |                                                                      |
  14.    |  B) the PHP License as published by the PHP Development Team and     |
  15.    |     included in the distribution in the file: LICENSE                |
  16.    |                                                                      |
  17.    | This program is distributed in the hope that it will be useful,      |
  18.    | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
  19.    | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
  20.    | GNU General Public License for more details.                         |
  21.    |                                                                      |
  22.    | You should have received a copy of both licenses referred to here.   |
  23.    | If you did not, or have any questions about PHP licensing, please    |
  24.    | contact core@php.net.                                                |
  25.    +----------------------------------------------------------------------+
  26.    | Authors: Andi Gutmans <andi@zend.com>                                |
  27.    |          Zeev Suraski <zeev@zend.com>                                |
  28.    +----------------------------------------------------------------------+
  29.  */
  30.  
  31.  
  32. /* $Id: basic_functions.h,v 1.55 2000/06/23 16:21:31 sas Exp $ */
  33.  
  34. #ifndef _BASIC_FUNCTIONS_H
  35. #define _BASIC_FUNCTIONS_H
  36.  
  37. #include <sys/stat.h>
  38.  
  39. #include "zend_highlight.h"
  40.  
  41. extern zend_module_entry basic_functions_module;
  42. #define basic_functions_module_ptr &basic_functions_module
  43.  
  44. PHP_MINIT_FUNCTION(basic);
  45. PHP_MSHUTDOWN_FUNCTION(basic);
  46. PHP_RINIT_FUNCTION(basic);
  47. PHP_RSHUTDOWN_FUNCTION(basic);
  48. PHP_MINFO_FUNCTION(basic);
  49. PHP_GINIT_FUNCTION(basic);
  50.  
  51. PHP_FUNCTION(intval);
  52. PHP_FUNCTION(doubleval);
  53. PHP_FUNCTION(strval);
  54. PHP_FUNCTION(toggle_short_open_tag);
  55. PHP_FUNCTION(sleep);
  56. PHP_FUNCTION(usleep);
  57. PHP_FUNCTION(flush);
  58. PHP_FUNCTION(gettype);
  59. PHP_FUNCTION(settype);
  60. PHP_FUNCTION(ip2long);
  61. PHP_FUNCTION(long2ip);
  62.  
  63. /* system functions */
  64. PHP_FUNCTION(getenv);
  65. PHP_FUNCTION(putenv);
  66.  
  67. PHP_FUNCTION(get_current_user);
  68. PHP_FUNCTION(set_time_limit);
  69.  
  70. PHP_FUNCTION(get_cfg_var);
  71. PHP_FUNCTION(set_magic_quotes_runtime);
  72. PHP_FUNCTION(get_magic_quotes_runtime);
  73. PHP_FUNCTION(get_magic_quotes_gpc);
  74.  
  75. void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int type);
  76. PHP_FUNCTION(is_resource);
  77. PHP_FUNCTION(is_bool);
  78. PHP_FUNCTION(is_long);
  79. PHP_FUNCTION(is_double);
  80. PHP_FUNCTION(is_numeric);
  81. PHP_FUNCTION(is_string);
  82. PHP_FUNCTION(is_array);
  83. PHP_FUNCTION(is_object);
  84.  
  85. PHP_FUNCTION(error_log);
  86.  
  87. PHP_FUNCTION(call_user_func);
  88. PHP_FUNCTION(call_user_method);
  89.  
  90. PHP_FUNCTION(register_shutdown_function);
  91. PHP_FUNCTION(highlight_file);
  92. PHP_FUNCTION(highlight_string);
  93. ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini *syntax_highlighter_ini);
  94.  
  95. PHP_FUNCTION(ini_get);
  96. PHP_FUNCTION(ini_set);
  97. PHP_FUNCTION(ini_restore);
  98.  
  99. PHP_FUNCTION(print_r);
  100.  
  101. PHP_FUNCTION(connection_aborted);
  102. PHP_FUNCTION(connection_timeout);
  103. PHP_FUNCTION(connection_status);
  104. PHP_FUNCTION(ignore_user_abort);
  105.  
  106. PHP_FUNCTION(getservbyname);
  107. PHP_FUNCTION(getservbyport);
  108. PHP_FUNCTION(getprotobyname);
  109. PHP_FUNCTION(getprotobynumber);
  110.  
  111. PHP_NAMED_FUNCTION(php_if_crc32);
  112.  
  113. PHP_FUNCTION(get_loaded_extensions);
  114. PHP_FUNCTION(extension_loaded);
  115. PHP_FUNCTION(get_extension_funcs);
  116.  
  117. PHP_FUNCTION(warn_not_available);
  118.  
  119. /* From the INI parser */
  120. PHP_FUNCTION(parse_ini_file);
  121.  
  122. #ifdef PHP_WIN32
  123. typedef unsigned int php_stat_len;
  124. #else
  125. typedef int php_stat_len;
  126. #endif
  127.  
  128. #if SIZEOF_INT == 4
  129. /* Most 32-bit and 64-bit systems have 32-bit ints */
  130. typedef unsigned int php_uint32;
  131. #elif SIZEOF_LONG == 4
  132. /* 16-bit systems? */
  133. typedef unsigned long php_uint32;
  134. #else
  135. #error Need type which holds 32 bits
  136. #endif
  137.  
  138. #define MT_N (624)
  139.  
  140. typedef struct {
  141.     HashTable *user_shutdown_function_names;
  142.     HashTable putenv_ht;
  143.     char *strtok_string;
  144.     char *locale_string;
  145.     char *strtok_pos1;
  146.     char *strtok_pos2;
  147.     char str_ebuf[40];
  148.     zval **array_walk_func_name;
  149.     zval **user_compare_func_name;
  150.     
  151.     HashTable sm_protected_env_vars;
  152.     char *sm_allowed_env_vars;
  153.  
  154.     /* pageinfo.c */
  155.     long page_uid;
  156.     long page_inode;
  157.     long page_mtime;
  158.  
  159.     /* filestat.c */
  160.     char *CurrentStatFile;
  161.     php_stat_len CurrentStatLength;
  162.     struct stat sb;
  163.     struct stat lsb;
  164.  
  165.     /* rand.c */
  166.     php_uint32   state[MT_N+1];  /* state vector + 1 extra to not violate ANSI C */
  167.     php_uint32   *next;       /* next random value is computed from here */
  168.     int      left;        /* can *next++ this many times before reloading */
  169.  
  170.     /* syslog.c */
  171.     int syslog_started;
  172.     char *syslog_device;
  173.  
  174.     /* var.c */
  175.     zend_class_entry *incomplete_class;
  176. } php_basic_globals;
  177.  
  178. #ifdef ZTS
  179. #define BLS_D php_basic_globals *basic_globals
  180. #define BLS_DC , BLS_D
  181. #define BLS_C basic_globals
  182. #define BLS_CC , BLS_C
  183. #define BG(v) (basic_globals->v)
  184. #define BLS_FETCH() php_basic_globals *basic_globals = ts_resource(basic_globals_id)
  185. extern int basic_globals_id;
  186. #else
  187. #define BLS_D
  188. #define BLS_DC
  189. #define BLS_C
  190. #define BLS_CC
  191. #define BG(v) (basic_globals.v)
  192. #define BLS_FETCH()
  193. extern php_basic_globals basic_globals;
  194. #endif
  195.  
  196. #if HAVE_PUTENV
  197. typedef struct {
  198.     char *putenv_string;
  199.     char *previous_value;
  200.     char *key;
  201.     int key_len;
  202. } putenv_entry;
  203. #endif
  204.  
  205. /* Values are comma-delimited
  206.  */
  207. #define SAFE_MODE_PROTECTED_ENV_VARS    "LD_LIBRARY_PATH"
  208. #define SAFE_MODE_ALLOWED_ENV_VARS        "PHP_"
  209.  
  210. #endif /* _BASIC_FUNCTIONS_H */
  211.