diff options
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/fileio.c b/src/fileio.c index f9923c420a3..7e2d888b227 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -143,9 +143,10 @@ Lisp_Object Qfile_name_history; | |||
| 143 | 143 | ||
| 144 | Lisp_Object Qcar_less_than_car; | 144 | Lisp_Object Qcar_less_than_car; |
| 145 | 145 | ||
| 146 | static int a_write (int, Lisp_Object, int, int, | 146 | static int a_write (int, Lisp_Object, EMACS_INT, EMACS_INT, |
| 147 | Lisp_Object *, struct coding_system *); | 147 | Lisp_Object *, struct coding_system *); |
| 148 | static int e_write (int, Lisp_Object, int, int, struct coding_system *); | 148 | static int e_write (int, Lisp_Object, EMACS_INT, EMACS_INT, |
| 149 | struct coding_system *); | ||
| 149 | 150 | ||
| 150 | 151 | ||
| 151 | void | 152 | void |
| @@ -1805,7 +1806,8 @@ If PRESERVE-SELINUX-CONTEXT is non-nil and SELinux is enabled | |||
| 1805 | on the system, we copy the SELinux context of FILE to NEWNAME. */) | 1806 | on the system, we copy the SELinux context of FILE to NEWNAME. */) |
| 1806 | (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists, Lisp_Object keep_time, Lisp_Object preserve_uid_gid, Lisp_Object preserve_selinux_context) | 1807 | (Lisp_Object file, Lisp_Object newname, Lisp_Object ok_if_already_exists, Lisp_Object keep_time, Lisp_Object preserve_uid_gid, Lisp_Object preserve_selinux_context) |
| 1807 | { | 1808 | { |
| 1808 | int ifd, ofd, n; | 1809 | int ifd, ofd; |
| 1810 | EMACS_INT n; | ||
| 1809 | char buf[16 * 1024]; | 1811 | char buf[16 * 1024]; |
| 1810 | struct stat st, out_st; | 1812 | struct stat st, out_st; |
| 1811 | Lisp_Object handler; | 1813 | Lisp_Object handler; |
| @@ -4792,11 +4794,13 @@ build_annotations (Lisp_Object start, Lisp_Object end) | |||
| 4792 | The return value is negative in case of system call failure. */ | 4794 | The return value is negative in case of system call failure. */ |
| 4793 | 4795 | ||
| 4794 | static int | 4796 | static int |
| 4795 | a_write (int desc, Lisp_Object string, int pos, register int nchars, Lisp_Object *annot, struct coding_system *coding) | 4797 | a_write (int desc, Lisp_Object string, EMACS_INT pos, |
| 4798 | register EMACS_INT nchars, Lisp_Object *annot, | ||
| 4799 | struct coding_system *coding) | ||
| 4796 | { | 4800 | { |
| 4797 | Lisp_Object tem; | 4801 | Lisp_Object tem; |
| 4798 | int nextpos; | 4802 | EMACS_INT nextpos; |
| 4799 | int lastpos = pos + nchars; | 4803 | EMACS_INT lastpos = pos + nchars; |
| 4800 | 4804 | ||
| 4801 | while (NILP (*annot) || CONSP (*annot)) | 4805 | while (NILP (*annot) || CONSP (*annot)) |
| 4802 | { | 4806 | { |
| @@ -4836,7 +4840,8 @@ a_write (int desc, Lisp_Object string, int pos, register int nchars, Lisp_Object | |||
| 4836 | are indexes to the string STRING. */ | 4840 | are indexes to the string STRING. */ |
| 4837 | 4841 | ||
| 4838 | static int | 4842 | static int |
| 4839 | e_write (int desc, Lisp_Object string, int start, int end, struct coding_system *coding) | 4843 | e_write (int desc, Lisp_Object string, EMACS_INT start, EMACS_INT end, |
| 4844 | struct coding_system *coding) | ||
| 4840 | { | 4845 | { |
| 4841 | if (STRINGP (string)) | 4846 | if (STRINGP (string)) |
| 4842 | { | 4847 | { |
| @@ -4867,8 +4872,8 @@ e_write (int desc, Lisp_Object string, int start, int end, struct coding_system | |||
| 4867 | } | 4872 | } |
| 4868 | else | 4873 | else |
| 4869 | { | 4874 | { |
| 4870 | int start_byte = CHAR_TO_BYTE (start); | 4875 | EMACS_INT start_byte = CHAR_TO_BYTE (start); |
| 4871 | int end_byte = CHAR_TO_BYTE (end); | 4876 | EMACS_INT end_byte = CHAR_TO_BYTE (end); |
| 4872 | 4877 | ||
| 4873 | coding->src_multibyte = (end - start) < (end_byte - start_byte); | 4878 | coding->src_multibyte = (end - start) < (end_byte - start_byte); |
| 4874 | if (CODING_REQUIRE_ENCODING (coding)) | 4879 | if (CODING_REQUIRE_ENCODING (coding)) |