diff options
| author | Hartmut Holzgraefe <hholzgra@php.net> | 2000-06-16 18:24:02 +0000 |
|---|---|---|
| committer | Hartmut Holzgraefe <hholzgra@php.net> | 2000-06-16 18:24:02 +0000 |
| commit | 87a491d7b64f34a9692af3edc58151e9baa2e275 (patch) | |
| tree | 023b2ac85e2f4ae8951fefe14ccc9c835cfe465a /ext | |
| parent | c6ddfd4440ad412059e49dc69f9c7e98de57d65c (diff) | |
| download | php-git-87a491d7b64f34a9692af3edc58151e9baa2e275.tar.gz | |
C++ // comments are evil ...
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/cpdf/cpdf.c | 2 | ||||
| -rw-r--r-- | ext/dav/dav.c | 2 | ||||
| -rw-r--r-- | ext/domxml/php_domxml.c | 24 | ||||
| -rw-r--r-- | ext/hyperwave/hw.c | 14 | ||||
| -rw-r--r-- | ext/hyperwave/php_hyperwave.h | 2 | ||||
| -rw-r--r-- | ext/icap/php_icap.c | 6 | ||||
| -rw-r--r-- | ext/imap/php_imap.c | 3 | ||||
| -rw-r--r-- | ext/msql/php_msql.c | 4 | ||||
| -rw-r--r-- | ext/mysql/libmysql/config-win32.h | 2 | ||||
| -rw-r--r-- | ext/mysql/libmysql/my_pthread.h | 6 | ||||
| -rw-r--r-- | ext/rpc/com/COM.c | 16 | ||||
| -rw-r--r-- | ext/snmp/winsnmp.c | 2 | ||||
| -rw-r--r-- | ext/standard/info.c | 4 | ||||
| -rw-r--r-- | ext/standard/levenshtein.c | 162 | ||||
| -rw-r--r-- | ext/yaz/php_yaz.c | 2 | ||||
| -rw-r--r-- | ext/zlib/zlib.c | 14 |
16 files changed, 205 insertions, 60 deletions
diff --git a/ext/cpdf/cpdf.c b/ext/cpdf/cpdf.c index 2371d57cd0..ed12dd7cb1 100644 --- a/ext/cpdf/cpdf.c +++ b/ext/cpdf/cpdf.c @@ -360,7 +360,7 @@ PHP_FUNCTION(cpdf_set_viewer_preferences) { RETURN_FALSE; } -// cpdf_setViewerPreferences(pdf, pagemode, 0, 0, 0, 0, 0, 0, pagemode); +/* cpdf_setViewerPreferences(pdf, pagemode, 0, 0, 0, 0, 0, 0, pagemode); */ RETURN_TRUE; } diff --git a/ext/dav/dav.c b/ext/dav/dav.c index 31208a7b46..17c0a6ad25 100644 --- a/ext/dav/dav.c +++ b/ext/dav/dav.c @@ -35,6 +35,8 @@ #if HAVE_MOD_DAV +#error The DAV support in PHP needs to be completely rewritten. Everything has changed + # include "mod_dav.h" #include "ext/standard/info.h" diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 090907a855..94c9f4503c 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -24,7 +24,7 @@ #if HAVE_DOMXML #include "ext/standard/info.h" -//#define newcode +/*#define newcode*/ static int le_domxmldocp; static int le_domxmldtdp; @@ -108,7 +108,7 @@ zend_module_entry php_domxml_module_entry = { }; void _free_node(xmlNode *tmp) { -//fprintf(stderr, "Freeing node: %s\n", tmp->name); +/*fprintf(stderr, "Freeing node: %s\n", tmp->name);*/ } PHP_MINIT_FUNCTION(domxml) @@ -129,7 +129,7 @@ PHP_MINIT_FUNCTION(domxml) */ le_domxmlnodep = register_list_destructors(_free_node, NULL); le_domxmlattrp = register_list_destructors(NULL, NULL); -// le_domxmlnsp = register_list_destructors(NULL, NULL); +/* le_domxmlnsp = register_list_destructors(NULL, NULL); */ INIT_CLASS_ENTRY(domxmldoc_class_entry, "DomDocument", php_domxmldoc_class_functions); INIT_CLASS_ENTRY(domxmldtd_class_entry, "Dtd", php_domxmldtd_class_functions); @@ -320,7 +320,7 @@ PHP_MINFO_FUNCTION(domxml) /* don't know why that line was commented out in the previous version, so i left it (cmv) */ php_info_print_table_start(); php_info_print_table_row(2, "DOM/XML Support", "enabled"); -// php_info_print_table_row(2, "libmxl Version", LIBXML_VERSION ); +/* php_info_print_table_row(2, "libmxl Version", LIBXML_VERSION ); */ php_info_print_table_end(); } @@ -376,7 +376,7 @@ PHP_FUNCTION(domxml_attrname) object_init_ex(pattr, domxmlattr_class_entry_ptr); add_property_resource(pattr, "attribute", ret); add_property_stringl(pattr, "name", (char *) attr->name, strlen(attr->name), 1); -// add_property_stringl(pattr, "content", (char *) attr->val->content, strlen(attr->val->content), 1); +/* add_property_stringl(pattr, "content", (char *) attr->val->content, strlen(attr->val->content), 1); */ zend_hash_next_index_insert(return_value->value.ht, &pattr, sizeof(zval *), NULL); attr = attr->next; } @@ -918,7 +918,7 @@ PHP_FUNCTION(domxml_dumpmem) zval *id, **tmp; int id_to_find; xmlDoc *docp; -// char *mem; +/* char *mem; */ xmlChar *mem; int size; int type; @@ -1181,11 +1181,11 @@ static int node_namespace(zval **attributes, xmlNode *nodep) while(ns) { zval *pattr; MAKE_STD_ZVAL(pattr); -// ret = zend_list_insert(attr, le_domxmlattrp); +/* ret = zend_list_insert(attr, le_domxmlattrp); */ /* construct an object with some methods */ object_init_ex(pattr, domxmlns_class_entry_ptr); -// add_property_resource(pattr, "attribute", ret); +/* add_property_resource(pattr, "attribute", ret); */ if(ns->href) add_property_stringl(pattr, "href", (char *) ns->href, strlen(ns->href), 1); if(ns->prefix) @@ -1214,7 +1214,7 @@ static int node_attributes(zval **attributes, xmlNode *nodep) } /* create an php array for the children */ -// MAKE_STD_ZVAL(*attributes); // Don't do this if *attributes are the return_value +/* MAKE_STD_ZVAL(*attributes); *//* Don't do this if *attributes are the return_value */ if (array_init(*attributes) == FAILURE) { return -1; } @@ -1262,7 +1262,7 @@ static int node_children(zval **children, xmlNode *nodep) /* Each child is a node object */ MAKE_STD_ZVAL(child); -// ret = zend_list_insert(last, le_domxmlnodep); +/* ret = zend_list_insert(last, le_domxmlnodep); */ /* construct a node object for each child */ object_init_ex(child, domxmlnode_class_entry_ptr); @@ -1275,7 +1275,7 @@ static int node_children(zval **children, xmlNode *nodep) add_property_long(child, "type", last->type); if(last->content) add_property_stringl(child, "content", (char *) last->content, strlen(last->content), 1); -// add_property_resource(child, "node", ret); +/* add_property_resource(child, "node", ret); */ /* Get the namespace of the current node and add it as a property */ /* if(!node_namespace(&namespace, last)) @@ -1283,7 +1283,7 @@ static int node_children(zval **children, xmlNode *nodep) */ /* Get the attributes of the current node and add it as a property */ - MAKE_STD_ZVAL(attributes); // Because it was taken out of node_attributes() + MAKE_STD_ZVAL(attributes); /* Because it was taken out of node_attributes() */ if(0 <= node_attributes(&attributes, last)) zend_hash_update(child->value.obj.properties, "attributes", sizeof("attributes"), (void *) &attributes, sizeof(zval *), NULL); diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index 254aaa80d6..f1af66a918 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -42,7 +42,7 @@ #include "php_ini.h" #include "php_hyperwave.h" -//hw_module php_hw_module; +/*hw_module php_hw_module;*/ #define HW_ATTR_NONE 1 #define HW_ATTR_LANG 2 @@ -375,9 +375,11 @@ int make2_return_array_from_objrec(pval **return_value, char *objrec, zval *sarr attrname = php_strtok_r(NULL, "\n", &strtok_buf); } if(NULL == sarr){ -// spec_arr->refcount--; -// zend_hash_destroy(spec_arr->value.ht); -// efree(spec_arr->value.ht); +/* + spec_arr->refcount--; + zend_hash_destroy(spec_arr->value.ht); + efree(spec_arr->value.ht); +*/ zval_dtor(spec_arr); efree(spec_arr); } @@ -546,7 +548,7 @@ static char * make_objrec_from_array(HashTable *lht) { *objrec = '\0'; for(i=0; i<count; i++) { keytype = zend_hash_get_current_key(lht, &key, &length); -// if(HASH_KEY_IS_STRING == keytype) { +/* if(HASH_KEY_IS_STRING == keytype) { */ zend_hash_get_current_data(lht, (void **) &keydataptr); keydata = *keydataptr; switch(keydata->type) { @@ -598,7 +600,7 @@ static char * make_objrec_from_array(HashTable *lht) { if(HASH_KEY_IS_STRING == keytype) efree(key); objrec = realloc(objrec, strlen(objrec)+strlen(str)+1); strcat(objrec, str); -// } +/* } */ zend_hash_move_forward(lht); } return objrec; diff --git a/ext/hyperwave/php_hyperwave.h b/ext/hyperwave/php_hyperwave.h index 067162bd83..bb67d3d28b 100644 --- a/ext/hyperwave/php_hyperwave.h +++ b/ext/hyperwave/php_hyperwave.h @@ -74,7 +74,7 @@ typedef struct { extern PHP_HW_API php_hw_globals hw_globals; #endif -//extern hw_module php_hw_module; +/*extern hw_module php_hw_module;*/ typedef struct { int size; diff --git a/ext/icap/php_icap.c b/ext/icap/php_icap.c index 66d0e60248..86dbc76b6c 100644 --- a/ext/icap/php_icap.c +++ b/ext/icap/php_icap.c @@ -272,8 +272,10 @@ PHP_FUNCTION(icap_reopen) flags = options->value.lval; icap_le_struct->flags = cl_flags; } - // icap_stream = cal_connect(calendar->value.str.val); - // cal_login(icap_stream, calendar->value.str.val); + /* + icap_stream = cal_connect(calendar->value.str.val); + cal_login(icap_stream, calendar->value.str.val); + */ if (icap_stream == NULL) { php_error(E_WARNING,"Couldn't re-open stream\n"); RETURN_FALSE; diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 170d9ed363..120779f150 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -20,6 +20,7 @@ | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | | Chuck Hagenbuch <chuck@horde.org> | | Andrew Skalski <askalski@chekinc.com> | + | Hartmut Holzgraefe <hartmut@six.de> | | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ @@ -1026,6 +1027,8 @@ PHP_FUNCTION(imap_close) } imap_le_struct->flags = flags; } + mail_close_it(imap_le_struct); + zend_list_delete(ind); RETURN_TRUE; } diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c index 0ddbfd7229..0228b7eb0c 100644 --- a/ext/msql/php_msql.c +++ b/ext/msql/php_msql.c @@ -944,7 +944,9 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) add_assoc_stringl(return_value, msql_field->name, data, data_len, should_copy); } } else { - //add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr, 1); + /* + add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr, 1); + */ } } } diff --git a/ext/mysql/libmysql/config-win32.h b/ext/mysql/libmysql/config-win32.h index 3962ebbd0b..e8335739cc 100644 --- a/ext/mysql/libmysql/config-win32.h +++ b/ext/mysql/libmysql/config-win32.h @@ -206,7 +206,7 @@ inline double ulonglong2double(ulonglong value) #define HAVE_ALLOCA #define HAVE_STRPBRK #define HAVE_STRSTR -//#define HAVE_COMPRESS +/*#define HAVE_COMPRESS*/ #ifdef _MSC_VER #define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */ diff --git a/ext/mysql/libmysql/my_pthread.h b/ext/mysql/libmysql/my_pthread.h index 47a058a65c..ad64c59a50 100644 --- a/ext/mysql/libmysql/my_pthread.h +++ b/ext/mysql/libmysql/my_pthread.h @@ -8,7 +8,7 @@ #include <errno.h> #ifndef ETIME -#define ETIME ETIMEDOUT // For FreeBSD +#define ETIME ETIMEDOUT /* For FreeBSD */ #endif #if defined(__WIN32__) @@ -102,8 +102,8 @@ void pthread_exit(unsigned A); /* was #define pthread_exit(A) ExitThread(A)*/ #define pthread_condattr_init(A) #define pthread_condattr_destroy(A) -//Irena: compiler does not like this: -//#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) +/*Irena: compiler does not like this:*/ +/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0)*/ #define my_pthread_getprio(thread_id) pthread_dummy(0) #elif defined(HAVE_UNIXWARE7_THREADS) diff --git a/ext/rpc/com/COM.c b/ext/rpc/com/COM.c index 28d8b48817..4a04547b1b 100644 --- a/ext/rpc/com/COM.c +++ b/ext/rpc/com/COM.c @@ -135,7 +135,7 @@ static char *php_string_from_clsid(CLSID *clsid) char *clsid_str; StringFromCLSID(clsid, &ole_clsid); - //s_clsid = OLE2A(ole_clsid); + /*s_clsid = OLE2A(ole_clsid);*/ clsid_str = php_OLECHAR_to_char(ole_clsid, NULL, 0); LocalFree(ole_clsid); @@ -270,7 +270,7 @@ PHP_FUNCTION(COM_load) hr=CLSIDFromProgID(ProgID, &clsid); efree(ProgID); - // obtain CLSID + /* obtain CLSID */ if (FAILED(hr)) { error_message = php_COM_error_message(hr); php_error(E_WARNING,"Invalid ProgID: %s\n", error_message); @@ -278,7 +278,7 @@ PHP_FUNCTION(COM_load) RETURN_FALSE; } - // obtain IDispatch + /* obtain IDispatch */ if (!server_name) { hr=CoCreateInstance(&clsid, NULL, CLSCTX_SERVER, &IID_IDispatch, (void **) &i_dispatch); } else { @@ -447,15 +447,15 @@ static void php_pval_to_variant(pval *pval_arg, VARIANTARG *var_arg) case IS_LONG: case IS_BOOL: if (pval_arg->is_ref == 0) { - var_arg->vt = VT_I4; // assuming 32-bit platform + var_arg->vt = VT_I4; /* assuming 32-bit platform */ var_arg->lVal = pval_arg->value.lval; } else { - var_arg->vt = VT_I4 | VT_BYREF; // assuming 32-bit platform + var_arg->vt = VT_I4 | VT_BYREF; /* assuming 32-bit platform */ var_arg->plVal = &(pval_arg->value.lval); } break; case IS_DOUBLE: - var_arg->vt = VT_R8; // assuming 64-bit double precision + var_arg->vt = VT_R8; /* assuming 64-bit double precision */ var_arg->dblVal = pval_arg->value.dval; break; case IS_STRING: @@ -523,7 +523,7 @@ int do_COM_invoke(IDispatch *i_dispatch, pval *function_name, VARIANTARG *var_re return FAILURE; } -// variant_args = dispparams.rgvarg; +/* variant_args = dispparams.rgvarg; */ for (current_arg=0; current_arg<arg_count; current_arg++) { current_variant = arg_count - current_arg - 1; @@ -1035,7 +1035,7 @@ static int php_COM_load_typelib(char *typelib_name, int mode) c.flags = mode; zend_register_constant(&c ELS_CC); - //printf("%s -> %ld\n", ids, pVarDesc->lpvarValue->lVal); + /*printf("%s -> %ld\n", ids, pVarDesc->lpvarValue->lVal);*/ j++; } TypeInfo->lpVtbl->Release(TypeInfo); diff --git a/ext/snmp/winsnmp.c b/ext/snmp/winsnmp.c index fd8731b778..45bda9fa9b 100644 --- a/ext/snmp/winsnmp.c +++ b/ext/snmp/winsnmp.c @@ -201,7 +201,7 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) { /* Free the variable bindings that have been allocated.*/ SnmpUtilVarBindListFree(&variableBindings); SnmpUtilOidFree(&root); - } // end if (operation) + } /* end if (operation) */ /* Close SNMP session with the remote agent.*/ diff --git a/ext/standard/info.c b/ext/standard/info.c index c1567e8016..551d52b7cd 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -145,7 +145,7 @@ PHPAPI void php_print_info(int flag) char *zend_version = get_zend_version(); #ifdef PHP_WIN32 - // Get build numbers for Windows NT or Win95 + /* Get build numbers for Windows NT or Win95 */ if (dwVersion < 0x80000000){ dwBuild = (DWORD)(HIWORD(dwVersion)); snprintf(php_windows_uname,255,"%s %d.%d build %d","Windows NT",dwWindowsMajorVersion,dwWindowsMinorVersion,dwBuild); @@ -554,7 +554,7 @@ void register_phpinfo_constants(INIT_FUNC_ARGS) } -/* {{{ proto void phpinfo(void) +/* {{{ proto void phpinfo([int what]) Output a page of useful information about PHP and the current request */ PHP_FUNCTION(phpinfo) { diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index ccb767b6d8..31699be296 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -23,7 +23,8 @@ #include <ctype.h> #include "php_string.h" -static int calc_levdist(const char *s1, const char *s2) /* faster, but obfuscated */ +/* faster, but obfuscated, all operations have a cost of 1 */ +static int fastest_levdist(const char *s1, const char *s2) { register char *p1,*p2; register int i,j,n; @@ -68,7 +69,7 @@ static int calc_levdist(const char *s1, const char *s2) /* faster, but obfuscate /* fill initial row */ - n=(*s1!=*s2); + n=1; for(i=0,p1=r;i<l1;i++,*p1++=n++,p1++) {/*empty*/} /* calc. rowwise */ @@ -84,7 +85,7 @@ static int calc_levdist(const char *s1, const char *s2) /* faster, but obfuscate for(i=1;i<l1;i++) { if(*p1<n) n=*p1+(*(s1+i)!=*(s2)); /* replace cheaper than delete? */ p1++; - if(*++p1<n) n=*p1+1; /* insert cheaper then insert ? */ + if(*++p1<n) n=*p1+1; /* insert cheaper then replace ? */ *p2++=n++; /* update field and cost for next col's delete */ p2++; } @@ -95,26 +96,157 @@ static int calc_levdist(const char *s1, const char *s2) /* faster, but obfuscate } +static int weighted_levdist( const char *s1 + , const char *s2 + , const int cost_ins + , const int cost_rep + , const int cost_del + ) +{ + register int *p1,*p2; + register int i,j,n,c; + int l1=0,l2=0; + int r[512]; + const char *tmp; + + /* skip equal start sequence, if any */ + while(*s1==*s2) { + if(!*s1) break; + s1++; s2++; + } + + /* if we already used up one string, then + the result is the length of the other */ + if(*s1=='\0') return strlen(s2); + if(*s2=='\0') return strlen(s1); + + /* length count */ + while(*s1++) l1++; + while(*s2++) l2++; + + /* cut of equal tail sequence, if any */ + while(*--s1 == *--s2) { + l1--; l2--; + } + + + /* reset pointers, adjust length */ + s1-=l1++; + s2-=l2++; + + + /* possible dist to great? */ + if(abs(l1-l2)>=255) return -1; + + /* swap if l2 longer than l1 */ + if(l1<l2) { + tmp=s1; s1=s2; s2=tmp; + l1 ^= l2; l2 ^= l1; l1 ^= l2; + } + + if((l1==1)&&(l2==1)) { + n= cost_del+cost_ins; + return n<cost_rep?n:cost_rep; + } + + /* fill initial row */ + n=cost_ins; + for(i=0,p1=r;i<l1;i++,*p1++=n,p1++) {n+=cost_ins;} + + /* calc. rowwise */ + for(j=1;j<l2;j++) { + /* init pointers and col#0 */ + p1 = r + !(j&1); + p2 = r + (j&1); + n=*p1+cost_del; + *p2++=n;p2++; + s2++; + + /* foreach column */ + for(i=1;i<l1;i++) { + c = *p1; if(*(s1+i)!=*(s2)) c+=cost_rep; + if(c<n) n=c; /* replace cheaper than delete? */ + p1++; + c= *++p1+cost_ins; + if(c<n) n=c; /* insert cheaper then replace ? */ + *p2++=n; /* update field and cost for next col's delete */ + n+=cost_del; /* update field and cost for next col's delete */ + p2++; + } + } + + /* return result */ + return n-=cost_del; +} + +int custom_levdist(char *str1,char *str2,char *callback_name) +{ + php_error(E_WARNING,"the general Levenshtein support is not there yet"); + /* not there yet */ + + return -1; +} + + /* {{{ proto int levenshtein(string str1, string str2) Calculate Levenshtein distance between two strings */ PHP_FUNCTION(levenshtein) { - zval **str1, **str2; - int l; + zval **str1, **str2, **cost_ins, **cost_rep, **cost_del,**callback_name; + int distance=-1; - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &str1, &str2) == FAILURE) { + switch(ZEND_NUM_ARGS()) { + case 2: /* just two string: use maximum performance version */ + if (zend_get_parameters_ex(2, &str1, &str2) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(str1); + convert_to_string_ex(str2); + + distance = fastest_levdist((*str1)->value.str.val, (*str2)->value.str.val); + break; + + case 5: /* more general version: calc cost by ins/rep/del weights */ + if (zend_get_parameters_ex(5, &str1, &str2, &cost_ins, &cost_rep, &cost_del) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(str1); + convert_to_string_ex(str2); + convert_to_long_ex(cost_ins); + convert_to_long_ex(cost_rep); + convert_to_long_ex(cost_del); + + distance = weighted_levdist((*str1)->value.str.val + , (*str2)->value.str.val + , (*cost_ins)->value.lval + , (*cost_rep)->value.lval + , (*cost_del)->value.lval + ); + + break; + + case 3: /* most general version: calc cost by user-supplied function */ + if (zend_get_parameters_ex(3, &str1, &str2, &callback_name) == FAILURE) { + WRONG_PARAM_COUNT; + } + convert_to_string_ex(str1); + convert_to_string_ex(str2); + convert_to_string_ex(callback_name); + + distance = custom_levdist((*str1)->value.str.val + , (*str2)->value.str.val + , (*callback_name)->value.str.lval + ); + break; + + default: WRONG_PARAM_COUNT; - } - convert_to_string_ex(str1); - convert_to_string_ex(str2); - - l = calc_levdist((*str1)->value.str.val, (*str2)->value.str.val); + } - if(l<0) { + if(distance<0) { php_error(E_WARNING,"levenshtein(): argument string(s) too long"); } - - RETURN_LONG(l); + + RETURN_LONG(distance); } /* }}} */ - diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 045dff67d1..e00bfcfd15 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -1296,7 +1296,7 @@ static void retval_grs1 (zval *return_value, Z_GenericRecord *p) eno[level]++; continue; } - // eno[level]++; + /* eno[level]++; */ *tag = '\0'; for (i = 0; i<=level; i++) diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 7f4b1060f1..b991f35e3d 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -822,12 +822,14 @@ PHP_FUNCTION(gzuncompress) WRONG_PARAM_COUNT; } convert_to_string_ex(data); - - // zlib::uncompress() wants to know the output data length - // if none was given as a parameter - // we try from input length * 2 up to input length * 2^8 - // doubling it whenever it wasn't big enough - // that should be eneugh for all real life cases + + /* + zlib::uncompress() wants to know the output data length + if none was given as a parameter + we try from input length * 2 up to input length * 2^8 + doubling it whenever it wasn't big enough + that should be eneugh for all real life cases + */ do { length=plength?plength:(*data)->value.str.len*(1<<factor++); s2 = (char *) erealloc(s1,length); |
