diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-01-30 19:39:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-01-30 19:39:49 +0100 |
commit | 9b57814db13c29ecb08260b36923c0e1c8a373a9 (patch) | |
tree | 518df78530838cc70b222930955e2c0522ddd393 | |
parent | 52ea13da0fe86df1abf34de52841e367035170c0 (diff) |
patch 7.4.1211v7.4.1211
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
-rw-r--r-- | src/misc1.c | 706 | ||||
-rw-r--r-- | src/misc2.c | 599 | ||||
-rw-r--r-- | src/move.c | 148 | ||||
-rw-r--r-- | src/netbeans.c | 21 | ||||
-rw-r--r-- | src/normal.c | 500 | ||||
-rw-r--r-- | src/ops.c | 463 | ||||
-rw-r--r-- | src/option.c | 491 | ||||
-rw-r--r-- | src/version.c | 2 |
8 files changed, 1151 insertions, 1779 deletions
diff --git a/src/misc1.c b/src/misc1.c index ec7792e738..d432125385 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -30,7 +30,7 @@ static garray_T ga_users; * Count the size (in window cells) of the indent in the current line. */ int -get_indent() +get_indent(void) { return get_indent_str(ml_get_curline(), (int)curbuf->b_p_ts, FALSE); } @@ -39,8 +39,7 @@ get_indent() * Count the size (in window cells) of the indent in line "lnum". */ int -get_indent_lnum(lnum) - linenr_T lnum; +get_indent_lnum(linenr_T lnum) { return get_indent_str(ml_get(lnum), (int)curbuf->b_p_ts, FALSE); } @@ -51,9 +50,7 @@ get_indent_lnum(lnum) * "buf". */ int -get_indent_buf(buf, lnum) - buf_T *buf; - linenr_T lnum; +get_indent_buf(buf_T *buf, linenr_T lnum) { return get_indent_str(ml_get_buf(buf, lnum, FALSE), (int)buf->b_p_ts, FALSE); } @@ -64,10 +61,10 @@ get_indent_buf(buf, lnum) * 'tabstop' at "ts" */ int -get_indent_str(ptr, ts, list) - char_u *ptr; - int ts; - int list; /* if TRUE, count only screen size for tabs */ +get_indent_str( + char_u *ptr, + int ts, + int list) /* if TRUE, count only screen size for tabs */ { int count = 0; @@ -101,9 +98,9 @@ get_indent_str(ptr, ts, list) * Returns TRUE if the line was changed. */ int -set_indent(size, flags) - int size; /* measured in spaces */ - int flags; +set_indent( + int size, /* measured in spaces */ + int flags) { char_u *p; char_u *newline; @@ -338,9 +335,7 @@ set_indent(size, flags) * Returns TRUE if the line was changed. */ static int -copy_indent(size, src) - int size; - char_u *src; +copy_indent(int size, char_u *src) { char_u *p = NULL; char_u *line = NULL; @@ -442,8 +437,7 @@ copy_indent(size, src) * Since a pattern is used it can actually handle more than numbers. */ int -get_number_indent(lnum) - linenr_T lnum; +get_number_indent(linenr_T lnum) { colnr_T col; pos_T pos; @@ -491,9 +485,9 @@ get_number_indent(lnum) * necessarily always the current one. */ int -get_breakindent_win(wp, line) - win_T *wp; - char_u *line; /* start of the line */ +get_breakindent_win( + win_T *wp, + char_u *line) /* start of the line */ { static int prev_indent = 0; /* cached indent value */ static long prev_ts = 0L; /* cached tabstop value */ @@ -547,8 +541,7 @@ static int cin_is_cinword(char_u *line); * Return TRUE if the string "line" starts with a word from 'cinwords'. */ static int -cin_is_cinword(line) - char_u *line; +cin_is_cinword(char_u *line) { char_u *cinw; char_u *cinw_buf; @@ -598,10 +591,10 @@ cin_is_cinword(line) * Return TRUE for success, FALSE for failure */ int -open_line(dir, flags, second_line_indent) - int dir; /* FORWARD or BACKWARD */ - int flags; - int second_line_indent; +open_line( + int dir, /* FORWARD or BACKWARD */ + int flags, + int second_line_indent) { char_u *saved_line; /* copy of the original line */ char_u *next_line = NULL; /* copy of the next line */ @@ -1662,11 +1655,11 @@ theend: * length. */ int -get_leader_len(line, flags, backward, include_space) - char_u *line; - char_u **flags; - int backward; - int include_space; +get_leader_len( + char_u *line, + char_u **flags, + int backward, + int include_space) { int i, j; int result; @@ -1807,9 +1800,7 @@ get_leader_len(line, flags, backward, include_space) * recognized comment leader. */ int -get_last_leader_offset(line, flags) - char_u *line; - char_u **flags; +get_last_leader_offset(char_u *line, char_u **flags) { int result = -1; int i, j; @@ -1950,17 +1941,16 @@ get_last_leader_offset(line, flags) * Return the number of window lines occupied by buffer line "lnum". */ int -plines(lnum) - linenr_T lnum; +plines(linenr_T lnum) { return plines_win(curwin, lnum, TRUE); } int -plines_win(wp, lnum, winheight) - win_T *wp; - linenr_T lnum; - int winheight; /* when TRUE limit to window height */ +plines_win( + win_T *wp, + linenr_T lnum, + int winheight) /* when TRUE limit to window height */ { #if defined(FEAT_DIFF) || defined(PROTO) /* Check for filler lines above this buffer line. When folded the result @@ -1969,17 +1959,16 @@ plines_win(wp, lnum, winheight) } int -plines_nofill(lnum) - linenr_T lnum; +plines_nofill(linenr_T lnum) { return plines_win_nofill(curwin, lnum, TRUE); } int -plines_win_nofill(wp, lnum, winheight) - win_T *wp; - linenr_T lnum; - int winheight; /* when TRUE limit to window height */ +plines_win_nofill( + win_T *wp, + linenr_T lnum, + int winheight) /* when TRUE limit to window height */ { #endif int lines; @@ -2010,9 +1999,7 @@ plines_win_nofill(wp, lnum, winheight) * "wp". Does not care about folding, 'wrap' or 'diff'. */ int -plines_win_nofold(wp, lnum) - win_T *wp; - linenr_T lnum; +plines_win_nofold(win_T *wp, linenr_T lnum) { char_u *s; long col; @@ -2048,10 +2035,7 @@ plines_win_nofold(wp, lnum) * used from the start of the line to the given column number. */ int -plines_win_col(wp, lnum, column) - win_T *wp; - linenr_T lnum; - long column; +plines_win_col(win_T *wp, linenr_T lnum, long column) { long col; char_u *s; @@ -2106,9 +2090,7 @@ plines_win_col(wp, lnum, column) } int -plines_m_win(wp, first, last) - win_T *wp; - linenr_T first, last; +plines_m_win(win_T *wp, linenr_T first, linenr_T last) { int count = 0; @@ -2146,8 +2128,7 @@ plines_m_win(wp, first, last) * Handles Replace mode and multi-byte characters. */ void -ins_bytes(p) - char_u *p; +ins_bytes(char_u *p) { ins_bytes_len(p, (int)STRLEN(p)); } @@ -2160,9 +2141,7 @@ ins_bytes(p) * Handles Replace mode and multi-byte characters. */ void -ins_bytes_len(p, len) - char_u *p; - int len; +ins_bytes_len(char_u *p, int len) { int i; # ifdef FEAT_MBYTE @@ -2193,8 +2172,7 @@ ins_bytes_len(p, len) * convert bytes to a character. */ void -ins_char(c) - int c; +ins_char(int c) { #if defined(FEAT_MBYTE) || defined(PROTO) char_u buf[MB_MAXBYTES + 1]; @@ -2211,9 +2189,7 @@ ins_char(c) } void -ins_char_bytes(buf, charlen) - char_u *buf; - int charlen; +ins_char_bytes(char_u *buf, int charlen) { int c = buf[0]; #endif @@ -2398,8 +2374,7 @@ ins_char_bytes(buf, charlen) * Caller must have prepared for undo. */ void -ins_str(s) - char_u *s; +ins_str(char_u *s) { char_u *oldp, *newp; int newlen = (int)STRLEN(s); @@ -2436,8 +2411,7 @@ ins_str(s) * return FAIL for failure, OK otherwise */ int -del_char(fixpos) - int fixpos; +del_char(int fixpos) { #ifdef FEAT_MBYTE if (has_mbyte) @@ -2457,9 +2431,7 @@ del_char(fixpos) * Like del_bytes(), but delete characters instead of bytes. */ int -del_chars(count, fixpos) - long count; - int fixpos; +del_chars(long count, int fixpos) { long bytes = 0; long i; @@ -2485,10 +2457,10 @@ del_chars(count, fixpos) * return FAIL for failure, OK otherwise */ int -del_bytes(count, fixpos_arg, use_delcombine) - long count; - int fixpos_arg; - int use_delcombine UNUSED; /* 'delcombine' option applies */ +del_bytes( + long count, + int fixpos_arg, + int use_delcombine UNUSED) /* 'delcombine' option applies */ { char_u *oldp, *newp; colnr_T oldlen; @@ -2602,8 +2574,8 @@ del_bytes(count, fixpos_arg, use_delcombine) * return FAIL for failure, OK otherwise */ int -truncate_line(fixpos) - int fixpos; /* if TRUE fix the cursor position when done */ +truncate_line( + int fixpos) /* if TRUE fix the cursor position when done */ { char_u *newp; linenr_T lnum = curwin->w_cursor.lnum; @@ -2636,9 +2608,9 @@ truncate_line(fixpos) * Saves the lines for undo first if "undo" is TRUE. */ void -del_lines(nlines, undo) - long nlines; /* number of lines to delete */ - int undo; /* if TRUE, prepare for undo */ +del_lines( + long nlines, /* number of lines to delete */ + int undo) /* if TRUE, prepare for undo */ { long n; linenr_T first = curwin->w_cursor.lnum; @@ -2673,8 +2645,7 @@ del_lines(nlines, undo) } int -gchar_pos(pos) - pos_T *pos; +gchar_pos(pos_T *pos) { char_u *ptr = ml_get_pos(pos); @@ -2686,7 +2657,7 @@ gchar_pos(pos) } int -gchar_cursor() +gchar_cursor(void) { #ifdef FEAT_MBYTE if (has_mbyte) @@ -2700,8 +2671,7 @@ gchar_cursor() * It is directly written into the block. */ void -pchar_cursor(c) - int c; +pchar_cursor(int c) { *(ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE) + curwin->w_cursor.col) = c; @@ -2714,8 +2684,7 @@ pchar_cursor(c) * the line. */ int -inindent(extra) - int extra; +inindent(int extra) { char_u *ptr; colnr_T col; @@ -2732,8 +2701,7 @@ inindent(extra) * Skip to next part of an option argument: Skip space and comma. */ char_u * -skip_to_option_part(p) - char_u *p; +skip_to_option_part(char_u *p) { if (*p == ',') ++p; @@ -2751,7 +2719,7 @@ skip_to_option_part(p) * Careful: may trigger autocommands that reload the buffer. */ void -changed() +changed(void) { #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) /* The text of the preediting area is inserted, but this doesn't @@ -2806,7 +2774,7 @@ changed() * Internal part of changed(), no user interaction. */ void -changed_int() +changed_int(void) { curbuf->b_changed = TRUE; ml_setflags(curbuf); @@ -2831,9 +2799,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra * Careful: may trigger autocommands that reload the buffer. */ void -changed_bytes(lnum, col) - linenr_T lnum; - colnr_T col; +changed_bytes(linenr_T lnum, colnr_T col) { changedOneline(curbuf, lnum); changed_common(lnum, col, lnum + 1, 0L); @@ -2858,9 +2824,7 @@ changed_bytes(lnum, col) } static void -changedOneline(buf, lnum) - buf_T *buf; - linenr_T lnum; +changedOneline(buf_T *buf, linenr_T lnum) { if (buf->b_mod_set) { @@ -2886,9 +2850,7 @@ changedOneline(buf, lnum) * Takes care of marking the buffer to be redrawn and sets the changed flag. */ void -appended_lines(lnum, count) - linenr_T lnum; - long count; +appended_lines(linenr_T lnum, long count) { changed_lines(lnum + 1, 0, lnum + 1, count); } @@ -2897,9 +2859,7 @@ appended_lines(lnum, count) * Like appended_lines(), but adjust marks first. */ void -appended_lines_mark(lnum, count) - linenr_T lnum; - long count; +appended_lines_mark(linenr_T lnum, long count) { mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L); changed_lines(lnum + 1, 0, lnum + 1, count); @@ -2911,9 +2871,7 @@ appended_lines_mark(lnum, count) * Takes care of marking the buffer to be redrawn and sets the changed flag. */ void -deleted_lines(lnum, count) - linenr_T lnum; - long count; +deleted_lines(linenr_T lnum, long count) { changed_lines(lnum, 0, lnum + count, -count); } @@ -2924,9 +2882,7 @@ deleted_lines(lnum, count) * be triggered to display the cursor. */ void -deleted_lines_mark(lnum, count) - linenr_T lnum; - long count; +deleted_lines_mark(linenr_T lnum, long count) { mark_adjust(lnum, (linenr_T)(lnum + count - 1), (long)MAXLNUM, -count); changed_lines(lnum, 0, lnum + count, -count); @@ -2945,11 +2901,11 @@ deleted_lines_mark(lnum, count) * Careful: may trigger autocommands that reload the buffer. */ void -changed_lines(lnum, col, lnume, xtra) - linenr_T lnum; /* first line with change */ - colnr_T col; /* column in first line with change */ - linenr_T lnume; /* line below last changed line */ - long xtra; /* number of extra lines (negative when deleting) */ +changed_lines( + linenr_T lnum, /* first line with change */ + colnr_T col, /* column in first line with change */ + linenr_T lnume, /* line below last changed line */ + long xtra) /* number of extra lines (negative when deleting) */ { changed_lines_buf(curbuf, lnum, lnume, xtra); @@ -2978,11 +2934,11 @@ changed_lines(lnum, col, lnume, xtra) } static void -changed_lines_buf(buf, lnum, lnume, xtra) - buf_T *buf; - linenr_T lnum; /* first line with change */ - linenr_T lnume; /* line below last changed line */ - long xtra; /* number of extra lines (negative when deleting) */ +changed_lines_buf( + buf_T *buf, + linenr_T lnum, /* first line with change */ + linenr_T lnume, /* line below last changed line */ + long xtra) /* number of extra lines (negative when deleting) */ { if (buf->b_mod_set) { @@ -3016,11 +2972,11 @@ changed_lines_buf(buf, lnum, lnume, xtra) * Careful: may trigger autocommands that reload the buffer. */ static void -changed_common(lnum, col, lnume, xtra) - linenr_T lnum; - colnr_T col; - linenr_T lnume; - long xtra; +changed_common( + linenr_T lnum, + colnr_T col, + linenr_T lnume, + long xtra) { win_T *wp; #ifdef FEAT_WINDOWS @@ -3217,9 +3173,9 @@ changed_common(lnum, col, lnume, xtra) * unchanged() is called when the changed flag must be reset for buffer 'buf' */ void -unchanged(buf, ff) - buf_T *buf; - int ff; /* also reset 'fileformat' */ +unchanged( + buf_T *buf, + int ff) /* also reset 'fileformat' */ { if (buf->b_changed || (ff && file_ff_differs(buf, FALSE))) { @@ -3247,8 +3203,7 @@ unchanged(buf, ff) * need to be updated */ void -check_status(buf) - buf_T *buf; +check_status(buf_T *buf) { win_T *wp; @@ -3271,8 +3226,8 @@ check_status(buf) * Careful: may trigger autocommands that reload the buffer. */ void -change_warning(col) - int col; /* column for message; non-zero when in insert +change_warning( + int col) /* column for message; non-zero when in insert mode and 'showmode' is on */ { static char *w_readonly = N_("W10: Warning: Changing a readonly file"); @@ -3327,9 +3282,7 @@ change_warning(col) * return the 'y' or 'n' */ int -ask_yesno(str, direct) - char_u *str; - int direct; +ask_yesno(char_u *str, int direct) { int r = ' '; int save_State = State; @@ -3376,8 +3329,7 @@ ask_yesno(str, direct) * Return TRUE if "c" is a mouse key. */ int -is_mouse_key(c) - int c; +is_mouse_key(int c) { return c == K_LEFTMOUSE || c == K_LEFTMOUSE_NM @@ -3412,7 +3364,7 @@ is_mouse_key(c) * Translates the interrupt character for unix to ESC. */ int -get_keystroke() +get_keystroke(void) { char_u *buf = NULL; int buflen = 150; @@ -3536,9 +3488,9 @@ get_keystroke() * When "mouse_used" is not NULL allow using the mouse. */ int -get_number(colon, mouse_used) - int colon; /* allow colon to abort */ - int *mouse_used; +get_number( + int colon, /* allow colon to abort */ + int *mouse_used) { int n = 0; int c; @@ -3607,8 +3559,7 @@ get_number(colon, mouse_used) * the line number. */ int -prompt_for_number(mouse_used) - int *mouse_used; +prompt_for_number(int *mouse_used) { int i; int save_cmdline_row; @@ -3645,8 +3596,7 @@ prompt_for_number(mouse_used) } void -msgmore(n) - long n; +msgmore(long n) { long pn; @@ -3699,7 +3649,7 @@ msgmore(n) * flush map and typeahead buffers and give a warning for an error */ void -beep_flush() +beep_flush(void) { if (emsg_silent == 0) { @@ -3712,8 +3662,8 @@ beep_flush() * Give a warning for an error. */ void -vim_beep(val) - unsigned val; /* one of the BO_ values, e.g., BO_OPER */ +vim_beep( + unsigned val) /* one of the BO_ values, e.g., BO_OPER */ { if (emsg_silent == 0) { @@ -3772,7 +3722,7 @@ vim_beep(val) static char_u *homedir = NULL; void -init_homedir() +init_homedir(void) { char_u *var; @@ -3891,14 +3841,14 @@ init_homedir() #if defined(EXITFREE) || defined(PROTO) void -free_homedir() +free_homedir(void) { vim_free(homedir); } # ifdef FEAT_CMDL_COMPL void -free_users() +free_users(void) { ga_clear_strings(&ga_users); } @@ -3911,8 +3861,7 @@ free_users() * again soon. */ char_u * -expand_env_save(src) - char_u *src; +expand_env_save(char_u *src) { return expand_env_save_opt(src, FALSE); } @@ -3922,9 +3871,7 @@ expand_env_save(src) * expand "~" at the start. */ char_u * -expand_env_save_opt(src, one) - char_u *src; - int one; +expand_env_save_opt(char_u *src, int one) { char_u *p; @@ -3941,22 +3888,22 @@ expand_env_save_opt(src, one) * If anything fails no expansion is done and dst equals src. */ void -expand_env(src, dst, dstlen) - char_u *src; /* input string e.g. "$HOME/vim.hlp" */ - char_u *dst; /* where to put the result */ - int dstlen; /* maximum length of the result */ +expand_env( + char_u *src, /* input string e.g. "$HOME/vim.hlp" */ + char_u *dst, /* where to put the result */ + int dstlen) /* maximum length of the result */ { expand_env_esc(src, dst, dstlen, FALSE, FALSE, NULL); } void -expand_env_esc(srcp, dst, dstlen, esc, one, startstr) - char_u *srcp; /* input string e.g. "$HOME/vim.hlp" */ - char_u *dst; /* where to put the result */ - int dstlen; /* maximum length of the result */ - int esc; /* escape spaces in expanded variables */ - int one; /* "srcp" is one file name */ - char_u *startstr; /* start again after this (can be NULL) */ +expand_env_esc( + char_u *srcp, /* input string e.g. "$HOME/vim.hlp" */ + char_u *dst, /* where to put the result */ + int dstlen, /* maximum length of the result */ + int esc, /* escape spaces in expanded variables */ + int one, /* "srcp" is one file name */ + char_u *startstr) /* start again after this (can be NULL) */ { char_u *src; char_u *tail; @@ -4241,9 +4188,7 @@ expand_env_esc(srcp, dst, dstlen, esc, one, startstr) * initialized to FALSE by the caller. */ char_u * -vim_getenv(name, mustfree) - char_u *name; - int *mustfree; +vim_getenv(char_u *name, int *mustfree) { char_u *p; char_u *pend; @@ -4469,8 +4414,7 @@ vim_getenv(name, mustfree) * Return NULL if not, return its name in allocated memory otherwise. */ static char_u * -vim_version_dir(vimdir) - char_u *vimdir; +vim_version_dir(char_u *vimdir) { char_u *p; @@ -4492,10 +4436,7 @@ vim_version_dir(vimdir) * the length of "name/". Otherwise return "pend". */ static char_u * -remove_tail(p, pend, name) - char_u *p; - char_u *pend; - char_u *name; +remove_tail(char_u *p, char_u *pend, char_u *name) { int len = (int)STRLEN(name) + 1; char_u *newend = pend - len; @@ -4511,9 +4452,7 @@ remove_tail(p, pend, name) * Our portable version of setenv. */ void -vim_setenv(name, val) - char_u *name; - char_u *val; +vim_setenv(char_u *name, char_u *val) { #ifdef HAVE_SETENV mch_setenv((char *)name, (char *)val, 1); @@ -4554,9 +4493,9 @@ vim_setenv(name, val) * Function given to ExpandGeneric() to obtain an environment variable name. */ char_u * -get_env_name(xp, idx) - expand_T *xp UNUSED; - int idx; +get_env_name( + expand_T *xp UNUSED, + int idx) { # if defined(AMIGA) || defined(__MRC__) || defined(__SC__) /* @@ -4593,7 +4532,7 @@ get_env_name(xp, idx) * Done only once and then cached. */ static void -init_users() +init_users(void) { static int lazy_init_done = FALSE; @@ -4629,9 +4568,7 @@ init_users() * Function given to ExpandGeneric() to obtain an user names. */ char_u* -get_users(xp, idx) - expand_T *xp UNUSED; - int idx; +get_users(expand_T *xp UNUSED, int idx) { init_users(); if (idx < ga_users.ga_len) @@ -4645,8 +4582,7 @@ get_users(xp, idx) * 1 if name partially matches the beginning of a user name. * 2 is name fully matches a user name. */ -int match_user(name) - char_u* name; +int match_user(char_u* name) { int i; int n = (int)STRLEN(name); @@ -4670,12 +4606,12 @@ int match_user(name) * If anything fails (except when out of space) dst equals src. */ void -home_replace(buf, src, dst, dstlen, one) - buf_T *buf; /* when not NULL, check for help files */ - char_u *src; /* input file name */ - char_u *dst; /* where to put the result */ - int dstlen; /* maximum length of the result */ - int one; /* if TRUE, only replace one file name, include +home_replace( + buf_T *buf, /* when not NULL, check for help files */ + char_u *src, /* input file name */ + char_u *dst, /* where to put the result */ + int dstlen, /* maximum length of the result */ + int one) /* if TRUE, only replace one file name, include spaces and commas in the file name. */ { size_t dirlen = 0, envlen = 0; @@ -4794,9 +4730,9 @@ home_replace(buf, src, dst, dstlen, one) * When something fails, NULL is returned. */ char_u * -home_replace_save(buf, src) - buf_T *buf; /* when not NULL, check for help files */ - char_u *src; /* input file name */ +home_replace_save( + buf_T *buf, /* when not NULL, check for help files */ + char_u *src) /* input file name */ { char_u *dst; unsigned len; @@ -4820,9 +4756,10 @@ home_replace_save(buf, src) * For the first name environment variables are expanded */ int -fullpathcmp(s1, s2, checkname) - char_u *s1, *s2; - int checkname; /* when both don't exist, check file names */ +fullpathcmp( + char_u *s1, + char_u *s2, + int checkname) /* when both don't exist, check file names */ { #ifdef UNIX char_u exp1[MAXPATHL]; @@ -4896,8 +4833,7 @@ fullpathcmp(s1, s2, checkname) * Fail safe: never returns NULL. */ char_u * -gettail(fname) - char_u *fname; +gettail(char_u *fname) { char_u *p1, *p2; @@ -4922,8 +4858,7 @@ static char_u *gettail_dir(char_u *fname); * ^ ^ ^ ^ */ static char_u * -gettail_dir(fname) - char_u *fname; +gettail_dir(char_u *fname) { char_u *dir_end = fname; char_u *next_dir_end = fname; @@ -4958,8 +4893,7 @@ gettail_dir(fname) * Always returns a valid pointer. */ char_u * -gettail_sep(fname) - char_u *fname; +gettail_sep(char_u *fname) { char_u *p; char_u *t; @@ -4979,8 +4913,7 @@ gettail_sep(fname) * get the next path component (just after the next path separator). */ char_u * -getnextcomp(fname) - char_u *fname; +getnextcomp(char_u *fname) { while (*fname && !vim_ispathsep(*fname)) mb_ptr_adv(fname); @@ -4995,8 +4928,7 @@ getnextcomp(fname) * If there is no head, path is returned. */ char_u * -get_past_head(path) - char_u *path; +get_past_head(char_u *path) { char_u *retval; @@ -5028,8 +4960,7 @@ get_past_head(path) * Note that for MS-Windows this includes the colon. */ int -vim_ispathsep(c) - int c; +vim_ispathsep(int c) { #ifdef UNIX return (c == '/'); /* UNIX has ':' inside file names */ @@ -5052,8 +4983,7 @@ vim_ispathsep(c) * Like vim_ispathsep(c), but exclude the colon for MS-Windows. */ int -vim_ispathsep_nocolon(c) - int c; +vim_ispathsep_nocolon(int c) { return vim_ispathsep(c) #ifdef BACKSLASH_IN_FILENAME @@ -5067,8 +4997,7 @@ vim_ispathsep_nocolon(c) * return TRUE if 'c' is a path list separator. */ int -vim_ispathlistsep(c) - int c; +vim_ispathlistsep(int c) { #ifdef UNIX return (c == ':'); @@ -5085,8 +5014,7 @@ vim_ispathlistsep(c) * It's done in-place. */ void -shorten_dir(str) - char_u *str; +shorten_dir(char_u *str) { char_u *tail, *s, *d; int skip = FALSE; @@ -5131,8 +5059,7 @@ shorten_dir(str) * "fname" must be writable!. */ int -dir_of_file_exists(fname) - char_u *fname; +dir_of_file_exists(char_u *fname) { char_u *p; int c; @@ -5153,8 +5080,7 @@ dir_of_file_exists(fname) * and deal with 'fileignorecase'. */ int -vim_fnamecmp(x, y) - char_u *x, *y; +vim_fnamecmp(char_u *x, char_u *y) { #ifdef BACKSLASH_IN_FILENAME return vim_fnamencmp(x, y, MAXPATHL); @@ -5166,9 +5092,7 @@ vim_fnamecmp(x, y) } int -vim_fnamencmp(x, y, len) - char_u *x, *y; - size_t len; +vim_fnamencmp(char_u *x, char_u *y, size_t len) { #ifdef BACKSLASH_IN_FILENAME char_u *px = x; @@ -5204,10 +5128,7 @@ vim_fnamencmp(x, y, len) * Only add a '/' or '\\' when 'sep' is TRUE and it is necessary. */ char_u * -concat_fnames(fname1, fname2, sep) - char_u *fname1; - char_u *fname2; - int sep; +concat_fnames(char_u *fname1, char_u *fname2, int sep) { char_u *dest; @@ -5227,9 +5148,7 @@ concat_fnames(fname1, fname2, sep) * Returns NULL when out of memory. */ char_u * -concat_str(str1, str2) - char_u *str1; - char_u *str2; +concat_str(char_u *str1, char_u *str2) { char_u *dest; size_t l = STRLEN(str1); @@ -5248,8 +5167,7 @@ concat_str(str1, str2) * separator. */ void -add_pathsep(p) - char_u *p; +add_pathsep(char_u *p) { if (*p != NUL && !after_pathsep(p, p + STRLEN(p))) STRCAT(p, PATHSEPSTR); @@ -5260,9 +5178,9 @@ add_pathsep(p) * Returns NULL when out of memory. */ char_u * -FullName_save(fname, force) - char_u *fname; - int force; /* force expansion, even when it already looks +FullName_save( + char_u *fname, + int force) /* force expansion, even when it already looks * like a full path name */ { char_u *buf; @@ -5296,14 +5214,13 @@ static pos_T *find_start_rawstring(int ind_maxcomment); * Return NULL when not inside a comment. */ static pos_T * -ind_find_start_comment() /* XXX */ +ind_find_start_comment(void) /* XXX */ { return find_start_comment(curbuf->b_ind_maxcomment); } pos_T * -find_start_comment(ind_maxcomment) /* XXX */ - int ind_maxcomment; +find_start_comment(int ind_maxcomment) /* XXX */ { pos_T *pos; char_u *line; @@ -5343,7 +5260,7 @@ find_start_comment(ind_maxcomment) /* XXX */ * "CORS" -> Comment Or Raw String */ static pos_T * -ind_find_start_CORS() /* XXX */ +ind_find_start_CORS(void) /* XXX */ { static pos_T comment_pos_copy; pos_T *comment_pos; @@ -5372,8 +5289,7 @@ ind_find_start_CORS() /* XXX */ * Return NULL when not inside a raw string. */ static pos_T * -find_start_rawstring(ind_maxcomment) /* XXX */ - int ind_maxcomment; +find_start_rawstring(int ind_maxcomment) /* XXX */ { pos_T *pos; char_u *line; @@ -5410,8 +5326,7 @@ find_start_rawstring(ind_maxcomment) /* XXX */ * If there is no string or character, return argument unmodified. */ static char_u * -skip_string(p) - char_u *p; +skip_string(char_u *p) { int i; @@ -5484,7 +5399,7 @@ skip_string(p) * Do C or expression indenting on the current line. */ void -do_c_expr_indent() +do_c_expr_indent(void) { # ifdef FEAT_EVAL if (*curbuf->b_p_inde != NUL) @@ -5551,8 +5466,7 @@ static int cin_is_cpp_namespace(char_u *); * Also skip over Perl/shell comments if desired. */ static char_u * -cin_skipcomment(s) - char_u *s; +cin_skipcomment(char_u *s) { while (*s) { @@ -5592,8 +5506,7 @@ cin_skipcomment(s) * not considered code. */ static int -cin_nocode(s) - char_u *s; +cin_nocode(char_u *s) { return *cin_skipcomment(s) == NUL; } @@ -5602,7 +5515,7 @@ cin_nocode(s) * Check previous lines for a "//" line comment, skipping over blank lines. */ static pos_T * -find_line_comment() /* XXX */ +find_line_comment(void) /* XXX */ { static pos_T pos; char_u *line; @@ -5628,8 +5541,7 @@ find_line_comment() /* XXX */ * Return TRUE if "text" starts with "key:". */ static int -cin_has_js_key(text) - char_u *text; +cin_has_js_key(char_u *text) { char_u *s = skipwhite(text); int quote = -1; @@ -5659,8 +5571,7 @@ cin_has_js_key(text) * "*s" must point to the start of the label, if there is one. */ static int -cin_islabel_skip(s) - char_u **s; +cin_islabel_skip(char_u **s) { if (!vim_isIDc(**s)) /* need at least one ID character */ return FALSE; @@ -5679,7 +5590,7 @@ cin_islabel_skip(s) * Note: curwin->w_cursor must be where we are looking for the label. */ int -cin_islabel() /* XXX */ +cin_islabel(void) /* XXX */ { char_u *s; @@ -5784,9 +5695,9 @@ cin_isinit(void) * Recognize a switch label: "case .*:" or "default:". */ int -cin_iscase(s, strict) - char_u *s; - int strict; /* Allow relaxed check of case statement for JS */ +cin_iscase( + char_u *s, + int strict) /* Allow relaxed check of case statement for JS */ { s = cin_skipcomment(s); if (cin_starts_with(s, "case")) @@ -5826,8 +5737,7 @@ cin_iscase(s, strict) * Recognize a "default" switch label. */ static int -cin_isdefault(s) - char_u *s; +cin_isdefault(char_u *s) { return (STRNCMP(s, "default", 7) == 0 && *(s = cin_skipcomment(s + 7)) == ':' @@ -5838,8 +5748,7 @@ cin_isdefault(s) * Recognize a "public/private/protected" scope declaration label. */ int -cin_isscopedecl(s) - char_u *s; +cin_isscopedecl(char_u *s) { int i; @@ -5862,8 +5771,7 @@ cin_isscopedecl(s) * Recognize a "namespace" scope declaration. */ static int -cin_is_cpp_namespace(s) - char_u *s; +cin_is_cpp_namespace(char_u *s) { char_u *p; int has_name = FALSE; @@ -5906,8 +5814,7 @@ cin_is_cpp_namespace(s) * ^ */ static char_u * -after_label(l) - char_u *l; +after_label(char_u *l) { for ( ; *l; ++l) |