comparison 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
comparison
equal deleted inserted replaced
381:908a86f940e6 382:064ab7fed2e0
496 key = make_string ((Bufbyte *) keydatum.data, keydatum.size); 496 key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
497 val = make_string ((Bufbyte *) valdatum.data, valdatum.size); 497 val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
498 call2 (func, key, val); 498 call2 (func, key, val);
499 } 499 }
500 #else 500 #else
501 DBC *dbcp; 501 {
502 502 DBC *dbcp;
503 status = dbp->cursor (dbp, NULL, &dbcp); 503
504 for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST); 504 status = dbp->cursor (dbp, NULL, &dbcp);
505 status == 0; 505 for (status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_FIRST);
506 status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT)) 506 status == 0;
507 { 507 status = dbcp->c_get (dbcp, &keydatum, &valdatum, DB_NEXT))
508 /* ### Needs mule-izing */ 508 {
509 key = make_string ((Bufbyte *) keydatum.data, keydatum.size); 509 /* ### Needs mule-izing */
510 val = make_string ((Bufbyte *) valdatum.data, valdatum.size); 510 key = make_string ((Bufbyte *) keydatum.data, keydatum.size);
511 call2 (func, key, val); 511 val = make_string ((Bufbyte *) valdatum.data, valdatum.size);
512 } 512 call2 (func, key, val);
513 dbcp->c_close (dbcp); 513 }
514 dbcp->c_close (dbcp);
515 }
514 #endif /* DB_VERSION_MAJOR */ 516 #endif /* DB_VERSION_MAJOR */
515 } 517 }
516 518
517 static void 519 static void
518 berkdb_close (Lisp_Database *db) 520 berkdb_close (Lisp_Database *db)