X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ffileio.c;h=e73a2050b3532eac3a5eaf3e2abcf7b9d24de5d4;hb=3f6ecf401c01c83743af2c1e068f57e8d2e2e410;hp=5a6d47753f12b6faaff0a204e808bbcd172bceb8;hpb=82f6d62ee211b1d36e8f45fed3ee3edde82b6916;p=chise%2Fxemacs-chise.git.1 diff --git a/src/fileio.c b/src/fileio.c index 5a6d477..e73a205 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1676,6 +1676,16 @@ barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring, return; } +/* A slightly higher-level interface than `set_file_times' */ +static int +lisp_string_set_file_times (Lisp_Object filename, + EMACS_TIME atime, EMACS_TIME mtime) +{ + char *ext_filename; + LISP_STRING_TO_EXTERNAL (filename, ext_filename, Qfile_name); + return set_file_times (ext_filename, atime, mtime); +} + DEFUN ("copy-file", Fcopy_file, 2, 4, "fCopy file: \nFCopy %s to file: \np\nP", /* Copy FILENAME to NEWNAME. Both args must be strings. @@ -1813,8 +1823,7 @@ A prefix arg makes KEEP-TIME non-nil. EMACS_TIME atime, mtime; EMACS_SET_SECS_USECS (atime, st.st_atime, 0); EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0); - if (set_file_times ((char *) XSTRING_DATA (newname), atime, - mtime)) + if (lisp_string_set_file_times (newname, atime, mtime)) report_file_error ("I/O error", list1 (newname)); } chmod ((const char *) XSTRING_DATA (newname), @@ -2985,7 +2994,7 @@ positions), even in Mule. (Fixing this is very difficult.) occurs inside of the filedesc stream. */ while (1) { - ssize_t this_len; + Lstream_data_count this_len; Charcount cc_inserted; QUIT;