Mercurial > vim
comparison src/misc2.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 | 1fded31d9e04 |
children | 2a8d6b2dd925 |
comparison
equal
deleted
inserted
replaced
7802:d9180d8cfe40 | 7803:37c929c4a073 |
---|---|
15 static char_u *username = NULL; /* cached result of mch_get_user_name() */ | 15 static char_u *username = NULL; /* cached result of mch_get_user_name() */ |
16 | 16 |
17 static char_u *ff_expand_buffer = NULL; /* used for expanding filenames */ | 17 static char_u *ff_expand_buffer = NULL; /* used for expanding filenames */ |
18 | 18 |
19 #if defined(FEAT_VIRTUALEDIT) || defined(PROTO) | 19 #if defined(FEAT_VIRTUALEDIT) || defined(PROTO) |
20 static int coladvance2 __ARGS((pos_T *pos, int addspaces, int finetune, colnr_T wcol)); | 20 static int coladvance2(pos_T *pos, int addspaces, int finetune, colnr_T wcol); |
21 | 21 |
22 /* | 22 /* |
23 * Return TRUE if in the current mode we need to use virtual. | 23 * Return TRUE if in the current mode we need to use virtual. |
24 */ | 24 */ |
25 int | 25 int |
697 static long_u mem_freed; | 697 static long_u mem_freed; |
698 static long_u mem_peak; | 698 static long_u mem_peak; |
699 static long_u num_alloc; | 699 static long_u num_alloc; |
700 static long_u num_freed; | 700 static long_u num_freed; |
701 | 701 |
702 static void mem_pre_alloc_s __ARGS((size_t *sizep)); | 702 static void mem_pre_alloc_s(size_t *sizep); |
703 static void mem_pre_alloc_l __ARGS((long_u *sizep)); | 703 static void mem_pre_alloc_l(long_u *sizep); |
704 static void mem_post_alloc __ARGS((void **pp, size_t size)); | 704 static void mem_post_alloc(void **pp, size_t size); |
705 static void mem_pre_free __ARGS((void **pp)); | 705 static void mem_pre_free(void **pp); |
706 | 706 |
707 static void | 707 static void |
708 mem_pre_alloc_s(sizep) | 708 mem_pre_alloc_s(sizep) |
709 size_t *sizep; | 709 size_t *sizep; |
710 { | 710 { |
796 } | 796 } |
797 | 797 |
798 #endif /* MEM_PROFILE */ | 798 #endif /* MEM_PROFILE */ |
799 | 799 |
800 #ifdef FEAT_EVAL | 800 #ifdef FEAT_EVAL |
801 static int alloc_does_fail __ARGS((long_u size)); | 801 static int alloc_does_fail(long_u size); |
802 | 802 |
803 static int | 803 static int |
804 alloc_does_fail(size) | 804 alloc_does_fail(size) |
805 long_u size; | 805 long_u size; |
806 { | 806 { |
1062 } | 1062 } |
1063 | 1063 |
1064 #if defined(EXITFREE) || defined(PROTO) | 1064 #if defined(EXITFREE) || defined(PROTO) |
1065 | 1065 |
1066 # if defined(FEAT_SEARCHPATH) | 1066 # if defined(FEAT_SEARCHPATH) |
1067 static void free_findfile __ARGS((void)); | 1067 static void free_findfile(void); |
1068 # endif | 1068 # endif |
1069 | 1069 |
1070 /* | 1070 /* |
1071 * Free everything that we allocated. | 1071 * Free everything that we allocated. |
1072 * Can be used to detect memory leaks, e.g., with ccmalloc. | 1072 * Can be used to detect memory leaks, e.g., with ccmalloc. |
4023 int ffsc_tagfile; | 4023 int ffsc_tagfile; |
4024 } ff_search_ctx_T; | 4024 } ff_search_ctx_T; |
4025 | 4025 |
4026 /* locally needed functions */ | 4026 /* locally needed functions */ |
4027 #ifdef FEAT_PATH_EXTRA | 4027 #ifdef FEAT_PATH_EXTRA |
4028 static int ff_check_visited __ARGS((ff_visited_T **, char_u *, char_u *)); | 4028 static int ff_check_visited(ff_visited_T **, char_u *, char_u *); |
4029 #else | 4029 #else |
4030 static int ff_check_visited __ARGS((ff_visited_T **, char_u *)); | 4030 static int ff_check_visited(ff_visited_T **, char_u *); |
4031 #endif | 4031 #endif |
4032 static void vim_findfile_free_visited_list __ARGS((ff_visited_list_hdr_T **list_headp)); | 4032 static void vim_findfile_free_visited_list(ff_visited_list_hdr_T **list_headp); |
4033 static void ff_free_visited_list __ARGS((ff_visited_T *vl)); | 4033 static void ff_free_visited_list(ff_visited_T *vl); |
4034 static ff_visited_list_hdr_T* ff_get_visited_list __ARGS((char_u *, ff_visited_list_hdr_T **list_headp)); | 4034 static ff_visited_list_hdr_T* ff_get_visited_list(char_u *, ff_visited_list_hdr_T **list_headp); |
4035 #ifdef FEAT_PATH_EXTRA | 4035 #ifdef FEAT_PATH_EXTRA |
4036 static int ff_wc_equal __ARGS((char_u *s1, char_u *s2)); | 4036 static int ff_wc_equal(char_u *s1, char_u *s2); |
4037 #endif | 4037 #endif |
4038 | 4038 |
4039 static void ff_push __ARGS((ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr)); | 4039 static void ff_push(ff_search_ctx_T *search_ctx, ff_stack_T *stack_ptr); |
4040 static ff_stack_T *ff_pop __ARGS((ff_search_ctx_T *search_ctx)); | 4040 static ff_stack_T *ff_pop(ff_search_ctx_T *search_ctx); |
4041 static void ff_clear __ARGS((ff_search_ctx_T *search_ctx)); | 4041 static void ff_clear(ff_search_ctx_T *search_ctx); |
4042 static void ff_free_stack_element __ARGS((ff_stack_T *stack_ptr)); | 4042 static void ff_free_stack_element(ff_stack_T *stack_ptr); |
4043 #ifdef FEAT_PATH_EXTRA | 4043 #ifdef FEAT_PATH_EXTRA |
4044 static ff_stack_T *ff_create_stack_element __ARGS((char_u *, char_u *, int, int)); | 4044 static ff_stack_T *ff_create_stack_element(char_u *, char_u *, int, int); |
4045 #else | 4045 #else |
4046 static ff_stack_T *ff_create_stack_element __ARGS((char_u *, int, int)); | 4046 static ff_stack_T *ff_create_stack_element(char_u *, int, int); |
4047 #endif | 4047 #endif |
4048 #ifdef FEAT_PATH_EXTRA | 4048 #ifdef FEAT_PATH_EXTRA |
4049 static int ff_path_in_stoplist __ARGS((char_u *, int, char_u **)); | 4049 static int ff_path_in_stoplist(char_u *, int, char_u **); |
4050 #endif | 4050 #endif |
4051 | 4051 |
4052 static char_u e_pathtoolong[] = N_("E854: path too long for completion"); | 4052 static char_u e_pathtoolong[] = N_("E854: path too long for completion"); |
4053 | 4053 |
4054 #if 0 | 4054 #if 0 |
5814 void | 5814 void |
5815 qsort(base, elm_count, elm_size, cmp) | 5815 qsort(base, elm_count, elm_size, cmp) |
5816 void *base; | 5816 void *base; |
5817 size_t elm_count; | 5817 size_t elm_count; |
5818 size_t elm_size; | 5818 size_t elm_size; |
5819 int (*cmp) __ARGS((const void *, const void *)); | 5819 int (*cmp)(const void *, const void *); |
5820 { | 5820 { |
5821 char_u *buf; | 5821 char_u *buf; |
5822 char_u *p1; | 5822 char_u *p1; |
5823 char_u *p2; | 5823 char_u *p2; |
5824 int i, j; | 5824 int i, j; |
5852 */ | 5852 */ |
5853 static int | 5853 static int |
5854 #ifdef __BORLANDC__ | 5854 #ifdef __BORLANDC__ |
5855 _RTLENTRYF | 5855 _RTLENTRYF |
5856 #endif | 5856 #endif |
5857 sort_compare __ARGS((const void *s1, const void *s2)); | 5857 sort_compare(const void *s1, const void *s2); |
5858 | 5858 |
5859 static int | 5859 static int |
5860 #ifdef __BORLANDC__ | 5860 #ifdef __BORLANDC__ |
5861 _RTLENTRYF | 5861 _RTLENTRYF |
5862 #endif | 5862 #endif |
5987 #ifndef MACOS_CLASSIC | 5987 #ifndef MACOS_CLASSIC |
5988 extern | 5988 extern |
5989 #endif | 5989 #endif |
5990 char **environ; /* the global which is your env. */ | 5990 char **environ; /* the global which is your env. */ |
5991 | 5991 |
5992 static int findenv __ARGS((char *name)); /* look for a name in the env. */ | 5992 static int findenv(char *name); /* look for a name in the env. */ |
5993 static int newenv __ARGS((void)); /* copy env. from stack to heap */ | 5993 static int newenv(void); /* copy env. from stack to heap */ |
5994 static int moreenv __ARGS((void)); /* incr. size of env. */ | 5994 static int moreenv(void); /* incr. size of env. */ |
5995 | 5995 |
5996 int | 5996 int |
5997 putenv(string) | 5997 putenv(string) |
5998 const char *string; | 5998 const char *string; |
5999 { | 5999 { |