CVS update: php3/functions

From: Date: Fri, 09 Apr 1999 09:06:34 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4998@lists.php.net to get a copy of this message
Date: Friday April 9, 1999 @ 5:06 Author: sas Update of /repository/php3/functions In directory asf:/u/temp/cvs-serv22881/functions Modified Files: dba_cdb.c dba.c Log Message: CDB works now Index: php3/functions/dba_cdb.c diff -c php3/functions/dba_cdb.c:1.1 php3/functions/dba_cdb.c:1.2 *** php3/functions/dba_cdb.c:1.1 Fri Apr 9 03:04:33 1999 --- php3/functions/dba_cdb.c Fri Apr 9 05:06:33 1999 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: dba_cdb.c,v 1.1 1999/04/09 07:04:33 sas Exp $ */ #include "php.h" --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: dba_cdb.c,v 1.2 1999/04/09 09:06:33 sas Exp $ */ #include "php.h" *************** *** 69,74 **** --- 69,75 ---- cdb->fd = open(path, gmode); if(cdb->fd < 0) { + efree(cdb); return FAILURE; } *************** *** 133,138 **** --- 134,140 ---- char buf[8]; char *key; + cdb->eod = -1; CSEEK(0); CREAD(4); cdb->eod = cdb_unpack(buf); *************** *** 171,185 **** cdb->pos += 8 + len + cdb_unpack(buf + 4); return nkey; ! #endif /* but this is correct */ CDB_INFO; char *nkey = NULL; ! int len; char buf[8]; if(cdb_seek(cdb->fd, key, strlen(key), &len) == 1) { ! lseek(cdb->fd, (off_t) len, SEEK_CUR); CREAD(8); len = cdb_unpack(buf); --- 173,188 ---- cdb->pos += 8 + len + cdb_unpack(buf + 4); return nkey; ! #else /* but this is correct */ CDB_INFO; char *nkey = NULL; ! uint32 len; char buf[8]; if(cdb_seek(cdb->fd, key, strlen(key), &len) == 1) { ! if(lseek(cdb->fd, (off_t) len, SEEK_CUR) >= (off_t) cdb->eod) ! return NULL; CREAD(8); len = cdb_unpack(buf); *************** *** 190,195 **** --- 193,199 ---- } } return nkey; + #endif } void CDB_FNCT(optimize) Index: php3/functions/dba.c diff -c php3/functions/dba.c:1.1 php3/functions/dba.c:1.2 *** php3/functions/dba.c:1.1 Fri Apr 9 03:04:33 1999 --- php3/functions/dba.c Fri Apr 9 05:06:34 1999 *************** *** 27,33 **** +----------------------------------------------------------------------+ */ ! /* $Id: dba.c,v 1.1 1999/04/09 07:04:33 sas Exp $ */ #include "php.h" #include "php3_list.h" --- 27,33 ---- +----------------------------------------------------------------------+ */ ! /* $Id: dba.c,v 1.2 1999/04/09 09:06:34 sas Exp $ */ #include "php.h" #include "php3_list.h" *************** *** 159,165 **** { dba_handler *hptr; ! PUTS("V1 ($Id: dba.c,v 1.1 1999/04/09 07:04:33 sas Exp $)"); for(hptr = handler; hptr->name; hptr++) { PUTS(" "); PUTS(hptr->name); --- 159,165 ---- { dba_handler *hptr; ! PUTS("V1 ($Id: dba.c,v 1.2 1999/04/09 09:06:34 sas Exp $)"); for(hptr = handler; hptr->name; hptr++) { PUTS(" "); PUTS(hptr->name); *************** *** 213,218 **** --- 213,220 ---- RETURN_FALSE; } + printf("found handler: %s\n", hptr->name); + switch(mode->value.str.val[0]) { case 'w': modenr = DBA_WRITER; *************** *** 231,236 **** --- 233,239 ---- info->hnd = hptr; if(info->hnd->open(info, path->value.str.val, modenr) != SUCCESS) { efree(info); + php3_error(E_WARNING, "driver initialization failed"); RETURN_FALSE; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4998) next »