aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/coding.c b/src/coding.c
index 0c2836c19f6..9e28a1c9f9b 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -853,8 +853,7 @@ static unsigned char *alloc_destination (struct coding_system *,
853 EMACS_INT, unsigned char *); 853 EMACS_INT, unsigned char *);
854static void setup_iso_safe_charsets (Lisp_Object); 854static void setup_iso_safe_charsets (Lisp_Object);
855static unsigned char *encode_designation_at_bol (struct coding_system *, 855static unsigned char *encode_designation_at_bol (struct coding_system *,
856 int *, int *, 856 int *, unsigned char *);
857 unsigned char *);
858static int detect_eol (const unsigned char *, 857static int detect_eol (const unsigned char *,
859 EMACS_INT, enum coding_category); 858 EMACS_INT, enum coding_category);
860static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); 859static Lisp_Object adjust_coding_eol_type (struct coding_system *, int);
@@ -4299,7 +4298,7 @@ encode_invocation_designation (struct charset *charset,
4299 4298
4300static unsigned char * 4299static unsigned char *
4301encode_designation_at_bol (struct coding_system *coding, int *charbuf, 4300encode_designation_at_bol (struct coding_system *coding, int *charbuf,
4302 int *charbuf_end, unsigned char *dst) 4301 unsigned char *dst)
4303{ 4302{
4304 struct charset *charset; 4303 struct charset *charset;
4305 /* Table of charsets to be designated to each graphic register. */ 4304 /* Table of charsets to be designated to each graphic register. */
@@ -4390,7 +4389,7 @@ encode_coding_iso_2022 (struct coding_system *coding)
4390 unsigned char *dst_prev = dst; 4389 unsigned char *dst_prev = dst;
4391 4390
4392 /* We have to produce designation sequences if any now. */ 4391 /* We have to produce designation sequences if any now. */
4393 dst = encode_designation_at_bol (coding, charbuf, charbuf_end, dst); 4392 dst = encode_designation_at_bol (coding, charbuf, dst);
4394 bol_designation = 0; 4393 bol_designation = 0;
4395 /* We are sure that designation sequences are all ASCII bytes. */ 4394 /* We are sure that designation sequences are all ASCII bytes. */
4396 produced_chars += dst - dst_prev; 4395 produced_chars += dst - dst_prev;
@@ -5266,11 +5265,12 @@ encode_coding_raw_text (struct coding_system *coding)
5266 unsigned char str[MAX_MULTIBYTE_LENGTH], *p0 = str, *p1 = str; 5265 unsigned char str[MAX_MULTIBYTE_LENGTH], *p0 = str, *p1 = str;
5267 5266
5268 CHAR_STRING_ADVANCE (c, p1); 5267 CHAR_STRING_ADVANCE (c, p1);
5269 while (p0 < p1) 5268 do
5270 { 5269 {
5271 EMIT_ONE_BYTE (*p0); 5270 EMIT_ONE_BYTE (*p0);
5272 p0++; 5271 p0++;
5273 } 5272 }
5273 while (p0 < p1);
5274 } 5274 }
5275 } 5275 }
5276 else 5276 else
@@ -9299,7 +9299,7 @@ function to call for FILENAME, that function should examine the
9299contents of BUFFER instead of reading the file. 9299contents of BUFFER instead of reading the file.
9300 9300
9301usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) 9301usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9302 (int nargs, Lisp_Object *args) 9302 (size_t nargs, Lisp_Object *args)
9303{ 9303{
9304 Lisp_Object operation, target_idx, target, val; 9304 Lisp_Object operation, target_idx, target, val;
9305 register Lisp_Object chain; 9305 register Lisp_Object chain;
@@ -9308,17 +9308,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9308 error ("Too few arguments"); 9308 error ("Too few arguments");
9309 operation = args[0]; 9309 operation = args[0];
9310 if (!SYMBOLP (operation) 9310 if (!SYMBOLP (operation)
9311 || !INTEGERP (target_idx = Fget (operation, Qtarget_idx))) 9311 || !NATNUMP (target_idx = Fget (operation, Qtarget_idx)))
9312 error ("Invalid first argument"); 9312 error ("Invalid first argument");
9313 if (nargs < 1 + XINT (target_idx)) 9313 if (nargs < 1 + XFASTINT (target_idx))
9314 error ("Too few arguments for operation: %s", 9314 error ("Too few arguments for operation: %s",
9315 SDATA (SYMBOL_NAME (operation))); 9315 SDATA (SYMBOL_NAME (operation)));
9316 target = args[XINT (target_idx) + 1]; 9316 target = args[XFASTINT (target_idx) + 1];
9317 if (!(STRINGP (target) 9317 if (!(STRINGP (target)
9318 || (EQ (operation, Qinsert_file_contents) && CONSP (target) 9318 || (EQ (operation, Qinsert_file_contents) && CONSP (target)
9319 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) 9319 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
9320 || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) 9320 || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
9321 error ("Invalid %dth argument", XINT (target_idx) + 1); 9321 error ("Invalid %dth argument", XFASTINT (target_idx) + 1);
9322 if (CONSP (target)) 9322 if (CONSP (target))
9323 target = XCAR (target); 9323 target = XCAR (target);
9324 9324
@@ -9375,9 +9375,9 @@ If multiple coding systems belong to the same category,
9375all but the first one are ignored. 9375all but the first one are ignored.
9376 9376
9377usage: (set-coding-system-priority &rest coding-systems) */) 9377usage: (set-coding-system-priority &rest coding-systems) */)
9378 (int nargs, Lisp_Object *args) 9378 (size_t nargs, Lisp_Object *args)
9379{ 9379{
9380 int i, j; 9380 size_t i, j;
9381 int changed[coding_category_max]; 9381 int changed[coding_category_max];
9382 enum coding_category priorities[coding_category_max]; 9382 enum coding_category priorities[coding_category_max];
9383 9383
@@ -9420,7 +9420,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
9420 9420
9421 /* Update `coding-category-list'. */ 9421 /* Update `coding-category-list'. */
9422 Vcoding_category_list = Qnil; 9422 Vcoding_category_list = Qnil;
9423 for (i = coding_category_max - 1; i >= 0; i--) 9423 for (i = coding_category_max; i-- > 0; )
9424 Vcoding_category_list 9424 Vcoding_category_list
9425 = Fcons (AREF (Vcoding_category_table, priorities[i]), 9425 = Fcons (AREF (Vcoding_category_table, priorities[i]),
9426 Vcoding_category_list); 9426 Vcoding_category_list);
@@ -9481,7 +9481,7 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal,
9481 Sdefine_coding_system_internal, coding_arg_max, MANY, 0, 9481 Sdefine_coding_system_internal, coding_arg_max, MANY, 0,
9482 doc: /* For internal use only. 9482 doc: /* For internal use only.
9483usage: (define-coding-system-internal ...) */) 9483usage: (define-coding-system-internal ...) */)
9484 (int nargs, Lisp_Object *args) 9484 (size_t nargs, Lisp_Object *args)
9485{ 9485{
9486 Lisp_Object name; 9486 Lisp_Object name;
9487 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ 9487 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */