From a53e2e898b96c8024de5a1a413826a6a59dd6b54 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 9 Apr 2011 19:35:19 +0300 Subject: Replace some uses of `int' with EMACS_INT. src/search.c (string_match_1, fast_string_match) (fast_c_string_match_ignore_case, fast_string_match_ignore_case) (scan_buffer, find_next_newline_no_quit) (find_before_next_newline, search_command, Freplace_match) (Fmatch_data): Make some `int' variables be EMACS_INT. src/xdisp.c (display_count_lines): 3rd argument and return value now EMACS_INT. All callers changed. (pint2hrstr): Last argument is now EMACS_INT. src/coding.c (detect_coding_utf_8, detect_coding_emacs_mule) (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5) (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8) (decode_coding_utf_16, decode_coding_emacs_mule) (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5) (decode_coding_ccl, decode_coding_charset) : Declare EMACS_INT. (decode_coding_iso_2022, decode_coding_emacs_mule) (decode_coding_sjis, decode_coding_big5, decode_coding_charset) : Declare EMACS_INT. (encode_coding_utf_8, encode_coding_utf_16) (encode_coding_emacs_mule, encode_invocation_designation) (encode_designation_at_bol, encode_coding_iso_2022) (encode_coding_sjis, encode_coding_big5, encode_coding_ccl) (encode_coding_raw_text, encode_coding_charset) : Declare EMACS_INT. (ASSURE_DESTINATION): Declare more_bytes EMACS_INT. (encode_invocation_designation): Last argument P_NCHARS is now EMACS_INT. (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT. (produce_chars): from_nchars and to_nchars are now EMACS_INT. src/coding.h (struct coding_system) : Declare EMACS_INT. All users changed. src/ccl.c (Fccl_execute_on_string): Declare some variables EMACS_INT. --- src/coding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding.h') diff --git a/src/coding.h b/src/coding.h index 6238a708e76..8414a2fe133 100644 --- a/src/coding.h +++ b/src/coding.h @@ -449,7 +449,7 @@ struct coding_system -1 in setup_coding_system, and updated by detect_coding. So, when this is equal to the byte length of the text being converted, we can skip the actual conversion process. */ - int head_ascii; + EMACS_INT head_ascii; /* The following members are set by encoding/decoding routine. */ EMACS_INT produced, produced_char, consumed, consumed_char; -- cgit v1.2.1 From 955cbe7b1720f09b2991b7d981147d9cc79d52e3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 20:39:45 -0700 Subject: Declare Lisp_Object Q* variables to be 'static' if not exproted. This makes it easier for human readers (and static analyzers) to see whether these variables are used from other modules. * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c: * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c: * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c: * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c: * lread.c, macros.c, minibuf.c, print.c, process.c, search.c: * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c: * xmenu.c, xselect.c: Declare Q* vars static if they are not used in other modules. * ccl.h, character.h, charset.h, coding.h, composite.h, font.h: * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h: Remove decls of unexported vars. * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro. --- src/coding.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/coding.h') diff --git a/src/coding.h b/src/coding.h index 8414a2fe133..ff7fcc7c3ac 100644 --- a/src/coding.h +++ b/src/coding.h @@ -757,10 +757,9 @@ extern Lisp_Object preferred_coding_system (void); extern Lisp_Object Qutf_8, Qutf_8_emacs; -extern Lisp_Object Qcoding_system, Qeol_type, Qcoding_category_index; +extern Lisp_Object Qcoding_category_index; extern Lisp_Object Qcoding_system_p; extern Lisp_Object Qraw_text, Qemacs_mule, Qno_conversion, Qundecided; -extern Lisp_Object Qiso_2022; extern Lisp_Object Qbuffer_file_coding_system; extern Lisp_Object Qunix, Qdos, Qmac; @@ -789,4 +788,3 @@ extern char emacs_mule_bytes[256]; extern int emacs_mule_string_char (unsigned char *); #endif /* EMACS_CODING_H */ - -- cgit v1.2.1 From 74ab6df507f0f4707a8bd25924fbdba9d1610f4f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Apr 2011 23:58:57 -0700 Subject: * coding.h (coding, code_convert_region, encode_coding_gap): Remove decls. * coding.c (Vsjis_coding_system, Vbig5_coding_system): (iso_code_class, detect_coding, code_convert_region): Now static. (encode_coding_gap): Remove; unused. --- src/coding.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/coding.h') diff --git a/src/coding.h b/src/coding.h index ff7fcc7c3ac..85e153dcc3a 100644 --- a/src/coding.h +++ b/src/coding.h @@ -695,10 +695,6 @@ extern int encoding_buffer_size (struct coding_system *, int); extern void setup_coding_system (Lisp_Object, struct coding_system *); extern Lisp_Object coding_charset_list (struct coding_system *); extern Lisp_Object coding_system_charset_list (Lisp_Object); -extern void detect_coding (struct coding_system *); -extern Lisp_Object code_convert_region (Lisp_Object, Lisp_Object, - Lisp_Object, Lisp_Object, - int, int); extern Lisp_Object code_convert_string (Lisp_Object, Lisp_Object, Lisp_Object, int, int, int); extern Lisp_Object code_convert_string_norecord (Lisp_Object, Lisp_Object, @@ -709,8 +705,6 @@ extern Lisp_Object complement_process_encoding_system (Lisp_Object); extern int decode_coding_gap (struct coding_system *, EMACS_INT, EMACS_INT); -extern int encode_coding_gap (struct coding_system *, - EMACS_INT, EMACS_INT); extern void decode_coding_object (struct coding_system *, Lisp_Object, EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, Lisp_Object); -- cgit v1.2.1