Changeset 255
- Timestamp:
- 10/17/2006 08:30:41 PM (7 years ago)
- Location:
- branches/1.1
- Files:
-
- 18 modified
- 1 copied
-
. (modified) (1 prop)
-
NEWS (modified) (2 diffs)
-
THANKS (modified) (1 diff)
-
admin/common.php (modified) (1 diff)
-
admin/config.php.example (modified) (1 diff)
-
config.m4 (modified) (1 diff)
-
coverager.c (modified) (1 diff)
-
coverager/common-zh-simplified-gb2312.lang.php (copied) (copied from trunk/coverager/common-zh-simplified-gb2312.lang.php)
-
coverager/common.php (modified) (1 diff)
-
coverager/config.php.example (modified) (1 diff)
-
coverager/coverager.php (modified) (2 diffs)
-
coverager/coverager.tpl.php (modified) (2 diffs)
-
mkstructinfo.awk (modified) (6 diffs)
-
mmap.c (modified) (2 diffs)
-
processor/head.m4 (modified) (9 diffs)
-
processor/processor.m4 (modified) (1 diff)
-
processor/struct.m4 (modified) (1 diff)
-
xcache-zh-gb2312.ini (modified) (3 diffs)
-
xcache.ini (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1
-
branches/1.1/NEWS
r247 r255 31 31 32 32 Others: 33 * fix build on rare arch 34 * fix build on Mac OS X 33 35 * kill compiler warnings 34 36 * zts build … … 37 39 ChangeLog 38 40 ======== 41 * merged from trunk: 159,161-162,167-180,182,184,186-187,194 42 * [194] PHP_5_2: new element in zend_brk_cont_element 43 * [186] [187] fix build on some rare arch 44 * [184] fix tplcov 45 * [178] fix type processor_t conflict with Mac OS X 39 46 * remove redundant open_basedir check, it's done before compiling 40 47 * trick in_compilation state, don't trigger __autoload at compile time -
branches/1.1/THANKS
r135 r255 3 3 Alex <ale@freebsd.org>, redist to FreeBSD 4 4 darix <darix@irssi.org>, redist to openSUSE 5 judas_iscariote < darix@irssi.org>, redist/test with openSUSE5 judas_iscariote <judas.iscariote@gmail.com>, redist/test with openSUSE 6 6 Finjon Kiang <kiange@gmail.com>, Chinese Traditional translation 7 7 -
branches/1.1/admin/common.php
r134 r255 3 3 function get_language_file_ex($name, $l, $s) 4 4 { 5 static $ map = array(5 static $lmap = array( 6 6 'zh' => 'zh-simplified', 7 7 'zh-hk' => 'zh-traditional', 8 8 'zh-tw' => 'zh-traditional', 9 9 ); 10 static $smap = array( 11 'gbk' => 'gb2312', 12 'gb18030' => 'gb2312', 13 ); 10 14 11 if (isset($ map[$l])) {12 $l = $ map[$l];15 if (isset($lmap[$l])) { 16 $l = $lmap[$l]; 13 17 } 14 18 if (file_exists($file = "$name-$l-$s.lang.php")) { 15 19 return $file; 20 } 21 if (isset($smap[$s])) { 22 $s = $smap[$s]; 23 if (file_exists($file = "$name-$l-$s.lang.php")) { 24 return $file; 25 } 16 26 } 17 27 if (file_exists($file = "$name-$l.lang.php")) { -
branches/1.1/admin/config.php.example
r125 r255 16 16 function ob_filter_path_nicer($o) 17 17 { 18 $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}/", $o); 19 $xcachedir = realpath(dirname(__FILE__) . "/../"); 20 $o = str_replace($xcachedir . "/", "{XCache}/", $o); 21 $o = str_replace("/home/", "{H}/", $o); 18 $sep = DIRECTORY_SEPARATOR; 19 $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}$sep", $o); 20 $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 21 $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); 22 if ($sep == '/') { 23 $o = str_replace("/home/", "{H}/", $o); 24 } 22 25 return $o; 23 26 } -
branches/1.1/config.m4
r148 r255 59 59 60 60 AC_PATH_PROGS([AWK], [gawk awk]) 61 dnl clean locale for gawk 3.1.5 assertion bug 62 if echo | LANG=C "$AWK" -- '' > /dev/null 2>&1 ; then 63 AWK="LANG=C $AWK" 64 else 65 if echo | /usr/bin/env - "$AWK" -- '' > /dev/null 2>&1 ; then 66 AWK="/usr/bin/env - $AWK" 67 fi 68 fi 61 69 PHP_SUBST([AWK]) 62 70 AC_PATH_PROGS([M4], [m4]) 71 if echo | "$M4" -E > /dev/null 2>&1 ; then 72 M4="$M4 -E" 73 fi 63 74 PHP_SUBST([M4]) 64 75 AC_PATH_PROGS([GREP], [grep]) -
branches/1.1/coverager.c
r90 r255 235 235 zend_hash_move_forward(XG(coverages)); 236 236 } 237 efree(outfilename); 237 238 } 238 239 -
branches/1.1/coverager/common.php
r134 r255 3 3 function get_language_file_ex($name, $l, $s) 4 4 { 5 static $ map = array(5 static $lmap = array( 6 6 'zh' => 'zh-simplified', 7 7 'zh-hk' => 'zh-traditional', 8 8 'zh-tw' => 'zh-traditional', 9 9 ); 10 static $smap = array( 11 'gbk' => 'gb2312', 12 'gb18030' => 'gb2312', 13 ); 10 14 11 if (isset($ map[$l])) {12 $l = $ map[$l];15 if (isset($lmap[$l])) { 16 $l = $lmap[$l]; 13 17 } 14 18 if (file_exists($file = "$name-$l-$s.lang.php")) { 15 19 return $file; 20 } 21 if (isset($smap[$s])) { 22 $s = $smap[$s]; 23 if (file_exists($file = "$name-$l-$s.lang.php")) { 24 return $file; 25 } 16 26 } 17 27 if (file_exists($file = "$name-$l.lang.php")) { -
branches/1.1/coverager/config.php.example
r124 r255 21 21 function ob_filter_path_nicer($o) 22 22 { 23 $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}/", $o); 24 $xcachedir = realpath(dirname(__FILE__) . "/../"); 25 $o = str_replace($xcachedir . "/", "{XCache}/", $o); 26 $o = str_replace("/home/", "{H}/", $o); 23 $sep = DIRECTORY_SEPARATOR; 24 $o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}$sep", $o); 25 $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 26 $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); 27 if ($sep == '/') { 28 $o = str_replace("/home/", "{H}/", $o); 29 } 27 30 return $o; 28 31 } -
branches/1.1/coverager/coverager.php
r124 r255 62 62 $this->path = isset($_GET['path']) ? $_GET['path'] : ''; 63 63 $this->path = preg_replace('!\.{2,}!', '.', $this->path); 64 $this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path); 64 $qsep = preg_quote(DIRECTORY_SEPARATOR, '!'); 65 $this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path); 66 $this->path = preg_replace("!$qsep$!", '', $this->path); 65 67 if ($this->path == '/') { 66 68 $this->path = ''; … … 118 120 list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len)); 119 121 if ($tplfile) { 120 $tplcov = sprint_cov($tpl info['tplcov'], $tpllines);122 $tplcov = sprint_cov($tplcov, $tpllines); 121 123 unset($tpllines); 122 124 } -
branches/1.1/coverager/coverager.tpl.php
r145 r255 2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> 4 <meta http-equiv="Content-Language" content="en-us" />5 4 <?php 6 5 echo <<<HEAD … … 68 67 global $cycle; 69 68 if ($info['files'] || $info['todos']) { 69 $srcdir .= DIRECTORY_SEPARATOR; 70 70 $c = $cycle->next(); 71 71 $srcdir_html = htmlspecialchars($srcdir); -
branches/1.1/mkstructinfo.awk
r52 r255 3 3 BEGIN { 4 4 brace = 0; 5 incomment = 0; 5 6 buffer_len = 0; 6 7 } 8 9 # multiline comment handling 10 { 11 # removes one line comment 12 gsub(/\/\*(.+?)\*\//, " "); 13 } 14 /\*\// { 15 if (incomment) { 16 sub(/.*\*\//, ""); 17 incomment = 0; 18 } 19 } 20 incomment { 21 next; 22 } 23 /\/\*/ { 24 sub(/\/\*.*/, ""); 25 incomment = 1; 26 # fall through 27 } 28 29 # skip file/line mark here to be faster 30 /^#/ { 31 next; 32 } 33 7 34 /^}.*;/ { 8 35 if (instruct) { … … 51 78 { 52 79 if (brace == 1 && instruct) { 80 gsub(/(^[\t ]+|[\t ]+$)/, ""); # trim whitespaces 53 81 sub(/.*[{}]/, ""); 54 82 gsub(/\[[^\]]+\]/, ""); # ignore [...] … … 63 91 } 64 92 else { 93 # process normal variables 94 65 95 # ignore any ()s 66 96 while (gsub(/(\([^)]*\))/, "")) { … … 69 99 next; 70 100 } 101 # unsigned int *a, b; int c; 71 102 gsub(/[*]/, " "); 103 # unsigned int a, b; int c; 72 104 gsub(/ +/, " "); 105 # unsigned int a, b; int c; 73 106 gsub(/ *[,;]/, ";"); 107 # unsigned int a; b; int c; 74 108 if (!match($0, /;/)) { 75 109 next; 76 110 } 111 # print "=DEBUG=" $0 "=="; 77 112 split($0, chunks, ";"); 78 # get var of "int *var, var;" etc 79 for (i in chunks) { 113 # [unsigned int a, b, c] 114 115 for (i = 1; i in chunks; i ++) { 80 116 if (chunks[i] == "") { 81 117 delete chunks[i]; … … 83 119 } 84 120 split(chunks[i], pieces, " "); 121 # [unsigned, int, a] 122 # [b] 123 # [c] 85 124 86 for (j in pieces) { 125 last_piece = ""; 126 for (j = 1; j in pieces; j ++) { 87 127 last_piece = pieces[j]; 88 delete pieces[ i];128 delete pieces[j]; 89 129 } 90 130 if (last_piece == "") { 91 print "=====" chunks[i]; 131 # print "=ERROR=" chunks[i] "=="; 132 delete chunks[i]; 133 continue; 92 134 } 135 # a 136 # b 137 # c 138 93 139 buffer[buffer_len] = last_piece; 94 140 buffer_len ++; 95 delete chunks[i] ;141 delete chunks[i] 96 142 } 143 last_piece = ""; 97 144 } 98 145 next; … … 105 152 next; 106 153 } 107 /^typedef struct .*\{ / {154 /^typedef struct .*\{[^}]*$/ { 108 155 brace = 1; 109 156 instruct = 1; -
branches/1.1/mmap.c
r148 r255 85 85 { 86 86 if (shm->diff) { 87 assert(xc_mmap_is_readonly( p));87 assert(xc_mmap_is_readonly(shm, p)); 88 88 p = PTR_SUB(p, shm->diff); 89 89 } 90 assert(xc_mmap_is_readwrite( p));90 assert(xc_mmap_is_readwrite(shm, p)); 91 91 return p; 92 92 } … … 94 94 static XC_SHM_TO_READONLY(xc_mmap_to_readonly) /* {{{ */ 95 95 { 96 assert(xc_ shm_is_readwrite(p));96 assert(xc_mmap_is_readwrite(shm, p)); 97 97 if (shm->diff) { 98 98 p = PTR_ADD(p, shm->diff); 99 assert(xc_mmap_is_readonly( p));99 assert(xc_mmap_is_readonly(shm, p)); 100 100 } 101 101 return p; -
branches/1.1/processor/head.m4
r148 r255 54 54 #define MAX_DUP_STR_LEN 256 55 55 dnl }}} 56 /* export: typedef struct _ processor_tprocessor_t; :export {{{ */57 struct _ processor_t {56 /* export: typedef struct _xc_processor_t xc_processor_t; :export {{{ */ 57 struct _xc_processor_t { 58 58 char *p; 59 59 zend_uint size; … … 117 117 /* {{{ xc_calc_string_n */ 118 118 REDEF(`KIND', `calc') 119 static inline void xc_calc_string_n( processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) {119 static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 120 120 pushdef(`__LINE__', `relayline') 121 121 int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); … … 139 139 /* {{{ xc_store_string_n */ 140 140 REDEF(`KIND', `store') 141 static inline zstr xc_store_string_n( processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) {141 static inline zstr xc_store_string_n(xc_processor_t *processor, zend_uchar type, zstr str, long size IFASSERT(`, int relayline')) { 142 142 pushdef(`__LINE__', `relayline') 143 143 int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size); … … 166 166 * return class_index + 1 167 167 */ 168 static zend_ulong xc_get_class_num( processor_t *processor, zend_class_entry *ce) {168 static zend_ulong xc_get_class_num(xc_processor_t *processor, zend_class_entry *ce) { 169 169 zend_ulong i; 170 170 const xc_entry_t *xce = processor->xce_src; … … 188 188 /* {{{ xc_get_class */ 189 189 #ifdef ZEND_ENGINE_2 190 static zend_class_entry *xc_get_class( processor_t *processor, zend_ulong class_num) {190 static zend_class_entry *xc_get_class(xc_processor_t *processor, zend_ulong class_num) { 191 191 /* must be parent or currrent class */ 192 192 assert(class_num <= processor->active_class_num); … … 197 197 #ifdef ZEND_ENGINE_2 198 198 /* fix method on store */ 199 static void xc_fix_method( processor_t *processor, zend_op_array *dst) /* {{{ */199 static void xc_fix_method(xc_processor_t *processor, zend_op_array *dst) /* {{{ */ 200 200 { 201 201 zend_function *zf = (zend_function *) dst; … … 251 251 xc_entry_t *xc_processor_store_xc_entry_t(xc_entry_t *src TSRMLS_DC) { 252 252 xc_entry_t *dst; 253 processor_t processor;253 xc_processor_t processor; 254 254 255 255 memset(&processor, 0, sizeof(processor)); … … 324 324 /* export: xc_entry_t *xc_processor_restore_xc_entry_t(xc_entry_t *dst, const xc_entry_t *src, zend_bool readonly_protection TSRMLS_DC); :export {{{ */ 325 325 xc_entry_t *xc_processor_restore_xc_entry_t(xc_entry_t *dst, const xc_entry_t *src, zend_bool readonly_protection TSRMLS_DC) { 326 processor_t processor;326 xc_processor_t processor; 327 327 328 328 memset(&processor, 0, sizeof(processor)); … … 335 335 /* export: zval *xc_processor_restore_zval(zval *dst, const zval *src TSRMLS_DC); :export {{{ */ 336 336 zval *xc_processor_restore_zval(zval *dst, const zval *src TSRMLS_DC) { 337 processor_t processor;337 xc_processor_t processor; 338 338 339 339 memset(&processor, 0, sizeof(processor)); -
branches/1.1/processor/processor.m4
r253 r255 56 56 dnl {{{ zend_brk_cont_element 57 57 DEF_STRUCT_P_FUNC(`zend_brk_cont_element', , ` 58 #ifdef ZEND_ENGINE_2_2 59 DISPATCH(int, start) 60 #endif 58 61 DISPATCH(int, cont) 59 62 DISPATCH(int, brk) -
branches/1.1/processor/struct.m4
r93 r255 9 9 FUNC_NAME`'( 10 10 IFDPRINT( `const $1 * const src, int indent') 11 IFCALC( ` processor_t *processor, const $1 * const src')12 IFSTORE( ` processor_t *processor, $1 *dst, const $1 * const src')13 IFRESTORE(` processor_t *processor, $1 *dst, const $1 * const src')11 IFCALC( `xc_processor_t *processor, const $1 * const src') 12 IFSTORE( `xc_processor_t *processor, $1 *dst, const $1 * const src') 13 IFRESTORE(`xc_processor_t *processor, $1 *dst, const $1 * const src') 14 14 IFDASM( `zval *dst, const $1 * const src') 15 15 IFASM( `$1 *dst, const $1 * const src') -
branches/1.1/xcache-zh-gb2312.ini
r149 r255 20 20 [xcache] 21 21 ; ����Ķ���ѡ����� ini �������, �����г��Ķ���Ĭ��ֵ, ��������˵�� 22 23 ; select low level shm/allocator scheme implemenation 24 xcache.shm_scheme = "mmap" 22 25 ; ����: xcache.size=0 23 ; ����: xcache.size= ����>0��ֵ,ͬʱ��ע������ϵͳ mmap ����24 xcache.size = 026 ; ����: xcache.size=64M ֮�� (����>0��ֵ) ͬʱ��ע������ϵͳ mmap ���� 27 xcache.size = 0M 25 28 ; ��������Ϊ cpu �� (cat /proc/cpuinfo |grep -c processor) 26 29 xcache.count = 1 … … 33 36 34 37 ; ͬ��, ֻ����Ա����������� 35 xcache.var_size = 038 xcache.var_size = 0M 36 39 xcache.var_count = 1 37 40 xcache.var_slots = 8K … … 59 62 60 63 xcache.cacher = On 64 xcache.stat = On 61 65 xcache.optimizer = Off 62 66 -
branches/1.1/xcache.ini
r127 r255 2 2 ;; install as zend extension (recommended), normally "$extension_dir/xcache.so" 3 3 zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so 4 ; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so 4 5 ;; For windows users, replace xcache.so with php_xcache.dll 5 6 zend_extension_ts = c:/php/extensions/php_xcache.dll … … 19 20 [xcache] 20 21 ; ini only settings, all the values here is default unless explained 22 23 ; select low level shm/allocator scheme implemenation 24 xcache.shm_scheme = "mmap" 21 25 ; to disable: xcache.size=0 22 ; to enable : xcache.size= any size > 0and your system mmap allows23 xcache.size = 026 ; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows 27 xcache.size = 0M 24 28 ; set to cpu count (cat /proc/cpuinfo |grep -c processor) 25 29 xcache.count = 1 … … 32 36 33 37 ; same as aboves but for variable cache 34 xcache.var_size = 038 xcache.var_size = 0M 35 39 xcache.var_count = 1 36 40 xcache.var_slots = 8K

