diff options
| author | Paul Eggert | 2012-08-27 09:19:34 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-27 09:19:34 -0700 |
| commit | f10fe38f772c29031a23ef7aa92d2de1b3675461 (patch) | |
| tree | 5e45fef267903dafb4d2a92bd464ff851b3e3835 /src/cmds.c | |
| parent | 5474c384641da64d402e4d135dbf4697a60a70d3 (diff) | |
| download | emacs-f10fe38f772c29031a23ef7aa92d2de1b3675461.tar.gz emacs-f10fe38f772c29031a23ef7aa92d2de1b3675461.zip | |
* cmds.c, coding.c: Use bool for booleans.
* cmds.c (move_point, Fself_insert_command):
* coding.h (struct composition status, struct coding_system):
* coding.c (detect_coding_utf_8, encode_coding_utf_8)
(detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
(emacs_mule_char, decode_coding_emacs_mule)
(encode_coding_emacs_mule, detect_coding_iso_2022)
(decode_coding_iso_2022, encode_invocation_designation)
(encode_designation_at_bol, encode_coding_iso_2022)
(detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
(decode_coding_big5, encode_coding_sjis, encode_coding_big5)
(detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
(encode_coding_raw_text, detect_coding_charset)
(decode_coding_charset, encode_coding_charset, detect_eol)
(detect_coding, get_translation_table, produce_chars)
(consume_chars, reused_workbuf_in_use)
(make_conversion_work_buffer, code_conversion_save)
(decode_coding_object, encode_coding_object)
(detect_coding_system, char_encodable_p)
(Funencodable_char_position, code_convert_region)
(code_convert_string, code_convert_string_norecord)
(Fset_coding_system_priority):
* fileio.c (Finsert_file_contents):
Use bool for booleans.
* coding.h, lisp.h: Reflect above API changes.
* coding.c: Remove unnecessary static function decls.
(detect_coding): Use unsigned, not signed, to copy an unsigned field.
(decode_coding, encode_coding, decode_coding_gap): Return 'void',
not a boolean 'int', since callers never look at the return value.
(ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
* coding.h (decoding_buffer_size, encoding_buffer_size)
(emacs_mule_string_char): Remove unused extern decls.
(struct iso_2022_spec, struct coding_system):
Use 'unsigned int : 1' for boolean fields, since there's more than one.
(struct emacs_mule_spec): Remove unused field 'full_support'.
All initializations removed.
* cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmds.c b/src/cmds.c index b416135ee9e..90d3cd6dced 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -47,10 +47,10 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, | |||
| 47 | return make_number (PT + XINT (n)); | 47 | return make_number (PT + XINT (n)); |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | /* Add N to point; or subtract N if FORWARD is zero. N defaults to 1. | 50 | /* Add N to point; or subtract N if FORWARD is false. N defaults to 1. |
| 51 | Validate the new location. Return nil. */ | 51 | Validate the new location. Return nil. */ |
| 52 | static Lisp_Object | 52 | static Lisp_Object |
| 53 | move_point (Lisp_Object n, int forward) | 53 | move_point (Lisp_Object n, bool forward) |
| 54 | { | 54 | { |
| 55 | /* This used to just set point to point + XINT (n), and then check | 55 | /* This used to just set point to point + XINT (n), and then check |
| 56 | to see if it was within boundaries. But now that SET_PT can | 56 | to see if it was within boundaries. But now that SET_PT can |
| @@ -277,7 +277,7 @@ After insertion, the value of `auto-fill-function' is called if the | |||
| 277 | At the end, it runs `post-self-insert-hook'. */) | 277 | At the end, it runs `post-self-insert-hook'. */) |
| 278 | (Lisp_Object n) | 278 | (Lisp_Object n) |
| 279 | { | 279 | { |
| 280 | int remove_boundary = 1; | 280 | bool remove_boundary = 1; |
| 281 | CHECK_NATNUM (n); | 281 | CHECK_NATNUM (n); |
| 282 | 282 | ||
| 283 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) | 283 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) |
| @@ -438,7 +438,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 438 | : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) | 438 | : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) |
| 439 | == Sword)) | 439 | == Sword)) |
| 440 | { | 440 | { |
| 441 | int modiff = MODIFF; | 441 | EMACS_INT modiff = MODIFF; |
| 442 | Lisp_Object sym; | 442 | Lisp_Object sym; |
| 443 | 443 | ||
| 444 | sym = call0 (Qexpand_abbrev); | 444 | sym = call0 (Qexpand_abbrev); |