aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-08-08 21:32:57 +0000
committerRichard M. Stallman1998-08-08 21:32:57 +0000
commit84d602979c12ac3956e75a5e77da9fe0b1b41c4d (patch)
tree0af1149700fef657985d254558e14f22c5b2f1dd /src/coding.c
parenteeb0f327362c6b1d12a0b1396e8c183d2ef4792a (diff)
downloademacs-84d602979c12ac3956e75a5e77da9fe0b1b41c4d.tar.gz
emacs-84d602979c12ac3956e75a5e77da9fe0b1b41c4d.zip
Avoid using initializers for Lisp_Object.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/coding.c b/src/coding.c
index 1a293fb6a3b..7c693b86b1c 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2973,7 +2973,8 @@ setup_coding_system (coding_system, coding)
2973 } 2973 }
2974 else if (CONSP (flags[i])) 2974 else if (CONSP (flags[i]))
2975 { 2975 {
2976 Lisp_Object tail = flags[i]; 2976 Lisp_Object tail;
2977 tail = flags[i];
2977 2978
2978 coding->flags |= CODING_FLAG_ISO_DESIGNATION; 2979 coding->flags |= CODING_FLAG_ISO_DESIGNATION;
2979 if (INTEGERP (XCONS (tail)->car) 2980 if (INTEGERP (XCONS (tail)->car)
@@ -3057,9 +3058,10 @@ setup_coding_system (coding_system, coding)
3057 coding->common_flags 3058 coding->common_flags
3058 |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; 3059 |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK;
3059 { 3060 {
3060 Lisp_Object val = XVECTOR (coding_spec)->contents[4]; 3061 Lisp_Object val;
3061 Lisp_Object decoder, encoder; 3062 Lisp_Object decoder, encoder;
3062 3063
3064 val = XVECTOR (coding_spec)->contents[4];
3063 if (CONSP (val) 3065 if (CONSP (val)
3064 && SYMBOLP (XCONS (val)->car) 3066 && SYMBOLP (XCONS (val)->car)
3065 && !NILP (decoder = Fget (XCONS (val)->car, Qccl_program_idx)) 3067 && !NILP (decoder = Fget (XCONS (val)->car, Qccl_program_idx))
@@ -3135,7 +3137,8 @@ setup_raw_text_coding_system (coding)
3135 coding->type = coding_type_raw_text; 3137 coding->type = coding_type_raw_text;
3136 if (coding->eol_type != CODING_EOL_UNDECIDED) 3138 if (coding->eol_type != CODING_EOL_UNDECIDED)
3137 { 3139 {
3138 Lisp_Object subsidiaries = Fget (Qraw_text, Qeol_type); 3140 Lisp_Object subsidiaries;
3141 subsidiaries = Fget (Qraw_text, Qeol_type);
3139 3142
3140 if (VECTORP (subsidiaries) 3143 if (VECTORP (subsidiaries)
3141 && XVECTOR (subsidiaries)->size == 3) 3144 && XVECTOR (subsidiaries)->size == 3)
@@ -3388,8 +3391,9 @@ detect_coding (coding, src, src_bytes)
3388{ 3391{
3389 unsigned int idx; 3392 unsigned int idx;
3390 int skip, mask, i; 3393 int skip, mask, i;
3391 Lisp_Object val = Vcoding_category_list; 3394 Lisp_Object val;
3392 3395
3396 val = Vcoding_category_list;
3393 mask = detect_coding_mask (src, src_bytes, coding_priorities, &skip); 3397 mask = detect_coding_mask (src, src_bytes, coding_priorities, &skip);
3394 coding->heading_ascii = skip; 3398 coding->heading_ascii = skip;
3395 3399
@@ -3405,8 +3409,9 @@ detect_coding (coding, src, src_bytes)
3405 3409
3406 if (coding->eol_type != CODING_EOL_UNDECIDED) 3410 if (coding->eol_type != CODING_EOL_UNDECIDED)
3407 { 3411 {
3408 Lisp_Object tmp = Fget (val, Qeol_type); 3412 Lisp_Object tmp;
3409 3413
3414 tmp = Fget (val, Qeol_type);
3410 if (VECTORP (tmp)) 3415 if (VECTORP (tmp))
3411 val = XVECTOR (tmp)->contents[coding->eol_type]; 3416 val = XVECTOR (tmp)->contents[coding->eol_type];
3412 } 3417 }
@@ -4045,12 +4050,15 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
4045 int len = to - from, len_byte = to_byte - from_byte; 4050 int len = to - from, len_byte = to_byte - from_byte;
4046 int require, inserted, inserted_byte; 4051 int require, inserted, inserted_byte;
4047 int head_skip, tail_skip, total_skip; 4052 int head_skip, tail_skip, total_skip;
4048 Lisp_Object saved_coding_symbol = Qnil; 4053 Lisp_Object saved_coding_symbol;
4049 int multibyte = !NILP (current_buffer->enable_multibyte_characters); 4054 int multibyte = !NILP (current_buffer->enable_multibyte_characters);
4050 int first = 1; 4055 int first = 1;
4051 int fake_multibyte = 0; 4056 int fake_multibyte = 0;
4052 unsigned char *src, *dst; 4057 unsigned char *src, *dst;
4053 Lisp_Object deletion = Qnil; 4058 Lisp_Object deletion;
4059
4060 deletion = Qnil;
4061 saved_coding_symbol = Qnil;
4054 4062
4055 if (from < PT && PT < to) 4063 if (from < PT && PT < to)
4056 SET_PT_BOTH (from, from_byte); 4064 SET_PT_BOTH (from, from_byte);
@@ -4402,9 +4410,10 @@ code_convert_string (str, coding, encodep, nocopy)
4402 int from = 0, to = XSTRING (str)->size; 4410 int from = 0, to = XSTRING (str)->size;
4403 int to_byte = STRING_BYTES (XSTRING (str)); 4411 int to_byte = STRING_BYTES (XSTRING (str));
4404 struct gcpro gcpro1; 4412 struct gcpro gcpro1;
4405 Lisp_Object saved_coding_symbol = Qnil; 4413 Lisp_Object saved_coding_symbol;
4406 int result; 4414 int result;
4407 4415
4416 saved_coding_symbol = Qnil;
4408 if (encodep && !NILP (coding->pre_write_conversion) 4417 if (encodep && !NILP (coding->pre_write_conversion)
4409 || !encodep && !NILP (coding->post_read_conversion)) 4418 || !encodep && !NILP (coding->post_read_conversion))
4410 { 4419 {
@@ -5092,7 +5101,9 @@ This function is internal use only.")
5092 () 5101 ()
5093{ 5102{
5094 int i = 0, idx; 5103 int i = 0, idx;
5095 Lisp_Object val = Vcoding_category_list; 5104 Lisp_Object val;
5105
5106 val = Vcoding_category_list;
5096 5107
5097 while (CONSP (val) && i < CODING_CATEGORY_IDX_MAX) 5108 while (CONSP (val) && i < CODING_CATEGORY_IDX_MAX)
5098 { 5109 {