Mercurial > hg > xemacs-beta
comparison src/database.c @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | 3078fd1074e8 |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
142 #endif | 142 #endif |
143 return db; | 143 return db; |
144 } | 144 } |
145 | 145 |
146 static Lisp_Object | 146 static Lisp_Object |
147 mark_database (Lisp_Object obj) | 147 mark_database (Lisp_Object object) |
148 { | 148 { |
149 Lisp_Database *db = XDATABASE (obj); | 149 Lisp_Database *db = XDATABASE (object); |
150 return db->fname; | 150 return db->fname; |
151 } | 151 } |
152 | 152 |
153 static void | 153 static void |
154 print_database (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) | 154 print_database (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) |
176 { | 176 { |
177 Lisp_Database *db = (Lisp_Database *) header; | 177 Lisp_Database *db = (Lisp_Database *) header; |
178 | 178 |
179 if (for_disksave) | 179 if (for_disksave) |
180 { | 180 { |
181 Lisp_Object obj; | 181 Lisp_Object object; |
182 XSETDATABASE (obj, db); | 182 XSETDATABASE (object, db); |
183 | 183 |
184 signal_simple_error | 184 signal_simple_error |
185 ("Can't dump an emacs containing database objects", obj); | 185 ("Can't dump an emacs containing database objects", object); |
186 } | 186 } |
187 db->funcs->close (db); | 187 db->funcs->close (db); |
188 } | 188 } |
189 | 189 |
190 DEFINE_LRECORD_IMPLEMENTATION ("database", database, | 190 DEFINE_LRECORD_IMPLEMENTATION ("database", database, |
224 | 224 |
225 return XDATABASE (database)->funcs->get_subtype (XDATABASE (database)); | 225 return XDATABASE (database)->funcs->get_subtype (XDATABASE (database)); |
226 } | 226 } |
227 | 227 |
228 DEFUN ("database-live-p", Fdatabase_live_p, 1, 1, 0, /* | 228 DEFUN ("database-live-p", Fdatabase_live_p, 1, 1, 0, /* |
229 Return t if OBJ is an active database. | 229 Return t if OBJECT is an active database. |
230 */ | 230 */ |
231 (obj)) | 231 (object)) |
232 { | 232 { |
233 return DATABASEP (obj) && DATABASE_LIVE_P (XDATABASE (obj)) ? Qt : Qnil; | 233 return DATABASEP (object) && DATABASE_LIVE_P (XDATABASE (object)) ? |
234 Qt : Qnil; | |
234 } | 235 } |
235 | 236 |
236 DEFUN ("database-file-name", Fdatabase_file_name, 1, 1, 0, /* | 237 DEFUN ("database-file-name", Fdatabase_file_name, 1, 1, 0, /* |
237 Return the filename associated with the database DATABASE. | 238 Return the filename associated with the database DATABASE. |
238 */ | 239 */ |
242 | 243 |
243 return XDATABASE (database)->fname; | 244 return XDATABASE (database)->fname; |
244 } | 245 } |
245 | 246 |
246 DEFUN ("databasep", Fdatabasep, 1, 1, 0, /* | 247 DEFUN ("databasep", Fdatabasep, 1, 1, 0, /* |
247 Return t if OBJ is a database. | 248 Return t if OBJECT is a database. |
248 */ | 249 */ |
249 (obj)) | 250 (object)) |
250 { | 251 { |
251 return DATABASEP (obj) ? Qt : Qnil; | 252 return DATABASEP (object) ? Qt : Qnil; |
252 } | 253 } |
253 | 254 |
254 #ifdef HAVE_DBM | 255 #ifdef HAVE_DBM |
255 static void | 256 static void |
256 dbm_map (Lisp_Database *db, Lisp_Object func) | 257 dbm_map (Lisp_Database *db, Lisp_Object func) |