comparison src/database.c @ 187:b405438285a2 r20-3b20

Import from CVS: tag r20-3b20
author cvs
date Mon, 13 Aug 2007 09:56:28 +0200
parents 3d6bfa290dbd
children 850242ba4a81
comparison
equal deleted inserted replaced
186:24ac94803b48 187:b405438285a2
510 access rights ACCESS and permissions MODE. ACCESS can be any 510 access rights ACCESS and permissions MODE. ACCESS can be any
511 combination of 'r' 'w' and '+', for read, write, and creation flags. 511 combination of 'r' 'w' and '+', for read, write, and creation flags.
512 */ 512 */
513 (file, type, subtype, access_, mode)) 513 (file, type, subtype, access_, mode))
514 { 514 {
515 /* This function can GC */
515 Lisp_Object retval = Qnil; 516 Lisp_Object retval = Qnil;
516 int modemask; 517 int modemask;
517 int accessmask = 0; 518 int accessmask = 0;
518 struct database *dbase = NULL; 519 struct database *dbase = NULL;
519 char *filename; 520 char *filename;
521 struct gcpro gcpro1, gcpro2;
520 522
521 CHECK_STRING (file); 523 CHECK_STRING (file);
524 GCPRO2 (file, access_);
525 file = Fexpand_file_name (file, Qnil);
526 UNGCPRO;
522 filename = (char *) XSTRING_DATA (file); 527 filename = (char *) XSTRING_DATA (file);
523 528
524 if (NILP (access_)) 529 if (NILP (access_))
525 { 530 {
526 accessmask = O_RDWR | O_CREAT; 531 accessmask = O_RDWR | O_CREAT;