cvs: php4 /ext/mnogosearch php_mnogo.c

From: Date: Mon, 10 Jun 2002 08:55:17 +0000
Subject: cvs: php4 /ext/mnogosearch php_mnogo.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12278@lists.php.net to get a copy of this message
gluke Mon Jun 10 04:55:17 2002 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: # mnogosearch update. Does not compile at this moment, but # there are not so many things left to fix... Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.54 php4/ext/mnogosearch/php_mnogo.c:1.55 --- php4/ext/mnogosearch/php_mnogo.c:1.54 Thu Jun 6 01:45:40 2002 +++ php4/ext/mnogosearch/php_mnogo.c Mon Jun 10 04:55:17 2002 @@ -1,5 +1,5 @@ /* $Source: /usr/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.54 2002/06/06 05:45:40 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.55 2002/06/10 08:55:17 gluke Exp $ */ /* +----------------------------------------------------------------------+ @@ -1804,7 +1804,7 @@ } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link); #if UDM_VERSION_ID >= 30204 - RETURN_LONG(UdmDBErrorCode(Agent->Conf->db)); + RETURN_LONG(UdmEnvErrCode(Agent->Conf)); #else RETURN_LONG(UdmDBErrorCode(Agent->db)); #endif @@ -1831,7 +1831,7 @@ } ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, -1, "mnoGoSearch-Agent", le_link); #if UDM_VERSION_ID >= 30204 - RETURN_STRING((UdmDBErrorMsg(Agent->Conf->db))?(UdmDBErrorMsg(Agent->Conf->db)):"",1); + RETURN_STRING((UdmEnvErrMsg(Agent->Conf))?(UdmEnvErrMsg(Agent->Conf)):"",1); #else RETURN_STRING((UdmDBErrorMsg(Agent->db))?(UdmDBErrorMsg(Agent->db)):"",1); #endif @@ -1872,7 +1872,11 @@ convert_to_string_ex(yycat); cat = Z_STRVAL_PP(yycat); +#if UDM_VERSION_ID >= 30204 + if(UdmCatList(Agent,c,cat)){ +#else if((c=UdmCatList(Agent,cat))){ +#endif if (array_init(return_value)==FAILURE) { RETURN_FALSE; } @@ -1881,13 +1885,24 @@ RETURN_FALSE; } +#if UDM_VERSION_ID >= 30204 + { + int i; + for(i==0;i<c->ncategories;i++){ + snprintf(buf, UDMSTRSIZ, "%s%s",c->Category[i].link[0]?"@ ":"", c->Category[i].name); + add_next_index_string(return_value, c->Category[i].link[0]?c->Category[i].link:c->Category[i].path, 1); + add_next_index_string(return_value, buf, 1); + c++; + } + } +#else while(c->rec_id){ snprintf(buf, UDMSTRSIZ, "%s%s",c->link[0]?"@ ":"", c->name); add_next_index_string(return_value, c->link[0]?c->link:c->path, 1); add_next_index_string(return_value, buf, 1); c++; } - +#endif free(buf); } else { RETURN_FALSE; @@ -1921,7 +1936,11 @@ convert_to_string_ex(yycat); cat = Z_STRVAL_PP(yycat); +#if UDM_VERSION_ID >= 30204 + if(UdmCatPath(Agent,c,cat)){ +#else if((c=UdmCatPath(Agent,cat))){ +#endif if (array_init(return_value)==FAILURE) { RETURN_FALSE; } @@ -1930,13 +1949,24 @@ RETURN_FALSE; } +#if UDM_VERSION_ID >= 30204 + { + int i; + for(i==0;i<c->ncategories;i++){ + snprintf(buf, UDMSTRSIZ, "%s%s",c->Category[i].link[0]?"@ ":"", c->Category[i].name); + add_next_index_string(return_value, c->Category[i].link[0]?c->Category[i].link:c->Category[i].path, 1); + add_next_index_string(return_value, buf, 1); + c++; + } + } +#else while(c->rec_id){ snprintf(buf, UDMSTRSIZ, "%s%s",c->link[0]?"@ ":"", c->name); add_next_index_string(return_value, c->link[0]?c->link:c->path, 1); add_next_index_string(return_value, buf, 1); c++; } - +#endif free(buf); } else { RETURN_FALSE;

« previous php.cvs (#12278) next »