comparison src/fileio.c @ 25615:c60d7a800e9c

(Fwrite_region): Finish renaming CONFIRM to MUSTBENEW. (Fwrite_region) [DOS_NT]: Handle `excl' here too.
author Richard M. Stallman <rms@gnu.org>
date Thu, 09 Sep 1999 04:24:12 +0000
parents 16a9c3c6f90e
children 0a7261c1d487
comparison
equal deleted inserted replaced
25614:766b6a577f15 25615:c60d7a800e9c
4410 4410
4411 Vlast_coding_system_used = coding.symbol; 4411 Vlast_coding_system_used = coding.symbol;
4412 4412
4413 filename = Fexpand_file_name (filename, Qnil); 4413 filename = Fexpand_file_name (filename, Qnil);
4414 4414
4415 if (! NILP (confirm) && confirm != Qexcl) 4415 if (! NILP (mustbenew) && mustbenew != Qexcl)
4416 barf_or_query_if_file_exists (filename, "overwrite", 1, 0, 1); 4416 barf_or_query_if_file_exists (filename, "overwrite", 1, 0, 1);
4417 4417
4418 if (STRINGP (visit)) 4418 if (STRINGP (visit))
4419 visit_file = Fexpand_file_name (visit, Qnil); 4419 visit_file = Fexpand_file_name (visit, Qnil);
4420 else 4420 else
4544 desc = creat (fn, 0666); 4544 desc = creat (fn, 0666);
4545 } 4545 }
4546 #else /* not VMS */ 4546 #else /* not VMS */
4547 #ifdef DOS_NT 4547 #ifdef DOS_NT
4548 desc = open (fn, 4548 desc = open (fn,
4549 O_WRONLY | O_TRUNC | O_CREAT | buffer_file_type, 4549 O_WRONLY | O_TRUNC | O_CREAT | buffer_file_type
4550 | (mustbenew == Qexcl ? O_EXCL : 0),
4550 S_IREAD | S_IWRITE); 4551 S_IREAD | S_IWRITE);
4551 #else /* not DOS_NT */ 4552 #else /* not DOS_NT */
4552 desc = open (fn, O_WRONLY | O_TRUNC | O_CREAT 4553 desc = open (fn, O_WRONLY | O_TRUNC | O_CREAT
4553 | (confirm == Qexcl ? O_EXCL : 0), 4554 | (mustbenew == Qexcl ? O_EXCL : 0),
4554 auto_saving ? auto_save_mode_bits : 0666); 4555 auto_saving ? auto_save_mode_bits : 0666);
4555 #endif /* not DOS_NT */ 4556 #endif /* not DOS_NT */
4556 #endif /* not VMS */ 4557 #endif /* not VMS */
4557 4558
4558 UNGCPRO; 4559 UNGCPRO;