diff options
author | Michael Reed <m.reed@mykolab.com> | 2015-01-14 00:38:28 -0500 |
---|---|---|
committer | Michael Reed <m.reed@mykolab.com> | 2015-01-14 15:07:16 -0500 |
commit | d86ebc7afb0f80a597d1361f54e838ce4689e36c (patch) | |
tree | 3874f9594796f75e7d1a97bf35b7d591a7389c9c /src | |
parent | 9b4f6fbd33ebd452d472b0333accfcb34e01173b (diff) | |
download | rneovim-d86ebc7afb0f80a597d1361f54e838ce4689e36c.tar.gz rneovim-d86ebc7afb0f80a597d1361f54e838ce4689e36c.tar.bz2 rneovim-d86ebc7afb0f80a597d1361f54e838ce4689e36c.zip |
Macro cleanup: PROTO
Regarding dict_lookup() in eval.c: both definitions are the same, the
only difference being the spacing between the indirection operator and
the indentation level.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 6 | ||||
-rw-r--r-- | src/nvim/charset.c | 5 | ||||
-rw-r--r-- | src/nvim/edit.c | 2 | ||||
-rw-r--r-- | src/nvim/eval.c | 11 | ||||
-rw-r--r-- | src/nvim/ex_cmds.c | 6 | ||||
-rw-r--r-- | src/nvim/ex_cmds2.c | 6 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 6 | ||||
-rw-r--r-- | src/nvim/ex_getln.c | 2 | ||||
-rw-r--r-- | src/nvim/fileio.c | 6 | ||||
-rw-r--r-- | src/nvim/garray.c | 2 | ||||
-rw-r--r-- | src/nvim/getchar.c | 2 | ||||
-rw-r--r-- | src/nvim/mark.c | 2 | ||||
-rw-r--r-- | src/nvim/mbyte.c | 4 | ||||
-rw-r--r-- | src/nvim/memline.c | 2 | ||||
-rw-r--r-- | src/nvim/memory.c | 2 | ||||
-rw-r--r-- | src/nvim/menu.c | 2 | ||||
-rw-r--r-- | src/nvim/misc1.c | 2 | ||||
-rw-r--r-- | src/nvim/ops.c | 2 | ||||
-rw-r--r-- | src/nvim/option.c | 2 | ||||
-rw-r--r-- | src/nvim/os_unix.c | 8 | ||||
-rw-r--r-- | src/nvim/path.c | 6 | ||||
-rw-r--r-- | src/nvim/regexp.c | 2 | ||||
-rw-r--r-- | src/nvim/search.c | 2 | ||||
-rw-r--r-- | src/nvim/strings.c | 4 | ||||
-rw-r--r-- | src/nvim/syntax.c | 2 | ||||
-rw-r--r-- | src/nvim/tag.c | 2 | ||||
-rw-r--r-- | src/nvim/term.c | 8 | ||||
-rw-r--r-- | src/nvim/undo.c | 2 | ||||
-rw-r--r-- | src/nvim/window.c | 2 |
29 files changed, 51 insertions, 59 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 58310a22a4..6880d2c428 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -627,7 +627,7 @@ void goto_buffer(exarg_T *eap, int start, int dir, int count) #endif } -#if defined(HAS_SWAP_EXISTS_ACTION) || defined(PROTO) +#if defined(HAS_SWAP_EXISTS_ACTION) /* * Handle the situation of swap_exists_action being set. * It is allowed for "old_curbuf" to be NULL or invalid. @@ -2351,7 +2351,7 @@ int buflist_add(char_u *fname, int flags) return 0; } -#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +#if defined(BACKSLASH_IN_FILENAME) /* * Adjust slashes in file names. Called after 'shellslash' was set. */ @@ -2752,7 +2752,7 @@ void resettitle(void) mch_settitle(lasttitle, lasticon); } -# if defined(EXITFREE) || defined(PROTO) +# if defined(EXITFREE) void free_titles(void) { free(lasttitle); diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 8781e389ed..b3d0949722 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1849,7 +1849,7 @@ int hex2nr(int c) return c - '0'; } -#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) || defined(PROTO) +#if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) /// Convert two hex characters to a byte. /// Return -1 if one of the characters is not hex. @@ -1866,8 +1866,7 @@ int hexhex2nr(char_u *p) return (hex2nr(p[0]) << 4) + hex2nr(p[1]); } -#endif // if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) - // || defined(PROTO) +#endif // if defined(FEAT_TERMRESPONSE) || defined(FEAT_GUI_GTK) /// Return true if "str" starts with a backslash that should be removed. /// For WIN32 this is only done when the character after the diff --git a/src/nvim/edit.c b/src/nvim/edit.c index e1a1fb18fa..4c00547daa 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -5800,7 +5800,7 @@ void set_last_insert(int c) last_insert_skip = 0; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_last_insert(void) { free(last_insert); diff --git a/src/nvim/eval.c b/src/nvim/eval.c index d60ce2de73..4eb9cd2afa 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -499,7 +499,7 @@ void eval_init(void) job_event_pool = kmp_init(JobEventPool); } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void eval_clear(void) { struct vimvar *p; @@ -4847,7 +4847,6 @@ list_equal ( return item1 == NULL && item2 == NULL; } -#if defined(PROTO) /* * Return the dictitem that an entry in a hashtable points to. */ @@ -4855,12 +4854,6 @@ dictitem_T *dict_lookup(hashitem_T *hi) { return HI2DI(hi); } -#endif - -dictitem_T * dict_lookup(hashitem_T *hi) -{ - return HI2DI(hi); -} /* * Return TRUE when two dictionaries have exactly the same key/values. @@ -18047,7 +18040,7 @@ static ufunc_T *find_func(char_u *name) return NULL; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_all_functions(void) { hashitem_T *hi; diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 03b45f9d49..2094975602 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -825,7 +825,7 @@ void ex_copy(linenr_T line1, linenr_T line2, linenr_T n) static char_u *prevcmd = NULL; /* the previous command */ -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_prev_shellcmd(void) { free(prevcmd); @@ -4609,7 +4609,7 @@ void write_viminfo_sub_string(FILE *fp) } } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_old_sub(void) { free(old_sub); @@ -6184,7 +6184,7 @@ char_u * sign_typenr2name(int typenr) return (char_u *)_("[Deleted]"); } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) /* * Undefine/free all signs. */ diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index c796cf6ac7..7de47cb296 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -2546,7 +2546,7 @@ void ex_scriptnames(exarg_T *eap) } } -# if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +# if defined(BACKSLASH_IN_FILENAME) /* * Fix slashes in the list of script names for 'shellslash'. */ @@ -2579,7 +2579,7 @@ char_u *get_scriptname(scid_T id) return SCRIPT_ITEM(id).sn_name; } -# if defined(EXITFREE) || defined(PROTO) +# if defined(EXITFREE) void free_scriptnames() { # define FREE_SCRIPTNAME(item) free((item)->sn_name) @@ -3204,7 +3204,7 @@ static char_u **find_locales(void) return (char_u **)locales_ga.ga_data; } -# if defined(EXITFREE) || defined(PROTO) +# if defined(EXITFREE) void free_locales(void) { int i; diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 3661a65b11..b4dfe99aed 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -5530,7 +5530,7 @@ void alist_new(void) alist_init(curwin->w_alist); } -#if !defined(UNIX) || defined(PROTO) +#if !defined(UNIX) /* * Expand the file names in the global argument list. * If "fnum_list" is not NULL, use "fnum_list[fnum_len]" as a list of buffer @@ -5623,7 +5623,7 @@ alist_add ( ++al->al_ga.ga_len; } -#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +#if defined(BACKSLASH_IN_FILENAME) /* * Adjust slashes in file names. Called after 'shellslash' was set. */ @@ -6256,7 +6256,7 @@ static void ex_read(exarg_T *eap) static char_u *prev_dir = NULL; -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_cd_dir(void) { free(prev_dir); diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 3ce8263457..b942f69f61 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -1972,7 +1972,7 @@ static void realloc_cmdbuff(int len) static char_u *arshape_buf = NULL; -# if defined(EXITFREE) || defined(PROTO) +# if defined(EXITFREE) void free_cmdline_buf(void) { free(arshape_buf); diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 58e67fa58c..76f7779eb0 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -5149,7 +5149,7 @@ void write_lnum_adjust(linenr_T offset) curbuf->b_no_eol_lnum += offset; } -#if defined(BACKSLASH_IN_FILENAME) || defined(PROTO) +#if defined(BACKSLASH_IN_FILENAME) /* * Convert all backslashes in fname to forward slashes in-place. */ @@ -5547,7 +5547,7 @@ void do_augroup(char_u *arg, int del_group) } } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_all_autocmds(void) { for (current_augroup = -1; current_augroup < augroups.ga_len; @@ -7454,7 +7454,7 @@ file_pat_to_reg_pat ( return reg_pat; } -#if defined(EINTR) || defined(PROTO) +#if defined(EINTR) /* * Version of read() that retries when interrupted by EINTR (possibly * by a SIGWINCH). diff --git a/src/nvim/garray.c b/src/nvim/garray.c index c4f8f66bfe..c3a3426e87 100644 --- a/src/nvim/garray.c +++ b/src/nvim/garray.c @@ -199,7 +199,7 @@ void ga_append(garray_T *gap, char c) GA_APPEND(char, gap, c); } -#if defined(UNIX) || defined(WIN3264) || defined(PROTO) +#if defined(UNIX) || defined(WIN3264) /// Append the text in "gap" below the cursor line and clear "gap". /// diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index e12601e4c9..d97c983133 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1307,7 +1307,7 @@ static void closescript(void) --curscript; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void close_all_scripts(void) { while (scriptin[0] != NULL) diff --git a/src/nvim/mark.c b/src/nvim/mark.c index cf11be665a..cfc702f189 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -1180,7 +1180,7 @@ void set_last_cursor(win_T *win) win->w_buffer->b_last_cursor = win->w_cursor; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_all_marks(void) { int i; diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 3274c8d8ec..7555ba3a9d 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -3452,7 +3452,7 @@ char_u * enc_locale(void) return enc_canonize((char_u *)buf); } -# if defined(USE_ICONV) || defined(PROTO) +# if defined(USE_ICONV) /* @@ -3591,7 +3591,7 @@ static char_u * iconv_string(vimconv_T *vcp, char_u *str, int slen, int *unconvl return result; } -# if defined(DYNAMIC_ICONV) || defined(PROTO) +# if defined(DYNAMIC_ICONV) /* * Dynamically load the "iconv.dll" on Win32. */ diff --git a/src/nvim/memline.c b/src/nvim/memline.c index f6246c8b57..930127b3ea 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -3000,7 +3000,7 @@ static void ml_lineadd(buf_T *buf, int count) } } -#if defined(HAVE_READLINK) || defined(PROTO) +#if defined(HAVE_READLINK) /* * Resolve a symlink in the last component of a file name. * Note that f_resolve() does it for every part of the path, we don't do that diff --git a/src/nvim/memory.c b/src/nvim/memory.c index f38dfd56ac..a2274a25fe 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -440,7 +440,7 @@ void do_outofmem_msg(size_t size) } } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) #include "nvim/file_search.h" #include "nvim/buffer.h" diff --git a/src/nvim/menu.c b/src/nvim/menu.c index ea15fd68e3..9c1ca71477 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -1359,7 +1359,7 @@ void ex_emenu(exarg_T *eap) #if defined(FEAT_GUI_MSWIN) \ || defined(FEAT_GUI_GTK) \ - || defined(FEAT_BEVAL_TIP) || defined(PROTO) + || defined(FEAT_BEVAL_TIP) /* * Given a menu descriptor, e.g. "File.New", find it in the menu hierarchy. */ diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index c0d2e254ac..f756201efb 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -2662,7 +2662,7 @@ void init_homedir(void) } } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_homedir(void) { free(homedir); diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 87a2c2ca05..8fb3ba7f08 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2293,7 +2293,7 @@ void init_yank(void) y_regs[i].y_array = NULL; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void clear_registers(void) { int i; diff --git a/src/nvim/option.c b/src/nvim/option.c index 6c774937cd..88108b14a2 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2237,7 +2237,7 @@ void set_number_default(char *name, long val) options[opt_idx].def_val[VI_DEFAULT] = (char_u *)val; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) /* * Free all options. */ diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index 7ec4059bce..b777a1b161 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -270,7 +270,7 @@ int use_xterm_mouse(void) return 0; } -#if defined(USE_FNAME_CASE) || defined(PROTO) +#if defined(USE_FNAME_CASE) /* * Set the case of the file name, if it already exists. This will cause the * file name to remain exactly the same. @@ -326,7 +326,7 @@ int len /* buffer size, only used when name gets longer */ } #endif -#if defined(HAVE_ACL) || defined(PROTO) +#if defined(HAVE_ACL) # ifdef HAVE_SYS_ACL_H # include <sys/acl.h> # endif @@ -335,7 +335,7 @@ int len /* buffer size, only used when name gets longer */ # endif -#if defined(HAVE_SELINUX) || defined(PROTO) +#if defined(HAVE_SELINUX) /* * Copy security info from "from_file" to "to_file". */ @@ -437,7 +437,7 @@ int mch_nodetype(char_u *name) return NODE_WRITABLE; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void mch_free_mem(void) { free(oldtitle); diff --git a/src/nvim/path.c b/src/nvim/path.c index 8af4015611..219dac12de 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -403,9 +403,9 @@ char_u *save_absolute_path(const char_u *name) } -#if !defined(NO_EXPANDPATH) || defined(PROTO) +#if !defined(NO_EXPANDPATH) -#if defined(UNIX) || defined(USE_UNIXFILENAME) || defined(PROTO) +#if defined(UNIX) || defined(USE_UNIXFILENAME) /* * Unix style wildcard expansion code. * It's here because it's used both for Unix and Mac. @@ -1622,7 +1622,7 @@ int same_directory(char_u *f1, char_u *f2) && pathcmp((char *)ffname, (char *)f2, (int)(t1 - ffname)) == 0; } -#if !defined(NO_EXPANDPATH) || defined(PROTO) +#if !defined(NO_EXPANDPATH) /* * Compare path "p[]" to "q[]". * If "maxlen" >= 0 compare "p[maxlen]" to "q[maxlen]" diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 62c01e3798..fafd99c046 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -3228,7 +3228,7 @@ static garray_T backpos = GA_EMPTY_INIT_VALUE; #define REGSTACK_INITIAL 2048 #define BACKPOS_INITIAL 64 -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_regexp_stuff(void) { ga_clear(®stack); diff --git a/src/nvim/search.c b/src/nvim/search.c index 25b8277933..e2781f17d5 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -294,7 +294,7 @@ void restore_search_patterns(void) } } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_search_patterns(void) { free(spats[0].pat); diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 25e4a6c93b..20fa35ed1c 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -329,7 +329,7 @@ void vim_strcat(char_u *restrict to, const char_u *restrict from, STRCPY(to + tolen, from); } -#if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) || defined(PROTO) +#if (!defined(HAVE_STRCASECMP) && !defined(HAVE_STRICMP)) /* * Compare two strings, ignoring case, using current locale. * Doesn't work for multi-byte characters. @@ -353,7 +353,7 @@ int vim_stricmp(const char *s1, const char *s2) } #endif -#if (!defined(HAVE_STRNCASECMP) && !defined(HAVE_STRNICMP)) || defined(PROTO) +#if (!defined(HAVE_STRNCASECMP) && !defined(HAVE_STRNICMP)) /* * Compare two strings, for length "len", ignoring case, using current locale. * Doesn't work for multi-byte characters. diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index e9a814bc97..1a1b42924f 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -6644,7 +6644,7 @@ do_highlight ( need_highlight_changed = TRUE; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_highlight(void) { for (int i = 0; i < highlight_ga.ga_len; ++i) { diff --git a/src/nvim/tag.c b/src/nvim/tag.c index fb39e069f0..bab594a27d 100644 --- a/src/nvim/tag.c +++ b/src/nvim/tag.c @@ -1981,7 +1981,7 @@ static void found_tagfile_cb(char_u *fname, void *cookie) GA_APPEND(char_u *, &tag_fnames, vim_strsave(fname)); } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void free_tag_stuff(void) { ga_clear_strings(&tag_fnames); diff --git a/src/nvim/term.c b/src/nvim/term.c index b78b01b68a..85e09afaca 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -1487,7 +1487,7 @@ set_mouse_termcode ( add_termcode(name, s, FALSE); } -# if (defined(UNIX) && defined(FEAT_MOUSE_TTY)) || defined(PROTO) +# if (defined(UNIX) && defined(FEAT_MOUSE_TTY)) void del_mouse_termcode ( char_u n /* KS_MOUSE, KS_NETTERM_MOUSE or KS_DEC_MOUSE */ @@ -1704,7 +1704,7 @@ static char_u term_7to8bit(char_u *p) } -#if !defined(HAVE_TGETENT) || defined(PROTO) +#if !defined(HAVE_TGETENT) char_u *tltoa(unsigned long i) { @@ -1945,7 +1945,7 @@ void term_delete_lines(int line_count) OUT_STR(tgoto((char *)T_CDL, 0, line_count)); } -#if defined(HAVE_TGETENT) || defined(PROTO) +#if defined(HAVE_TGETENT) void term_set_winpos(int x, int y) { /* Can't handle a negative value here */ @@ -2010,7 +2010,7 @@ static void term_color(char_u *s, int n) OUT_STR(tgoto((char *)s, 0, n)); } -#if defined(UNIX) || defined(MACOS_X) || defined(PROTO) +#if defined(UNIX) || defined(MACOS_X) /* * Generic function to set window title, using t_ts and t_fs. */ diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 59920cfbe1..4d84c69158 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -128,7 +128,7 @@ static int undo_undoes = FALSE; static int lastmark = 0; -#if defined(U_DEBUG) || defined(PROTO) +#if defined(U_DEBUG) /* * Check the undo structures for being valid. Print a warning when something * looks wrong. diff --git a/src/nvim/window.c b/src/nvim/window.c index f9190e6915..cf0977e280 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2060,7 +2060,7 @@ win_free_mem ( return wp; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) void win_free_all(void) { int dummy; |