Mercurial > hg > xemacs-beta
diff src/database.c @ 382:064ab7fed2e0 r21-2-6
Import from CVS: tag r21-2-6
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:39 +0200 |
parents | 8626e4521993 |
children | 7d59cb494b73 |
line wrap: on
line diff
--- a/src/database.c Mon Aug 13 11:07:11 2007 +0200 +++ b/src/database.c Mon Aug 13 11:07:39 2007 +0200 @@ -498,19 +498,21 @@ call2 (func, key, val); } #else - DBC *dbcp; + { + DBC *dbcp; - status = dbp->cursor (dbp, NULL, &dbcp); - for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST); - status == 0; - status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT)) - { - /* ### Needs mule-izing */ - key = make_string ((Bufbyte *) keydatum.data, keydatum.size); - val = make_string ((Bufbyte *) valdatum.data, valdatum.size); - call2 (func, key, val); - } - dbcp->c_close (dbcp); + status = dbp->cursor (dbp, NULL, &dbcp); + for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST); + status == 0; + status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT)) + { + /* ### Needs mule-izing */ + key = make_string ((Bufbyte *) keydatum.data, keydatum.size); + val = make_string ((Bufbyte *) valdatum.data, valdatum.size); + call2 (func, key, val); + } + dbcp->c_close (dbcp); + } #endif /* DB_VERSION_MAJOR */ }