Mercurial > hg > xemacs-beta
changeset 2333:ba4677f54a05
[xemacs-hg @ 2004-10-14 17:26:18 by james]
More unused parameter fixes.
author | james |
---|---|
date | Thu, 14 Oct 2004 17:26:25 +0000 |
parents | 29a88fa7050c |
children | d6143acf165c |
files | src/ChangeLog src/buffer.h src/compiler.h src/device-x.c src/elhash.c src/glyphs-msw.c src/intl-win32.c src/intl-x.c src/objects.c src/regex.c src/regex.h src/search.c src/text.c src/text.h src/unicode.c |
diffstat | 15 files changed, 84 insertions(+), 50 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Wed Oct 13 21:52:14 2004 +0000 +++ b/src/ChangeLog Thu Oct 14 17:26:25 2004 +0000 @@ -1,3 +1,23 @@ +2004-10-14 Jerry James <james@xemacs.org> + + * compiler.h: New USED_IF_MULE and USED_IF_MULE_OR_CHECK_TEXT macros. + * glyphs-msw.c (charset_of_text): Use USED_IF_MULE. + * intl-x.c (init_x_locale): Ditto. + * intl-win32.c: Remove USED_IF_MULE definition. + * regex.h: Mark RE_LISP_SHORT_CONTEXT_ARGS_DECL arguments unused. + New RE_LISP_CONTEXT_ARGS_MULE_DECL macro for one unused case. + + * buffer.h: + * device-x.c: + * elhash.c: + * objects.c: + * regex.c: + * search.c: + * text.c: + * text.h: + * unicode.c: + Mark more unused parameters. + 2004-09-27 Jerry James <james@xemacs.org> * gmalloc.c (malloc): Change log to log2 to quiet gcc 3.3.
--- a/src/buffer.h Wed Oct 13 21:52:14 2004 +0000 +++ b/src/buffer.h Thu Oct 14 17:26:25 2004 +0000 @@ -511,7 +511,7 @@ DECLARE_INLINE_HEADER ( Bytebpos -prev_bytebpos (struct buffer *buf, Bytebpos x) +prev_bytebpos (struct buffer *USED_IF_MULE_OR_CHECK_TEXT (buf), Bytebpos x) ) { DEC_BYTEBPOS (buf, x); @@ -520,7 +520,7 @@ DECLARE_INLINE_HEADER ( Bytebpos -next_bytebpos (struct buffer *buf, Bytebpos x) +next_bytebpos (struct buffer *USED_IF_MULE_OR_CHECK_TEXT (buf), Bytebpos x) ) { INC_BYTEBPOS (buf, x); @@ -610,7 +610,8 @@ DECLARE_INLINE_HEADER ( Bytebpos -charbpos_to_bytebpos (struct buffer *buf, Charbpos x) +charbpos_to_bytebpos (struct buffer *USED_IF_MULE_OR_CHECK_TEXT (buf), + Charbpos x) ) { Bytebpos retval; @@ -640,7 +641,8 @@ DECLARE_INLINE_HEADER ( Charbpos -bytebpos_to_charbpos (struct buffer *buf, Bytebpos x) +bytebpos_to_charbpos (struct buffer *USED_IF_MULE_OR_CHECK_TEXT (buf), + Bytebpos x) ) { Charbpos retval;
--- a/src/compiler.h Wed Oct 13 21:52:14 2004 +0000 +++ b/src/compiler.h Thu Oct 14 17:26:25 2004 +0000 @@ -204,6 +204,16 @@ # define ATTRIBUTE_UNUSED # endif # define UNUSED(decl) UNUSED_ARG (decl) ATTRIBUTE_UNUSED +# ifdef MULE +# define USED_IF_MULE(decl) decl +# else +# define USED_IF_MULE(decl) UNUSED (decl) +# endif +# if defined (MULE) || defined (ERROR_CHECK_TEXT) +# define USED_IF_MULE_OR_CHECK_TEXT(decl) decl +# else +# define USED_IF_MULE_OR_CHECK_TEXT(decl) UNUSED (decl) +# endif #endif /* UNUSED */ #ifdef DEBUG_XEMACS
--- a/src/device-x.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/device-x.c Thu Oct 14 17:26:25 2004 +0000 @@ -180,7 +180,7 @@ } static Lisp_Object -coding_system_of_xrm_database (XrmDatabase db) +coding_system_of_xrm_database (XrmDatabase USED_IF_MULE (db)) { #ifdef MULE const Extbyte *locale = XrmLocaleOfDatabase (db); @@ -1022,7 +1022,7 @@ } static Lisp_Object -x_error_handler_error (Lisp_Object data, Lisp_Object dummy) +x_error_handler_error (Lisp_Object UNUSED (data), Lisp_Object UNUSED (dummy)) { return Qnil; }
--- a/src/elhash.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/elhash.c Thu Oct 14 17:26:25 2004 +0000 @@ -408,7 +408,13 @@ } static void -free_hentries (htentry *hentries, size_t size) +free_hentries (htentry *hentries, +#ifdef ERROR_CHECK_STRUCTURES + size_t size +#else + size_t UNUSED (size) +#endif + ) { #ifdef ERROR_CHECK_STRUCTURES /* Ensure a crash if other code uses the discarded entries afterwards. */
--- a/src/glyphs-msw.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/glyphs-msw.c Thu Oct 14 17:26:25 2004 +0000 @@ -1800,13 +1800,7 @@ /************************************************************************/ static Lisp_Object -charset_of_text (Lisp_Object -#ifdef MULE - text -#else - UNUSED (text) -#endif - ) +charset_of_text (Lisp_Object USED_IF_MULE (text)) { #ifdef MULE Ibyte *p;
--- a/src/intl-win32.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/intl-win32.c Thu Oct 14 17:26:25 2004 +0000 @@ -53,12 +53,6 @@ # define NO_EXT_MULTIBYTE_FEATURES #endif -#ifdef MULE -#define USED_IF_MULE(decl) decl -#else -#define USED_IF_MULE(decl) UNUSED (decl) -#endif - Lisp_Object Qmswindows_multibyte, Qmswindows_multibyte_to_unicode; Lisp_Object Qmswindows_tstr, Qmswindows_unicode; Lisp_Object Qmswindows_multibyte_system_default;
--- a/src/intl-x.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/intl-x.c Thu Oct 14 17:26:25 2004 +0000 @@ -30,13 +30,7 @@ int init_x_locale (Lisp_Object locale); int -init_x_locale (Lisp_Object -#ifdef MULE - locale -#else - UNUSED (locale) -#endif - ) +init_x_locale (Lisp_Object USED_IF_MULE (locale)) { #ifdef MULE /* dverna - Nov. 98: #### DON'T DO THIS !!! The default XtLanguageProc
--- a/src/objects.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/objects.c Thu Oct 14 17:26:25 2004 +0000 @@ -789,7 +789,8 @@ static Lisp_Object -font_instantiate (Lisp_Object UNUSED (specifier), Lisp_Object matchspec, +font_instantiate (Lisp_Object UNUSED (specifier), + Lisp_Object USED_IF_MULE (matchspec), Lisp_Object domain, Lisp_Object instantiator, Lisp_Object depth) {
--- a/src/regex.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/regex.c Thu Oct 14 17:26:25 2004 +0000 @@ -4769,7 +4769,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, re_char *string1, int size1, re_char *string2, int size2, int pos, struct re_registers *regs, int stop - RE_LISP_CONTEXT_ARGS_DECL) + RE_LISP_CONTEXT_ARGS_MULE_DECL) { /* General temporaries. */ int mcnt; @@ -6663,7 +6663,8 @@ bcmp_translate (re_char *s1, re_char *s2, REGISTER int len, RE_TRANSLATE_TYPE translate #ifdef emacs - , Internal_Format fmt, Lisp_Object lispobj + , Internal_Format USED_IF_MULE (fmt), + Lisp_Object USED_IF_MULE (lispobj) #endif ) {
--- a/src/regex.h Wed Oct 13 21:52:14 2004 +0000 +++ b/src/regex.h Thu Oct 14 17:26:25 2004 +0000 @@ -26,15 +26,17 @@ #ifdef emacs #define RE_TRANSLATE_TYPE Lisp_Object -#define RE_LISP_SHORT_CONTEXT_ARGS_DECL , Lisp_Object lispobj, struct buffer *lispbuf +#define RE_LISP_SHORT_CONTEXT_ARGS_DECL , Lisp_Object UNUSED (lispobj), struct buffer *UNUSED (lispbuf) #define RE_LISP_SHORT_CONTEXT_ARGS , lispobj, lispbuf #define RE_LISP_CONTEXT_ARGS_DECL , Lisp_Object lispobj, struct buffer *lispbuf, struct syntax_cache *scache +#define RE_LISP_CONTEXT_ARGS_MULE_DECL , Lisp_Object lispobj, struct buffer *USED_IF_MULE (lispbuf), struct syntax_cache *scache #define RE_LISP_CONTEXT_ARGS , lispobj, lispbuf, scache #else #define RE_TRANSLATE_TYPE char * #define RE_LISP_SHORT_CONTEXT_ARGS_DECL #define RE_LISP_SHORT_CONTEXT_ARGS #define RE_LISP_CONTEXT_ARGS_DECL +#define RE_LISP_CONTEXT_ARGS_MULE_DECL #define RE_LISP_CONTEXT_ARGS #define Elemcount ssize_t #define Bytecount ssize_t
--- a/src/search.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/search.c Thu Oct 14 17:26:25 2004 +0000 @@ -1545,7 +1545,7 @@ static Charbpos boyer_moore (struct buffer *buf, Ibyte *base_pat, Bytecount len, Bytebpos pos, Bytebpos lim, EMACS_INT n, Lisp_Object trt, - Lisp_Object inverse_trt, int charset_base) + Lisp_Object inverse_trt, int USED_IF_MULE (charset_base)) { /* &&#### needs some 8-bit work here */ /* #### Someone really really really needs to comment the workings
--- a/src/text.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/text.c Thu Oct 14 17:26:25 2004 +0000 @@ -1175,10 +1175,10 @@ Bytecount copy_text_between_formats (const Ibyte *src, Bytecount srclen, Internal_Format srcfmt, - Lisp_Object srcobj, + Lisp_Object USED_IF_MULE (srcobj), Ibyte *dst, Bytecount dstlen, Internal_Format dstfmt, - Lisp_Object dstobj, + Lisp_Object USED_IF_MULE (dstobj), Bytecount *src_used) { if (srcfmt == dstfmt && @@ -1270,8 +1270,9 @@ /************************************************************************/ void -find_charsets_in_ibyte_string (unsigned char *charsets, const Ibyte *str, - Bytecount len) +find_charsets_in_ibyte_string (unsigned char *charsets, + const Ibyte *USED_IF_MULE (str), + Bytecount USED_IF_MULE (len)) { #ifndef MULE /* Telescope this. */ @@ -1297,8 +1298,9 @@ } void -find_charsets_in_ichar_string (unsigned char *charsets, const Ichar *str, - Charcount len) +find_charsets_in_ichar_string (unsigned char *charsets, + const Ichar *USED_IF_MULE (str), + Charcount USED_IF_MULE (len)) { #ifndef MULE /* Telescope this. */ @@ -1343,7 +1345,7 @@ } int -ichar_string_displayed_columns (const Ichar *str, Charcount len) +ichar_string_displayed_columns (const Ichar *USED_IF_MULE (str), Charcount len) { #ifdef MULE int cols = 0; @@ -1359,7 +1361,8 @@ } Charcount -ibyte_string_nonascii_chars (const Ibyte *str, Bytecount len) +ibyte_string_nonascii_chars (const Ibyte *USED_IF_MULE (str), + Bytecount USED_IF_MULE (len)) { #ifdef MULE const Ibyte *end = str + len; @@ -3648,7 +3651,7 @@ `int-to-char of the resulting ARG1' is returned, and ARG2 is always ignored. */ - (charset, arg1, arg2)) + (charset, arg1, USED_IF_MULE (arg2))) { #ifdef MULE Lisp_Charset *cs;
--- a/src/text.h Wed Oct 13 21:52:14 2004 +0000 +++ b/src/text.h Thu Oct 14 17:26:25 2004 +0000 @@ -753,7 +753,8 @@ DECLARE_INLINE_HEADER ( Bytecount -itext_ichar_len_fmt (const Ibyte *ptr, Internal_Format fmt) +itext_ichar_len_fmt (const Ibyte *USED_IF_MULE_OR_CHECK_TEXT (ptr), + Internal_Format fmt) ) { switch (fmt) @@ -1122,7 +1123,8 @@ /* Convert a byte index into a string into a char index. */ DECLARE_INLINE_HEADER ( Charcount -string_index_byte_to_char (Lisp_Object s, Bytecount idx) +string_index_byte_to_char (Lisp_Object USED_IF_MULE_OR_CHECK_TEXT (s), + Bytecount idx) ) { Charcount retval; @@ -1149,7 +1151,8 @@ /* Convert a char index into a string into a byte index. */ DECLARE_INLINE_HEADER ( Bytecount -string_index_char_to_byte (Lisp_Object s, Charcount idx) +string_index_char_to_byte (Lisp_Object USED_IF_MULE_OR_CHECK_TEXT (s), + Charcount idx) ) { Bytecount retval; @@ -1176,7 +1179,9 @@ chars. */ DECLARE_INLINE_HEADER ( Charcount -string_offset_byte_to_char_len (Lisp_Object s, Bytecount off, Bytecount len) +string_offset_byte_to_char_len (Lisp_Object USED_IF_MULE_OR_CHECK_TEXT (s), + Bytecount USED_IF_MULE_OR_CHECK_TEXT (off), + Bytecount len) ) { Charcount retval; @@ -1205,7 +1210,9 @@ bytes. */ DECLARE_INLINE_HEADER ( Bytecount -string_offset_char_to_byte_len (Lisp_Object s, Bytecount off, Charcount len) +string_offset_char_to_byte_len (Lisp_Object USED_IF_MULE_OR_CHECK_TEXT (s), + Bytecount USED_IF_MULE_OR_CHECK_TEXT (off), + Charcount len) ) { Bytecount retval;
--- a/src/unicode.c Wed Oct 13 21:52:14 2004 +0000 +++ b/src/unicode.c Thu Oct 14 17:26:25 2004 +0000 @@ -1234,7 +1234,7 @@ present), this function simply does `int-to-char' and ignores the CHARSETS argument. */ - (code, charsets)) + (code, USED_IF_MULE (charsets))) { #ifdef MULE Lisp_Object_dynarr *dyn; @@ -1638,9 +1638,9 @@ } static void -encode_unicode_char (Lisp_Object charset, int h, int l, - unsigned_char_dynarr *dst, enum unicode_type type, - unsigned int little_endian) +encode_unicode_char (Lisp_Object USED_IF_MULE (charset), int h, + int USED_IF_MULE (l), unsigned_char_dynarr *dst, + enum unicode_type type, unsigned int little_endian) { #ifdef MULE int code = ichar_to_unicode (make_ichar (charset, h & 127, l & 127));