cvs: php-src /ext/dba/libflatfile flatfile.c

From: Date: Thu, 11 May 2006 20:08:45 +0000
Subject: cvs: php-src /ext/dba/libflatfile flatfile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38162@lists.php.net to get a copy of this message
helly Thu May 11 20:08:45 2006 UTC Modified files: /php-src/ext/dba/libflatfile flatfile.c Log: - Fix build http://cvs.php.net/viewcvs.cgi/php-src/ext/dba/libflatfile/flatfile.c?r1=1.16&r2=1.17&diff_format=u Index: php-src/ext/dba/libflatfile/flatfile.c diff -u php-src/ext/dba/libflatfile/flatfile.c:1.16 php-src/ext/dba/libflatfile/flatfile.c:1.17 --- php-src/ext/dba/libflatfile/flatfile.c:1.16 Sun Feb 19 18:20:51 2006 +++ php-src/ext/dba/libflatfile/flatfile.c Thu May 11 20:08:45 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flatfile.c,v 1.16 2006/02/19 18:20:51 iliaa Exp $ */ +/* $Id: flatfile.c,v 1.17 2006/05/11 20:08:45 helly Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -37,6 +37,8 @@ #include "flatfile.h" +#define _php_stream_gets(stream, buf, len) php_stream_gets(stream, (zstr)((char*)buf), len) + #define FLATFILE_BLOCK_SIZE 1024 /* @@ -88,7 +90,7 @@ char buf[16]; if (flatfile_findkey(dba, key_datum TSRMLS_CC)) { - if (php_stream_gets(dba->fp, buf, sizeof(buf))) { + if (_php_stream_gets(dba->fp, buf, sizeof(buf))) { value_datum.dsize = atoi(buf); value_datum.dptr = safe_emalloc(value_datum.dsize, 1, 1); value_datum.dsize = php_stream_read(dba->fp, value_datum.dptr, value_datum.dsize); @@ -114,7 +116,7 @@ php_stream_rewind(dba->fp); while(!php_stream_eof(dba->fp)) { /* read in the length of the key name */ - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -140,7 +142,7 @@ } /* read in the length of the value */ - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -171,7 +173,7 @@ php_stream_rewind(dba->fp); while (!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -189,7 +191,7 @@ break; } } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -217,7 +219,7 @@ php_stream_rewind(dba->fp); while(!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -235,7 +237,7 @@ res.dsize = num; return res; } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -265,7 +267,7 @@ php_stream_seek(dba->fp, dba->CurrentFlatFilePos, SEEK_SET); while(!php_stream_eof(dba->fp)) { - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -277,7 +279,7 @@ if (num < 0) { break; } - if (!php_stream_gets(dba->fp, buf, 15)) { + if (!_php_stream_gets(dba->fp, buf, 15)) { break; } num = atoi(buf); @@ -306,7 +308,7 @@ /* {{{ flatfile_version */ char *flatfile_version() { - return "1.0, $Revision: 1.16 $"; + return "1.0, $Revision: 1.17 $"; } /* }}} */

« previous php.cvs (#38162) next »