comparison src/mbyte.c @ 7803:37c929c4a073 v7.4.1198

commit https://github.com/vim/vim/commit/92b8b2d307e34117f146319872010b0ccc9d2713 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jan 29 22:36:45 2016 +0100 patch 7.4.1198 Problem: Still using __ARGS. Solution: Remove __ARGS in several files. (script by Hirohito Higashi) Also remove use of HAVE_STDARG_H.
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Jan 2016 22:45:06 +0100
parents 616769d423fc
children 41789f16d6b2
comparison
equal deleted inserted replaced
7802:d9180d8cfe40 7803:37c929c4a073
129 # endif 129 # endif
130 #endif 130 #endif
131 131
132 #if defined(FEAT_MBYTE) || defined(PROTO) 132 #if defined(FEAT_MBYTE) || defined(PROTO)
133 133
134 static int enc_canon_search __ARGS((char_u *name)); 134 static int enc_canon_search(char_u *name);
135 static int dbcs_char2len __ARGS((int c)); 135 static int dbcs_char2len(int c);
136 static int dbcs_char2bytes __ARGS((int c, char_u *buf)); 136 static int dbcs_char2bytes(int c, char_u *buf);
137 static int dbcs_ptr2len __ARGS((char_u *p)); 137 static int dbcs_ptr2len(char_u *p);
138 static int dbcs_ptr2len_len __ARGS((char_u *p, int size)); 138 static int dbcs_ptr2len_len(char_u *p, int size);
139 static int utf_ptr2cells_len __ARGS((char_u *p, int size)); 139 static int utf_ptr2cells_len(char_u *p, int size);
140 static int dbcs_char2cells __ARGS((int c)); 140 static int dbcs_char2cells(int c);
141 static int dbcs_ptr2cells_len __ARGS((char_u *p, int size)); 141 static int dbcs_ptr2cells_len(char_u *p, int size);
142 static int dbcs_ptr2char __ARGS((char_u *p)); 142 static int dbcs_ptr2char(char_u *p);
143 static int utf_safe_read_char_adv __ARGS((char_u **s, size_t *n)); 143 static int utf_safe_read_char_adv(char_u **s, size_t *n);
144 144
145 /* 145 /*
146 * Lookup table to quickly get the length in bytes of a UTF-8 character from 146 * Lookup table to quickly get the length in bytes of a UTF-8 character from
147 * the first byte of a UTF-8 string. 147 * the first byte of a UTF-8 string.
148 * Bytes which are illegal when used as the first byte have a 1. 148 * Bytes which are illegal when used as the first byte have a 1.
1193 struct interval 1193 struct interval
1194 { 1194 {
1195 long first; 1195 long first;
1196 long last; 1196 long last;
1197 }; 1197 };
1198 static int intable __ARGS((struct interval *table, size_t size, int c)); 1198 static int intable(struct interval *table, size_t size, int c);
1199 1199
1200 /* 1200 /*
1201 * Return TRUE if "c" is in "table[size / sizeof(struct interval)]". 1201 * Return TRUE if "c" is in "table[size / sizeof(struct interval)]".
1202 */ 1202 */
1203 static int 1203 static int
2825 {0x10400,0x10427,1,40}, 2825 {0x10400,0x10427,1,40},
2826 {0x10c80,0x10cb2,1,64}, 2826 {0x10c80,0x10cb2,1,64},
2827 {0x118a0,0x118bf,1,32} 2827 {0x118a0,0x118bf,1,32}
2828 }; 2828 };
2829 2829
2830 static int utf_convert __ARGS((int a, convertStruct table[], int tableSize)); 2830 static int utf_convert(int a, convertStruct table[], int tableSize);
2831 static int utf_strnicmp __ARGS((char_u *s1, char_u *s2, size_t n1, size_t n2)); 2831 static int utf_strnicmp(char_u *s1, char_u *s2, size_t n1, size_t n2);
2832 2832
2833 /* 2833 /*
2834 * Generic conversion function for case operations. 2834 * Generic conversion function for case operations.
2835 * Return the converted equivalent of "a", which is a UCS-4 character. Use 2835 * Return the converted equivalent of "a", which is a UCS-4 character. Use
2836 * the given conversion "table". Uses binary search on "table". 2836 * the given conversion "table". Uses binary search on "table".
3998 return col; 3998 return col;
3999 } 3999 }
4000 #endif 4000 #endif
4001 4001
4002 #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) || defined(PROTO) 4002 #if defined(FEAT_MBYTE) || defined(FEAT_POSTSCRIPT) || defined(PROTO)
4003 static int enc_alias_search __ARGS((char_u *name)); 4003 static int enc_alias_search(char_u *name);
4004 4004
4005 /* 4005 /*
4006 * Skip the Vim specific head of a 'encoding' name. 4006 * Skip the Vim specific head of a 'encoding' name.
4007 */ 4007 */
4008 char_u * 4008 char_u *
4224 } 4224 }
4225 #endif 4225 #endif
4226 4226
4227 # if defined(USE_ICONV) || defined(PROTO) 4227 # if defined(USE_ICONV) || defined(PROTO)
4228 4228
4229 static char_u *iconv_string __ARGS((vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp)); 4229 static char_u *iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvlenp, int *resultlenp);
4230 4230
4231 /* 4231 /*
4232 * Call iconv_open() with a check if iconv() works properly (there are broken 4232 * Call iconv_open() with a check if iconv() works properly (there are broken
4233 * versions). 4233 * versions).
4234 * Returns (void *)-1 if failed. 4234 * Returns (void *)-1 if failed.
5550 #if defined(FEAT_GUI_X11) || defined(PROTO) 5550 #if defined(FEAT_GUI_X11) || defined(PROTO)
5551 # if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun) 5551 # if defined(XtSpecificationRelease) && XtSpecificationRelease >= 6 && !defined(sun)
5552 # define USE_X11R6_XIM 5552 # define USE_X11R6_XIM
5553 # endif 5553 # endif
5554 5554
5555 static int xim_real_init __ARGS((Window x11_window, Display *x11_display)); 5555 static int xim_real_init(Window x11_window, Display *x11_display);
5556 5556
5557 5557
5558 #ifdef USE_X11R6_XIM 5558 #ifdef USE_X11R6_XIM
5559 static void xim_instantiate_cb __ARGS((Display *display, XPointer client_data, XPointer call_data)); 5559 static void xim_instantiate_cb(Display *display, XPointer client_data, XPointer call_data);
5560 static void xim_destroy_cb __ARGS((XIM im, XPointer client_data, XPointer call_data)); 5560 static void xim_destroy_cb(XIM im, XPointer client_data, XPointer call_data);
5561 5561
5562 static void 5562 static void
5563 xim_instantiate_cb(display, client_data, call_data) 5563 xim_instantiate_cb(display, client_data, call_data)
5564 Display *display; 5564 Display *display;
5565 XPointer client_data UNUSED; 5565 XPointer client_data UNUSED;