Date: 07/30/98
- Next message: Bug Database: "[PHP-DEV] Bug #568 Updated: pg_loreadall does not output all of the data"
- Previous message: jah: "[PHP-DEV] CVS update: php3"
- Next in thread: steffann: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thursday July 30, 1998 @ 19:04
Author: jah
Update of /repository/php3/functions
In directory asf:/tmp/cvs-serv19452/functions
Modified Files:
pgsql.c
Log Message:
Fixed pg_loreadall. Didn't pass through all the contents on some platforms.
Index: php3/functions/pgsql.c
diff -c php3/functions/pgsql.c:1.68 php3/functions/pgsql.c:1.69
*** php3/functions/pgsql.c:1.68 Fri Jul 24 17:00:34 1998
--- php3/functions/pgsql.c Thu Jul 30 19:04:46 1998
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: pgsql.c,v 1.68 1998/07/24 21:00:34 zeev Exp $ */
#include <stdlib.h>
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: pgsql.c,v 1.69 1998/07/30 23:04:46 jah Exp $ */
#include <stdlib.h>
***************
*** 1332,1338 ****
void php3_pgsql_lo_readall(INTERNAL_FUNCTION_PARAMETERS)
{
pval *pgsql_id;
! int i, id, nbytes, tbytes, type;
char buf[8192];
pgLofp *pgsql;
int output=1;
--- 1332,1339 ----
void php3_pgsql_lo_readall(INTERNAL_FUNCTION_PARAMETERS)
{
pval *pgsql_id;
! int i, id, tbytes, type;
! volatile int nbytes;
char buf[8192];
pgLofp *pgsql;
int output=1;
***************
*** 1356,1372 ****
RETURN_FALSE;
}
! output=php3_header();
!
! tbytes = 0;
! while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, 8192))>0) {
! for(i=0; i<nbytes; i++) {
! if (output) PUTC(buf[i]);
}
! tbytes += i;
}
- return_value->value.lval = tbytes;
- return_value->type = IS_LONG;
}
#endif
--- 1357,1382 ----
RETURN_FALSE;
}
! if (php3_header()) {
! tbytes = 0;
! while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, 8192))>0) {
! for(i=0; i<nbytes; i++) {
! if (output) PUTC(buf[i]);
! }
! tbytes += i;
}
! return_value->value.lval = tbytes;
! return_value->type = IS_LONG;
! } else {
! RETURN_FALSE;
}
}
#endif
+
+ /*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */
- Next message: Bug Database: "[PHP-DEV] Bug #568 Updated: pg_loreadall does not output all of the data"
- Previous message: jah: "[PHP-DEV] CVS update: php3"
- Next in thread: steffann: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

