Mercurial > hg > xemacs-beta
comparison src/database.c @ 48:56c54cf7c5b6 r19-16b90
Import from CVS: tag r19-16b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:56:04 +0200 |
parents | 859a2309aef8 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
47:11c6df210d7f | 48:56c54cf7c5b6 |
---|---|
541 int accessmask = 0; | 541 int accessmask = 0; |
542 XEMACS_DB_TYPE the_type; | 542 XEMACS_DB_TYPE the_type; |
543 DB_FUNCS *funcblock; | 543 DB_FUNCS *funcblock; |
544 struct database_struct *dbase = NULL; | 544 struct database_struct *dbase = NULL; |
545 void *db = NULL; | 545 void *db = NULL; |
546 | 546 struct gcpro gcpro1; |
547 CHECK_STRING (file); | 547 |
548 GCPRO1 (file); | |
549 file = Fexpand_file_name (file, Qnil); | |
548 | 550 |
549 if (NILP (ackcess)) | 551 if (NILP (ackcess)) |
550 { | 552 { |
551 accessmask = O_RDWR | O_CREAT; | 553 accessmask = O_RDWR | O_CREAT; |
552 } | 554 } |
621 dbase->ackcess = accessmask; | 623 dbase->ackcess = accessmask; |
622 dbase->db_handle = db; | 624 dbase->db_handle = db; |
623 dbase->funcs = funcblock; | 625 dbase->funcs = funcblock; |
624 XSETDATABASE (retval, dbase); | 626 XSETDATABASE (retval, dbase); |
625 | 627 |
628 UNGCPRO; | |
629 | |
626 return (retval); | 630 return (retval); |
627 } | 631 } |
628 | 632 |
629 DEFUN ("put-database", Fputdatabase, 3, 4, 0, /* | 633 DEFUN ("put-database", Fputdatabase, 3, 4, 0, /* |
630 Store KEY and VAL in DATABASE. If optinal fourth arg REPLACE is | 634 Store KEY and VAL in DATABASE. If optinal fourth arg REPLACE is |