diff src/syntax.c @ 7835:4d7ce6c03fda v7.4.1214

commit https://github.com/vim/vim/commit/764b23c8fd3369cb05ae9122abf3ca16fec539d7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 21:10:09 2016 +0100 patch 7.4.1214 Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jan 2016 21:15:04 +0100
parents 1a5d34492798
children 05b88224cea1
line wrap: on
line diff
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -489,9 +489,7 @@ static void syn_incl_toplevel(int id, in
  * window.
  */
     void
-syntax_start(wp, lnum)
-    win_T	*wp;
-    linenr_T	lnum;
+syntax_start(win_T *wp, linenr_T lnum)
 {
     synstate_T	*p;
     synstate_T	*last_valid = NULL;
@@ -668,8 +666,7 @@ syntax_start(wp, lnum)
  * have to manually release their extmatch pointers first.
  */
     static void
-clear_syn_state(p)
-    synstate_T *p;
+clear_syn_state(synstate_T *p)
 {
     int		i;
     garray_T	*gap;
@@ -692,7 +689,7 @@ clear_syn_state(p)
  * Cleanup the current_state stack.
  */
     static void
-clear_current_state()
+clear_current_state(void)
 {
     int		i;
     stateitem_T	*sip;
@@ -713,10 +710,10 @@ clear_current_state()
  * 3. Simply start on a given number of lines above "lnum".
  */
     static void
-syn_sync(wp, start_lnum, last_valid)
-    win_T	*wp;
-    linenr_T	start_lnum;
-    synstate_T	*last_valid;
+syn_sync(
+    win_T	*wp,
+    linenr_T	start_lnum,
+    synstate_T	*last_valid)
 {
     buf_T	*curbuf_save;
     win_T	*curwin_save;
@@ -1009,8 +1006,7 @@ restore_chartab(char_u *chartab)
  * Return TRUE if the line-continuation pattern matches in line "lnum".
  */
     static int
-syn_match_linecont(lnum)
-    linenr_T	lnum;
+syn_match_linecont(linenr_T lnum)
 {
     regmmatch_T regmatch;
     int r;
@@ -1035,7 +1031,7 @@ syn_match_linecont(lnum)
  * Prepare the current state for the start of a line.
  */
     static void
-syn_start_line()
+syn_start_line(void)
 {
     current_finished = FALSE;
     current_col = 0;
@@ -1060,8 +1056,7 @@ syn_start_line()
  * When "startofline" is FALSE the item with "keepend" is forcefully updated.
  */
     static void
-syn_update_ends(startofline)
-    int		startofline;
+syn_update_ends(int startofline)
 {
     stateitem_T	*cur_si;
     int		i;
@@ -1161,8 +1156,7 @@ syn_update_ends(startofline)
  */
 
     static void
-syn_stack_free_block(block)
-    synblock_T	*block;
+syn_stack_free_block(synblock_T *block)
 {
     synstate_T	*p;
 
@@ -1180,8 +1174,7 @@ syn_stack_free_block(block)
  * Used when syntax items changed to force resyncing everywhere.
  */
     void
-syn_stack_free_all(block)
-    synblock_T	*block;
+syn_stack_free_all(synblock_T *block)
 {
     win_T	*wp;
 
@@ -1205,7 +1198,7 @@ syn_stack_free_all(block)
  * Also used to allocate b_sst_array[] for the first time.
  */
     static void
-syn_stack_alloc()
+syn_stack_alloc(void)
 {
     long	len;
     synstate_T	*to, *from;
@@ -1284,8 +1277,7 @@ syn_stack_alloc()
  * displayed buffer.
  */
     void
-syn_stack_apply_changes(buf)
-    buf_T	*buf;
+syn_stack_apply_changes(buf_T *buf)
 {
     win_T	*wp;
 
@@ -1299,9 +1291,7 @@ syn_stack_apply_changes(buf)
 }
 
     static void
-syn_stack_apply_changes_block(block, buf)
-    synblock_T	*block;
-    buf_T	*buf;
+syn_stack_apply_changes_block(synblock_T *block, buf_T *buf)
 {
     synstate_T	*p, *prev, *np;
     linenr_T	n;
@@ -1353,7 +1343,7 @@ syn_stack_apply_changes_block(block, buf
  * Returns TRUE if at least one entry was freed.
  */
     static int
-syn_stack_cleanup()
+syn_stack_cleanup(void)
 {
     synstate_T	*p, *prev;
     disptick_T	tick;
@@ -1417,9 +1407,7 @@ syn_stack_cleanup()
  * Move the entry into the free list.
  */
     static void
-syn_stack_free_entry(block, p)
-    synblock_T	*block;
-    synstate_T	*p;
+syn_stack_free_entry(synblock_T *block, synstate_T *p)
 {
     clear_syn_state(p);
     p->sst_next = block->b_sst_firstfree;
@@ -1432,8 +1420,7 @@ syn_stack_free_entry(block, p)
  * Returns NULL when there is no entry or the first entry is after "lnum".
  */
     static synstate_T *
-syn_stack_find_entry(lnum)
-    linenr_T	lnum;
+syn_stack_find_entry(linenr_T lnum)
 {
     synstate_T	*p, *prev;
 
@@ -1453,7 +1440,7 @@ syn_stack_find_entry(lnum)
  * The current state must be valid for the start of the current_lnum line!
  */
     static synstate_T *
-store_current_state()
+store_current_state(void)
 {
     int		i;
     synstate_T	*p;
@@ -1576,8 +1563,7 @@ store_current_state()
  * Copy a state stack from "from" in b_sst_array[] to current_state;
  */
     static void
-load_current_state(from)
-    synstate_T	*from;
+load_current_state(synstate_T *from)
 {
     int		i;
     bufstate_T	*bp;
@@ -1624,8 +1610,7 @@ load_current_state(from)
  * Return TRUE when they are equal.
  */
     static int
-syn_stack_equal(sp)
-    synstate_T *sp;
+syn_stack_equal(synstate_T *sp)
 {
     int		i, j;
     bufstate_T	*bp;
@@ -1697,8 +1682,7 @@ syn_stack_equal(sp)
  * lnum ->  line below window
  */
     void
-syntax_end_parsing(lnum)
-    linenr_T	lnum;
+syntax_end_parsing(linenr_T lnum)
 {
     synstate_T	*sp;
 
@@ -1715,7 +1699,7 @@ syntax_end_parsing(lnum)
  ****************************************/
 
     static void
-invalidate_current_state()
+invalidate_current_state(void)
 {
     clear_current_state();
     current_state.ga_itemsize = 0;	/* mark current_state invalid */
@@ -1724,7 +1708,7 @@ invalidate_current_state()
 }
 
     static void
-validate_current_state()
+validate_current_state(void)
 {
     current_state.ga_itemsize = sizeof(stateitem_T);
     current_state.ga_growsize = 3;
@@ -1736,8 +1720,7 @@ validate_current_state()
  * line, to check if the next line needs to be redrawn too.
  */
     int
-syntax_check_changed(lnum)
-    linenr_T	lnum;
+syntax_check_changed(linenr_T lnum)
 {
     int		retval = TRUE;
     synstate_T	*sp;
@@ -1785,8 +1768,8 @@ syntax_check_changed(lnum)
  * is valid.
  */
     static int
-syn_finish_line(syncing)
-    int	    syncing;		/* called for syncing */
+syn_finish_line(
+    int	    syncing)		/* called for syncing */
 {
     stateitem_T	*cur_si;
     colnr_T	prev_current_col;
@@ -1835,10 +1818,10 @@ syn_finish_line(syncing)
  * done.
  */
     int
-get_syntax_attr(col, can_spell, keep_state)
-    colnr_T	col;
-    int		*can_spell;
-    int		keep_state;	/* keep state of char at "col" */
+get_syntax_attr(
+    colnr_T	col,
+    int		*can_spell,
+    int		keep_state)	/* keep state of char at "col" */
 {
     int	    attr = 0;
 
@@ -1888,11 +1871,11 @@ get_syntax_attr(col, can_spell, keep_sta
  * Get syntax attributes for current_lnum, current_col.
  */
     static int
-syn_current_attr(syncing, displaying, can_spell, keep_state)
-    int		syncing;		/* When 1: called for syncing */
-    int		displaying;		/* result will be displayed */
-    int		*can_spell;		/* return: do spell checking */
-    int		keep_state;		/* keep syntax stack afterwards */
+syn_current_attr(
+    int		syncing,		/* When 1: called for syncing */
+    int		displaying,		/* result will be displayed */
+    int		*can_spell,		/* return: do spell checking */
+    int		keep_state)		/* keep syntax stack afterwards */
 {
     int		syn_id;
     lpos_T	endpos;		/* was: char_u *endp; */
@@ -2481,9 +2464,7 @@ syn_current_attr(syncing, displaying, ca
  * Check if we already matched pattern "idx" at the current column.
  */
     static int
-did_match_already(idx, gap)
-    int		idx;
-    garray_T	*gap;
+did_match_already(int idx, garray_T *gap)
 {
     int		i;
 
@@ -2506,8 +2487,7 @@ did_match_already(idx, gap)
  * Push the next match onto the stack.
  */
     static stateitem_T *
-push_next_match(cur_si)
-    stateitem_T	*cur_si;
+push_next_match(stateitem_T *cur_si)
 {
     synpat_T	*spp;
 #ifdef FEAT_CONCEAL
@@ -2600,7 +2580,7 @@ push_next_match(cur_si)
  * Check for end of current state (and the states before it).
  */
     static void
-check_state_ends()
+check_state_ends(void)
 {
     stateitem_T	*cur_si;
     int		had_extend;
@@ -2705,8 +2685,7 @@ check_state_ends()
  * fills in si_attr, si_next_list and si_cont_list.
  */
     static void
-update_si_attr(idx)
-    int	    idx;
+update_si_attr(int idx)
 {
     stateitem_T	*sip = &CUR_STATE(idx);
     synpat_T	*spp;
@@ -2761,7 +2740,7 @@ update_si_attr(idx)
  * Propagate the match-end to contained items, until a "skipend" item is found.
  */
     static void
-check_keepend()
+check_keepend(void)
 {
     int		i;
     lpos_T	maxpos;
@@ -2821,10 +2800,10 @@ check_keepend()
  * Return the flags for the matched END.
  */
     static void
-update_si_end(sip, startcol, force)
-    stateitem_T	*sip;
-    int		startcol;   /* where to start searching for the end */
-    int		force;	    /* when TRUE overrule a previous end */
+update_si_end(
+    stateitem_T	*sip,
+    int		startcol,   /* where to start searching for the end */
+    int		force)	    /* when TRUE overrule a previous end */
 {
     lpos_T	startpos;
     lpos_T	endpos;
@@ -2887,8 +2866,7 @@ update_si_end(sip, startcol, force)
  * Return FAIL if it's not possible (out of memory).
  */
     static int
-push_current_state(idx)
-    int	    idx;
+push_current_state(int idx)
 {
     if (ga_grow(&current_state, 1) == FAIL)
 	return FAIL;
@@ -2902,7 +2880,7 @@ push_current_state(idx)
  * Remove a state from the current_state stack.
  */
     static void
-pop_current_state()
+pop_current_state(void)
 {
     if (current_state.ga_len)
     {
@@ -2927,16 +2905,15 @@ pop_current_state()
  * computed.
  */
     static void
-find_endpos(idx, startpos, m_endpos, hl_endpos, flagsp, end_endpos,
-							   end_idx, start_ext)
-    int		idx;		/* index of the pattern */
-    lpos_T	*startpos;	/* where to start looking for an END match */
-    lpos_T	*m_endpos;	/* return: end of match */
-    lpos_T	*hl_endpos;	/* return: end of highlighting */
-    long	*flagsp;	/* return: flags of matching END */
-    lpos_T	*end_endpos;	/* return: end of end pattern match */
-    int		*end_idx;	/* return: group ID for end pat. match, or 0 */
-    reg_extmatch_T *start_ext;	/* submatches from the start pattern */
+find_endpos(
+    int		idx,		/* index of the pattern */
+    lpos_T	*startpos,	/* where to start looking for an END match */
+    lpos_T	*m_endpos,	/* return: end of match */
+    lpos_T	*hl_endpos,	/* return: end of highlighting */
+    long	*flagsp,	/* return: flags of matching END */
+    lpos_T	*end_endpos,	/* return: end of end pattern match */
+    int		*end_idx,	/* return: group ID for end pat. match, or 0 */
+    reg_extmatch_T *start_ext)	/* submatches from the start pattern */
 {
     colnr_T	matchcol;
     synpat_T	*spp, *spp_skip;
@@ -3165,9 +3142,7 @@ find_endpos(idx, startpos, m_endpos, hl_
  * Limit "pos" not to be after "limit".
  */
     static void
-limit_pos(pos, limit)
-    lpos_T	*pos;
-    lpos_T	*limit;
+limit_pos(lpos_T *pos, lpos_T *limit)
 {
     if (pos->lnum > limit->lnum)
 	*pos = *limit;
@@ -3179,9 +3154,9 @@ limit_pos(pos, limit)
  * Limit "pos" not to be after "limit", unless pos->lnum is zero.
  */
     static void
-limit_pos_zero(pos, limit)
-    lpos_T	*pos;
-    lpos_T	*limit;
+limit_pos_zero(
+    lpos_T	*pos,
+    lpos_T	*limit)
 {
     if (pos->lnum == 0)
 	*pos = *limit;
@@ -3193,12 +3168,12 @@ limit_pos_zero(pos, limit)
  * Add offset to matched text for end of match or highlight.
  */
     static void
-syn_add_end_off(result, regmatch, spp, idx, extra)
-    lpos_T	*result;	/* returned position */
-    regmmatch_T	*regmatch;	/* start/end of match */
-    synpat_T	*spp;		/* matched pattern */
-    int		idx;		/* index of offset */
-    int		extra;		/* extra chars for offset to start */
+syn_add_end_off(
+    lpos_T	*result,	/* returned position */
+    regmmatch_T	*regmatch,	/* start/end of match */
+    synpat_T	*spp,		/* matched pattern */
+    int		idx,		/* index of offset */
+    int		extra)		/* extra chars for offset to start */
 {
     int		col;
     int		off;
@@ -3245,12 +3220,12 @@ syn_add_end_off(result, regmatch, spp, i
  * Avoid resulting column to become negative.
  */
     static void
-syn_add_start_off(result, regmatch, spp, idx, extra)
-    lpos_T	*result;	/* returned position */
-    regmmatch_T	*regmatch;	/* start/end of match */
-    synpat_T	*spp;
-    int		idx;
-    int		extra;	    /* extra chars for offset to end */
+syn_add_start_off(
+    lpos_T	*result,	/* returned position */
+    regmmatch_T	*regmatch,	/* start/end of match */
+    synpat_T	*spp,
+    int		idx,
+    int		extra)	    /* extra chars for offset to end */
 {
     int		col;
     int		off;
@@ -3298,7 +3273,7 @@ syn_add_start_off(result, regmatch, spp,
  * Get current line in syntax buffer.
  */
     static char_u *
-syn_getcurline()
+syn_getcurline(void)
 {
     return ml_get_buf(syn_buf, current_lnum, FALSE);
 }
@@ -3308,11 +3283,11 @@ syn_getcurline()
  * Returns TRUE when there is a match.
  */
     static int
-syn_regexec(rmp, lnum, col, st)
-    regmmatch_T	*rmp;
-    linenr_T	lnum;
-    colnr_T	col;
-    syn_time_T  *st UNUSED;
+syn_regexec(
+    regmmatch_T	*rmp,
+    linenr_T	lnum,
+    colnr_T	col,
+    syn_time_T  *st UNUSED)
 {
     int r;
 #ifdef FEAT_PROFILE
@@ -3353,14 +3328,14 @@ syn_regexec(rmp, lnum, col, st)
  * Return it's ID if found, 0 otherwise.
  */
     static int
-check_keyword_id(line, startcol, endcolp, flagsp, next_listp, cur_si, ccharp)
-    char_u	*line;
-    int		startcol;	/* position in line to check for keyword */
-    int		*endcolp;	/* return: character after found keyword */
-    long	*flagsp;	/* return: flags of matching keyword */
-    short	**next_listp;	/* return: next_list of matching keyword */
-    stateitem_T	*cur_si;	/* item at the top of the stack */
-    int		*ccharp UNUSED;	/* conceal substitution char */
+check_keyword_id(
+    char_u	*line,
+    int		startcol,	/* position in line to check for keyword */
+    int		*endcolp,	/* return: character after found keyword */
+    long	*flagsp,	/* return: flags of matching keyword */
+    short	**next_listp,	/* return: next_list of matching keyword */
+    stateitem_T	*cur_si,	/* item at the top of the stack */
+    int		*ccharp UNUSED)	/* conceal substitution char */
 {
     keyentry_T	*kp;
     char_u	*kwp;
@@ -3442,9 +3417,7 @@ check_keyword_id(line, startcol, endcolp
  * Handle ":syntax conceal" command.
  */
     static void
-syn_cmd_conceal(eap, syncing)
-    exarg_T	*eap UNUSED;
-    int		syncing UNUSED;
+syn_cmd_conceal(exarg_T *eap UNUSED, int syncing UNUSED)
 {
 #ifdef FEAT_CONCEAL
     char_u	*arg = eap->arg;
@@ -3468,9 +3441,7 @@ syn_cmd_conceal(eap, syncing)
  * Handle ":syntax case" command.
  */
     static void
-syn_cmd_case(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_case(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     char_u	*next;
@@ -3492,9 +3463,7 @@ syn_cmd_case(eap, syncing)
  * Handle ":syntax spell" command.
  */
     static void
-syn_cmd_spell(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_spell(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     char_u	*next;
@@ -3524,9 +3493,7 @@ syn_cmd_spell(eap, syncing)
  * Handle ":syntax iskeyword" command.
  */
     static void
-syn_cmd_iskeyword(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_iskeyword(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     char_u	save_chartab[32];
@@ -3575,8 +3542,7 @@ syn_cmd_iskeyword(eap, syncing)
  * Clear all syntax info for one buffer.
  */
     void
-syntax_clear(block)
-    synblock_T	*block;
+syntax_clear(synblock_T *block)
 {
     int i;
 
@@ -3627,8 +3593,7 @@ syntax_clear(block)
  * Get rid of ownsyntax for window "wp".
  */
     void
-reset_synblock(wp)
-    win_T *wp;
+reset_synblock(win_T *wp)
 {
     if (wp->w_s != &wp->w_buffer->b_s)
     {
@@ -3642,7 +3607,7 @@ reset_synblock(wp)
  * Clear syncing info for one buffer.
  */
     static void
-syntax_sync_clear()
+syntax_sync_clear(void)
 {
     int i;
 
@@ -3669,9 +3634,9 @@ syntax_sync_clear()
  * Remove one pattern from the buffer's pattern list.
  */
     static void
-syn_remove_pattern(block, idx)
-    synblock_T	*block;
-    int		idx;
+syn_remove_pattern(
+    synblock_T	*block,
+    int		idx)
 {
     synpat_T	*spp;
 
@@ -3691,9 +3656,7 @@ syn_remove_pattern(block, idx)
  * last to first!
  */
     static void
-syn_clear_pattern(block, i)
-    synblock_T	*block;
-    int		i;
+syn_clear_pattern(synblock_T *block, int i)
 {
     vim_free(SYN_ITEMS(block)[i].sp_pattern);
     vim_regfree(SYN_ITEMS(block)[i].sp_prog);
@@ -3710,9 +3673,7 @@ syn_clear_pattern(block, i)
  * Clear and free one syntax cluster.
  */
     static void
-syn_clear_cluster(block, i)
-    synblock_T	*block;
-    int		i;
+syn_clear_cluster(synblock_T *block, int i)
 {
     vim_free(SYN_CLSTR(block)[i].scl_name);
     vim_free(SYN_CLSTR(block)[i].scl_name_u);
@@ -3723,9 +3684,7 @@ syn_clear_cluster(block, i)
  * Handle ":syntax clear" command.
  */
     static void
-syn_cmd_clear(eap, syncing)
-    exarg_T	*eap;
-    int		syncing;
+syn_cmd_clear(exarg_T *eap, int syncing)
 {
     char_u	*arg = eap->arg;
     char_u	*arg_end;
@@ -3810,9 +3769,7 @@ syn_cmd_clear(eap, syncing)
  * Clear one syntax group for the current buffer.
  */
     static void
-syn_clear_one(id, syncing)
-    int		id;
-    int		syncing;
+syn_clear_one(int id, int syncing)
 {
     synpat_T	*spp;
     int		idx;
@@ -3838,9 +3795,7 @@ syn_clear_one(id, syncing)
  * Handle ":syntax on" command.
  */
     static void
-syn_cmd_on(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_on(exarg_T *eap, int syncing UNUSED)
 {
     syn_cmd_onoff(eap, "syntax");
 }
@@ -3849,9 +3804,7 @@ syn_cmd_on(eap, syncing)
  * Handle ":syntax enable" command.
  */
     static void
-syn_cmd_enable(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_enable(exarg_T *eap, int syncing UNUSED)
 {
     set_internal_string_var((char_u *)"syntax_cmd", (char_u *)"enable");
     syn_cmd_onoff(eap, "syntax");
@@ -3862,9 +3815,7 @@ syn_cmd_enable(eap, syncing)
  * Handle ":syntax reset" command.
  */
     static void
-syn_cmd_reset(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_reset(exarg_T *eap, int syncing UNUSED)
 {
     eap->nextcmd = check_nextcmd(eap->arg);
     if (!eap->skip)
@@ -3880,9 +3831,7 @@ syn_cmd_reset(eap, syncing)
  * Handle ":syntax manual" command.
  */
     static void
-syn_cmd_manual(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_manual(exarg_T *eap, int syncing UNUSED)
 {
     syn_cmd_onoff(eap, "manual");
 }
@@ -3891,17 +3840,13 @@ syn_cmd_manual(eap, syncing)
  * Handle ":syntax off" command.
  */
     static void
-syn_cmd_off(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_off(exarg_T *eap, int syncing UNUSED)
 {
     syn_cmd_onoff(eap, "nosyntax");
 }
 
     static void
-syn_cmd_onoff(eap, name)
-    exarg_T	*eap;
-    char	*name;
+syn_cmd_onoff(exarg_T *eap, char *name)
 {
     char_u	buf[100];
 
@@ -3918,9 +3863,9 @@ syn_cmd_onoff(eap, name)
  * Handle ":syntax [list]" command: list current syntax words.
  */
     static void
-syn_cmd_list(eap, syncing)
-    exarg_T	*eap;
-    int		syncing;	    /* when TRUE: list syncing items */
+syn_cmd_list(
+    exarg_T	*eap,
+    int		syncing)	    /* when TRUE: list syncing items */
 {
     char_u	*arg = eap->arg;
     int		id;
@@ -4011,7 +3956,7 @@ syn_cmd_list(eap, syncing)
 }
 
     static void
-syn_lines_msg()
+syn_lines_msg(void)
 {
     if (curwin->w_s->b_syn_sync_maxlines > 0
 				      || curwin->w_s->b_syn_sync_minlines > 0)
@@ -4034,7 +3979,7 @@ syn_lines_msg()
 }
 
     static void
-syn_match_msg()
+syn_match_msg(void)
 {
     if (curwin->w_s->b_syn_sync_linebreaks > 0)
     {
@@ -4058,10 +4003,10 @@ static void syn_list_flags(struct name_l
  * List one syntax item, for ":syntax" or "syntax list syntax_name".
  */
     static void
-syn_list_one(id, syncing, link_only)
-    int		id;
-    int		syncing;	    /* when TRUE: list syncing items */
-    int		link_only;	    /* when TRUE; list link-only too */
+syn_list_one(
+    int		id,
+    int		syncing,	    /* when TRUE: list syncing items */
+    int		link_only)	    /* when TRUE; list link-only too */
 {
     int		attr;
     int		idx;
@@ -4169,10 +4114,7 @@ syn_list_one(id, syncing, link_only)
 }
 
     static void
-syn_list_flags(nlist, flags, attr)
-    struct name_list	*nlist;
-    int			flags;
-    int			attr;
+syn_list_flags(struct name_list *nlist, int flags, int attr)
 {
     int		i;
 
@@ -4188,8 +4130,7 @@ syn_list_flags(nlist, flags, attr)
  * List one syntax cluster, for ":syntax" or "syntax list syntax_name".
  */
     static void
-syn_list_cluster(id)
-    int id;
+syn_list_cluster(int id)
 {
     int	    endcol = 15;
 
@@ -4216,10 +4157,7 @@ syn_list_cluster(id)
 }
 
     static void
-put_id_list(name, list, attr)
-    char_u	*name;
-    short	*list;
-    int		attr;
+put_id_list(char_u *name, short *list, int attr)
 {
     short		*p;
 
@@ -4258,11 +4196,11 @@ put_id_list(name, list, attr)
 }
 
     static void
-put_pattern(s, c, spp, attr)
-    char	*s;
-    int		c;
-    synpat_T	*spp;
-    int		attr;
+put_pattern(
+    char	*s,
+    int		c,
+    synpat_T	*spp,
+    int		attr)
 {
     long	n;
     int		mask;
@@ -4331,11 +4269,11 @@ put_pattern(s, c, spp, attr)
  * Return TRUE if the header has been printed.
  */
     static int
-syn_list_keywords(id, ht, did_header, attr)
-    int		id;
-    hashtab_T	*ht;
-    int		did_header;		/* header has already been printed */
-    int		attr;
+syn_list_keywords(
+    int		id,
+    hashtab_T	*ht,
+    int		did_header,		/* header has already been printed */
+    int		attr)
 {
     int		outlen;
     hashitem_T	*hi;
@@ -4429,9 +4367,7 @@ syn_list_keywords(id, ht, did_header, at
 }
 
     static void
-syn_clear_keyword(id, ht)
-    int		id;
-    hashtab_T	*ht;
+syn_clear_keyword(int id, hashtab_T *ht)
 {
     hashitem_T	*hi;
     keyentry_T	*kp;
@@ -4481,8 +4417,7 @@ syn_clear_keyword(id, ht)
  * Clear a whole keyword table.
  */
     static void
-clear_keywtab(ht)
-    hashtab_T	*ht;
+clear_keywtab(hashtab_T *ht)
 {
     hashitem_T	*hi;
     int		todo;
@@ -4512,13 +4447,13 @@ clear_keywtab(ht)
  * Add a keyword to the list of keywords.
  */
     static void
-add_keyword(name, id, flags, cont_in_list, next_list, conceal_char)
-    char_u	*name;	    /* name of keyword */
-    int		id;	    /* group ID for this keyword */
-    int		flags;	    /* flags for this keyword */
-    short	*cont_in_list; /* containedin for this keyword */
-    short	*next_list; /* nextgroup for this keyword */
-    int		conceal_char;
+add_keyword(
+    char_u	*name,	    /* name of keyword */
+    int		id,	    /* group ID for this keyword */
+    int		flags,	    /* flags for this keyword */
+    short	*cont_in_list, /* containedin for this keyword */
+    short	*next_list, /* nextgroup for this keyword */
+    int		conceal_char)
 {
     keyentry_T	*kp;
     hashtab_T	*ht;
@@ -4572,9 +4507,9 @@ add_keyword(name, id, flags, cont_in_lis
  * Return NULL if the end of the command was found instead of further args.
  */
     static char_u *
-get_group_name(arg, name_end)
-    char_u	*arg;		/* start of the argument */
-    char_u	**name_end;	/* pointer to end of the name */
+get_group_name(
+    char_u	*arg,		/* start of the argument */
+    char_u	**name_end)	/* pointer to end of the name */
 {
     char_u	*rest;
 
@@ -4599,10 +4534,10 @@ get_group_name(arg, name_end)
  * Return NULL for any error;
  */
     static char_u *
-get_syn_options(arg, opt, conceal_char)
-    char_u	    *arg;		/* next argument to be checked */
-    syn_opt_arg_T   *opt;		/* various things */
-    int		    *conceal_char UNUSED;
+get_syn_options(
+    char_u	    *arg,		/* next argument to be checked */
+    syn_opt_arg_T   *opt,		/* various things */
+    int		    *conceal_char UNUSED)
 {
     char_u	*gname_start, *gname;
     int		syn_id;
@@ -4788,9 +4723,7 @@ get_syn_options(arg, opt, conceal_char)
  * to the specified top-level group, if any.
  */
     static void
-syn_incl_toplevel(id, flagsp)
-    int		id;
-    int		*flagsp;
+syn_incl_toplevel(int id, int *flagsp)
 {
     if ((*flagsp & HL_CONTAINED) || curwin->w_s->b_syn_topgrp == 0)
 	return;
@@ -4815,9 +4748,7 @@ syn_incl_toplevel(id, flagsp)
  * Handle ":syntax include [@{group-name}] filename" command.
  */
     static void
-syn_cmd_include(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_include(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     int		sgl_id = 1;
@@ -4892,9 +4823,7 @@ syn_cmd_include(eap, syncing)
  * Handle ":syntax keyword {group-name} [{option}] keyword .." command.
  */
     static void
-syn_cmd_keyword(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     char_u	*group_name_end;
@@ -5021,9 +4950,9 @@ error:
  * Also ":syntax sync match {name} [[grouphere | groupthere] {group-name}] .."
  */
     static void
-syn_cmd_match(eap, syncing)
-    exarg_T	*eap;
-    int		syncing;	    /* TRUE for ":syntax sync match .. " */
+syn_cmd_match(
+    exarg_T	*eap,
+    int		syncing)	    /* TRUE for ":syntax sync match .. " */
 {
     char_u	*arg = eap->arg;
     char_u	*group_name_end;
@@ -5125,9 +5054,9 @@ syn_cmd_match(eap, syncing)
  *		start {start} .. [skip {skip}] end {end} .. [{options}]".
  */
     static void
-syn_cmd_region(eap, syncing)
-    exarg_T	*eap;
-    int		syncing;	    /* TRUE for ":syntax sync region .." */
+syn_cmd_region(
+    exarg_T	*eap,
+    int		syncing)	    /* TRUE for ":syntax sync region .." */
 {
     char_u		*arg = eap->arg;
     char_u		*group_name_end;
@@ -5394,9 +5323,7 @@ syn_cmd_region(eap, syncing)
 #ifdef __BORLANDC__
 _RTLENTRYF
 #endif
-syn_compare_stub(v1, v2)
-    const void	*v1;
-    const void	*v2;
+syn_compare_stub(const void *v1, const void *v2)
 {
     const short	*s1 = v1;
     const short	*s2 = v2;
@@ -5409,10 +5336,7 @@ syn_compare_stub(v1, v2)
  * *clstr1 and *clstr2 must both be allocated memory; they will be consumed.
  */
     static void
-syn_combine_list(clstr1, clstr2, list_op)
-    short	**clstr1;
-    short	**clstr2;
-    int		list_op;
+syn_combine_list(short **clstr1, short **clstr2, int list_op)
 {
     int		count1 = 0;
     int		count2 = 0;
@@ -5536,8 +5460,7 @@ syn_combine_list(clstr1, clstr2, list_op
  * If it is not found, 0 is returned.
  */
     static int
-syn_scl_name2id(name)
-    char_u	*name;
+syn_scl_name2id(char_u *name)
 {
     int		i;
     char_u	*name_u;
@@ -5558,9 +5481,7 @@ syn_scl_name2id(name)
  * Like syn_scl_name2id(), but take a pointer + length argument.
  */
     static int
-syn_scl_namen2id(linep, len)
-    char_u  *linep;
-    int	    len;
+syn_scl_namen2id(char_u *linep, int len)
 {
     char_u  *name;
     int	    id = 0;
@@ -5581,9 +5502,7 @@ syn_scl_namen2id(linep, len)
  * Return 0 for failure.
  */
     static int
-syn_check_cluster(pp, len)
-    char_u	*pp;
-    int		len;
+syn_check_cluster(char_u *pp, int len)
 {
     int		id;
     char_u	*name;
@@ -5606,8 +5525,7 @@ syn_check_cluster(pp, len)
  * Return 0 for failure.
  */
     static int
-syn_add_cluster(name)
-    char_u	*name;
+syn_add_cluster(char_u *name)
 {
     int		len;
 
@@ -5656,9 +5574,7 @@ syn_add_cluster(name)
  *		[add={groupname},..] [remove={groupname},..]".
  */
     static void
-syn_cmd_cluster(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_cluster(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg = eap->arg;
     char_u	*group_name_end;
@@ -5733,7 +5649,7 @@ syn_cmd_cluster(eap, syncing)
  * On first call for current buffer: Init growing array.
  */
     static void
-init_syn_patterns()
+init_syn_patterns(void)
 {
     curwin->w_s->b_syn_patterns.ga_itemsize = sizeof(synpat_T);
     curwin->w_s->b_syn_patterns.ga_growsize = 10;
@@ -5745,9 +5661,7 @@ init_syn_patterns()
  * Returns a pointer to the next argument, or NULL in case of an error.
  */
     static char_u *
-get_syn_pattern(arg, ci)
-    char_u	*arg;
-    synpat_T	*ci;
+get_syn_pattern(char_u *arg, synpat_T *ci)
 {
     char_u	*end;
     int		*p;
@@ -5849,9 +5763,7 @@ get_syn_pattern(arg, ci)
  * Handle ":syntax sync .." command.
  */
     static void
-syn_cmd_sync(eap, syncing)
-    exarg_T	*eap;
-    int		syncing UNUSED;
+syn_cmd_sync(exarg_T *eap, int syncing UNUSED)
 {
     char_u	*arg_start = eap->arg;
     char_u	*arg_end;
@@ -6010,10 +5922,10 @@ syn_cmd_sync(eap, syncing)
  * returns FAIL for some error, OK for success.
  */
     static int
-get_id_list(arg, keylen, list)
-    char_u	**arg;
-    int		keylen;		/* length of keyword */
-    short	**list;		/* where to store the resulting list, if not
+get_id_list(
+    char_u	**arg,
+    int		keylen,		/* length of keyword */
+    short	**list)		/* where to store the resulting list, if not
 				   NULL, the list is silently skipped! */
 {
     char_u	*p = NULL;
@@ -6207,8 +6119,7 @@ get_id_list(arg, keylen, list)
  * Make a copy of an ID list.
  */
     static short *
-copy_id_list(list)
-    short   *list;
+copy_id_list(short *list)
 {
     int	    len;
     int	    count;
@@ -6235,11 +6146,11 @@ copy_id_list(list)
  * This function is called very often, keep it fast!!
  */
     static int
-in_id_list(cur_si, list, ssp, contained)
-    stateitem_T	*cur_si;	/* current item or NULL */
-    short	*list;		/* id list */
-    struct sp_syn *ssp;		/* group id and ":syn include" tag of group */
-    int		contained;	/* group id is contained */
+in_id_list(
+    stateitem_T	*cur_si,	/* current item or NULL */
+    short	*list,		/* id list */
+    struct sp_syn *ssp,		/* group id and ":syn include" tag of group */
+    int		contained)	/* group id is contained */
 {
     int		retval;
     short	*scl_list;
@@ -6367,8 +6278,7 @@ static struct subcommand subcommands[] =
  * syntax_subcommand() function to do the rest.
  */
     void
-ex_syntax(eap)
-    exarg_T	*eap;
+ex_syntax(exarg_T *eap)
 {
     char_u	*arg = eap->arg;
     char_u	*subcmd_end;
@@ -6406,8 +6316,7 @@ ex_syntax(eap)
 }
 
     void
-ex_ownsyntax(eap)
-    exarg_T	*eap;
+ex_ownsyntax(exarg_T *eap)
 {
     char_u	*old_value;
     char_u	*new_value;
@@ -6453,8 +6362,7 @@ ex_ownsyntax(eap)
 }
 
     int
-syntax_present(win)
-    win_T	*win;
+syntax_present(win_T *win)
 {
     return (win->w_s->b_syn_patterns.ga_len != 0
 	    || win->w_s->b_syn_clusters.ga_len != 0
@@ -6475,7 +6383,7 @@ static enum
  * Called when we are done expanding.
  */
     void
-reset_expand_highlight()
+reset_expand_highlight(void)
 {
     include_link = include_default = include_none = 0;
 }
@@ -6485,9 +6393,7 @@ reset_expand_highlight()
  * as highlight group.
  */
     void
-set_context_in_echohl_cmd(xp, arg)
-    expand_T	*xp;
-    char_u	*arg;
+set_context_in_echohl_cmd(expand_T *xp, char_u *arg)
 {
     xp->xp_context = EXPAND_HIGHLIGHT;
     xp->xp_pattern = arg;
@@ -6498,9 +6404,7 @@ set_context_in_echohl_cmd(xp, arg)
  * Handle command line completion for :syntax command.
  */
     void
-set_context_in_syntax_cmd(xp, arg)
-    expand_T	*xp;
-    char_u	*arg;
+set_context_in_syntax_cmd(expand_T *xp, char_u *arg)
 {
     char_u	*p;
 
@@ -6540,9 +6444,7 @@ static char *(case_args[]) = {"match", "
  * expansion.
  */
     char_u *
-get_syntax_name(xp, idx)
-    expand_T	*xp UNUSED;
-    int		idx;
+get_syntax_name(expand_T *xp UNUSED, int idx)
 {
     if (expand_what == EXP_SUBCMD)
 	return (char_u *)subcommands[idx].name;
@@ -6555,13 +6457,13 @@ get_syntax_name(xp, idx)
  * Function called for expression evaluation: get syntax ID at file position.
  */
     int
-syn_get_id(wp, lnum, col, trans, spellp, keep_state)
-    win_T	*wp;
-    long	lnum;
-    colnr_T	col;
-    int		trans;	     /* remove transparency */
-    int		*spellp;     /* return: can do spell checking */
-    int		keep_state;  /* keep state of char at "col" */
+syn_get_id(
+    win_T	*wp,
+    long	lnum,
+    colnr_T	col,
+    int		trans,	     /* remove transparency */
+    int		*spellp,     /* return: can do spell checking */
+    int		keep_state)  /* keep state of char at "col" */
 {
     /* When the position is not after the current position and in the same
      * line of the same buffer, need to restart parsing. */
@@ -6589,8 +6491,7 @@ syn_get_id(wp, lnum, col, trans, spellp,
  * Returns the current flags.
  */
     int
-get_syntax_info(seqnrp)
-    int		*seqnrp;
+get_syntax_info(int *seqnrp)
 {
     *seqnrp = current_seqnr;
     return current_flags;
@@ -6600,7 +6501,7 @@ get_syntax_info(seqnrp)
  * Return conceal substitution character
  */
     int
-syn_get_sub_char()
+syn_get_sub_char(void)
 {
     return current_sub_char;
 }
@@ -6613,8 +6514,7 @@ syn_get_sub_char()
  * Returns -1 when "i" is out of range.
  */
     int
-syn_get_stack_item(i)
-    int i;
+syn_get_stack_item(int i)
 {
     if (i >= current_state.ga_len)
     {
@@ -6633,9 +6533,7 @@ syn_get_stack_item(i)
  * Function called to get folding level for line "lnum" in window "wp".
  */
     int
-syn_get_foldlevel(wp, lnum)
-    win_T	*wp;
-    long	lnum;
+syn_get_foldlevel(win_T *wp, long lnum)
 {
     int		level = 0;
     int		i;
@@ -6664,8 +6562,7 @@ syn_get_foldlevel(wp, lnum)
  * ":syntime".
  */
     void
-ex_syntime(eap)
-    exarg_T	*eap;
+ex_syntime(exarg_T *eap)
 {
     if (STRCMP(eap->arg, "on") == 0)
 	syn_time_on = TRUE;
@@ -6680,8 +6577,7 @@ ex_syntime(eap)
 }
 
     static void
-syn_clear_time(st)
-    syn_time_T *st;
+syn_clear_time(syn_time_T *st)
 {
     profile_zero(&st->total);
     profile_zero(&st->slowest);
@@ -6693,7 +6589,7 @@ syn_clear_time(st)
  * Clear the syntax timing for the current buffer.
  */
     static void
-syntime_clear()
+syntime_clear(void)
 {
     int		idx;
     synpat_T	*spp;
@@ -6716,9 +6612,7 @@ syntime_clear()
  * ":syntime {on,off,clear,report}" command.
  */
     char_u *
-get_syntime_arg(xp, idx)
-    expand_T	*xp UNUSED;
-    int		idx;
+get_syntime_arg(expand_T *xp UNUSED, int idx)
 {
     switch (idx)
     {
@@ -6746,9 +6640,7 @@ typedef struct
 #ifdef __BORLANDC__
 _RTLENTRYF
 #endif
-syn_compare_syntime(v1, v2)
-    const void	*v1;
-    const void	*v2;
+syn_compare_syntime(const void *v1, const void *v2)
 {
     const time_entry_T	*s1 = v1;
     const time_entry_T	*s2 = v2;
@@ -6760,7 +6652,7 @@ syn_compare_syntime(v1, v2)
  * Clear the syntax timing for the current buffer.
  */
     static void
-syntime_report()
+syntime_report(void)
 {
     int		idx;
     synpat_T	*spp;
@@ -7095,9 +6987,9 @@ static char *(highlight_init_dark[]) =
     };
 
     void
-init_highlight(both, reset)
-    int		both;	    /* include groups where 'bg' doesn't matter */
-    int		reset;	    /* clear group first */
+init_highlight(
+    int		both,	    /* include groups where 'bg' doesn't matter */
+    int		reset)	    /* clear group first */
 {
     int		i;
     char	**pp;
@@ -7193,8 +7085,7 @@ init_highlight(both, reset)
  * Return OK for success, FAIL for failure.
  */
     int
-load_colors(name)
-    char_u	*name;
+load_colors(char_u *name)
 {
     char_u	*buf;
     int		retval = FAIL;
@@ -7228,10 +7119,10 @@ load_colors(name)
  * "forceit" and "init" both TRUE.
  */
     void
-do_highlight(line, forceit, init)
-    char_u	*line;
-    int		forceit;
-    int		init;	    /* TRUE when called for initializing */
+do_highlight(
+    char_u	*line,
+    int		forceit,
+    int		init)	    /* TRUE when called for initializing */
 {
     char_u	*name_end;
     char_u	*p;
@@ -8143,7 +8034,7 @@ do_highlight(line, forceit, init)
 
 #if defined(EXITFREE) || defined(PROTO)
     void
-free_highlight()
+free_highlight(void)
 {
     int	    i;
 
@@ -8162,7 +8053,7 @@ free_highlight()
  * possible.  Otherwise reset them to zero.
  */
     void
-restore_cterm_colors()
+restore_cterm_colors(void)
 {
 #if defined(MSDOS) || (defined(WIN3264) && !defined(FEAT_GUI_W32))
     /* Since t_me has been set, this probably means that the user
@@ -8181,9 +8072,7 @@ restore_cterm_colors()
  * When "check_link" is TRUE also check for an existing link.
  */
     static int
-hl_has_settings(idx, check_link)
-    int		idx;
-    int		check_link;
+hl_has_settings(int idx, int check_link)
 {
     return (   HL_TABLE()[idx].sg_term_attr != 0
 	    || HL_TABLE()[idx].sg_cterm_attr != 0
@@ -8203,8 +8092,7 @@ hl_has_settings(idx, check_link)
  * Clear highlighting for one group.
  */
     static void
-highlight_clear(idx)
-    int idx;
+highlight_clear(int idx)
 {
     HL_TABLE()[idx].sg_term = 0;
     vim_free(HL_TABLE()[idx].sg_start);
@@ -8255,7 +8143,7 @@ highlight_clear(idx)
  * "Tooltip" colors.
  */
     void
-set_normal_colors()
+set_normal_colors(void)
 {
     if (set_group_colors((char_u *)"Normal",
 			     &gui.norm_pixel, &gui.back_pixel,
@@ -8299,13 +8187,13 @@ set_normal_colors()
  * Set the colors for "Normal", "Menu", "Tooltip" or "Scrollbar".
  */
     static int
-set_group_colors(name, fgp, bgp, do_menu, use_norm, do_tooltip)
-    char_u	*name;
-    guicolor_T	*fgp;
-    guicolor_T	*bgp;
-    int		do_menu;
-    int		use_norm;
-    int		do_tooltip;
+set_group_colors(
+    char_u	*name,
+    guicolor_T	*fgp,
+    guicolor_T	*bgp,
+    int		do_menu,
+    int		use_norm,
+    int		do_tooltip)
 {
     int		idx;
 
@@ -8332,7 +8220,7 @@ set_group_colors(name, fgp, bgp, do_menu
  * Returns "" when it's not found or not set.
  */
     char_u *
-hl_get_font_name()
+hl_get_font_name(void)
 {
     int		id;
     char_u	*s;
@@ -8352,8 +8240,7 @@ hl_get_font_name()
  * actually chosen to be used.
  */
     void
-hl_set_font_name(font_name)
-    char_u	*font_name;
+hl_set_font_name(char_u *font_name)
 {
     int	    id;
 
@@ -8370,8 +8257,8 @@ hl_set_font_name(font_name)
  * when the color is known.
  */
     void
-hl_set_bg_color_name(name)
-    char_u  *name;	    /* must have been allocated */
+hl_set_bg_color_name(
+    char_u  *name)	    /* must have been allocated */
 {
     int	    id;
 
@@ -8391,8 +8278,8 @@ hl_set_bg_color_name(name)
  * when the color is known.
  */
     void
-hl_set_fg_color_name(name)
-    char_u  *name;	    /* must have been allocated */
+hl_set_fg_color_name(
+    char_u  *name)	    /* must have been allocated */
 {
     int	    id;
 
@@ -8412,8 +8299,7 @@ hl_set_fg_color_name(name)
  * Returns INVALCOLOR when failed.
  */
     static guicolor_T
-color_name2handle(name)
-    char_u  *name;
+color_name2handle(char_u *name)
 {
     if (STRCMP(name, "NONE") == 0)
 	return INVALCOLOR;
@@ -8431,8 +8317,7 @@ color_name2handle(name)
  * Returns NOFONT when failed.
  */
     static GuiFont
-font_name2handle(name)
-    char_u  *name;
+font_name2handle(char_u *name)
 {
     if (STRCMP(name, "NONE") == 0)
 	return NOFONT;
@@ -8446,9 +8331,7 @@ font_name2handle(name)
  * Returns NOFONTSET when failed.
  */
     static GuiFontset
-fontset_name2handle(name, fixed_width)
-    char_u	*name;
-    int		fixed_width;
+fontset_name2handle(char_u *name, int fixed_width)
 {
     if (STRCMP(name, "NONE") == 0)
 	return NOFONTSET;
@@ -8461,13 +8344,13 @@ fontset_name2handle(name, fixed_width)
  * Get the font or fontset for one highlight group.
  */
     static void
-hl_do_font(idx, arg, do_normal, do_menu, do_tooltip, free_font)
-    int		idx;
-    char_u	*arg;
-    int		do_normal;		/* set normal font */
-    int		do_menu UNUSED;		/* set menu font */
-    int		do_tooltip UNUSED;	/* set tooltip font */
-    int		free_font;		/* free current font/fontset */
+hl_do_font(
+    int		idx,
+    char_u	*arg,
+    int		do_normal,		/* set normal font */
+    int		do_menu UNUSED,		/* set menu font */
+    int		do_tooltip UNUSED,	/* set tooltip font */
+    int		free_font)		/* free current font/fontset */
 {
 # ifdef FEAT_XFONTSET
     /* If 'guifontset' is not empty, first try using the name as a
@@ -8578,9 +8461,7 @@ static garray_T	gui_attr_table = {0, 0, 
  * Return 0 for error (no more room).
  */
     static int
-get_attr_entry(table, aep)
-    garray_T	*table;
-    attrentry_T	*aep;
+get_attr_entry(garray_T *table, attrentry_T *aep)
 {
     int		i;
     attrentry_T	*taep;
@@ -8704,7 +8585,7 @@ get_attr_entry(table, aep)
  * Clear all highlight tables.
  */
     void
-clear_hl_tables()
+clear_hl_tables(void)
 {
     int		i;
     attrentry_T	*taep;
@@ -8733,9 +8614,7 @@ clear_hl_tables()
  * Return the resulting attributes.
  */
     int
-hl_combine_attr(char_attr, prim_attr)
-    int	    char_attr;
-    int	    prim_attr;
+hl_combine_attr(int char_attr, int prim_attr)
 {
     attrentry_T *char_aep = NULL;
     attrentry_T *spell_aep;
@@ -8851,8 +8730,7 @@ hl_combine_attr(char_attr, prim_attr)
 #ifdef FEAT_GUI
 
     attrentry_T *
-syn_gui_attr2entry(attr)
-    int		    attr;
+syn_gui_attr2entry(int attr)
 {
     attr -= ATTR_OFF;
     if (attr >= gui_attr_table.ga_len)	    /* did ":syntax clear" */
@@ -8866,8 +8744,7 @@ syn_gui_attr2entry(attr)
  * Only to be used when "attr" > HL_ALL.
  */
     int
-syn_attr2attr(attr)
-    int	    attr;
+syn_attr2attr(int attr)
 {
     attrentry_T	*aep;
 
@@ -8888,8 +8765,7 @@ syn_attr2attr(attr)
 
 
     attrentry_T *
-syn_term_attr2entry(attr)
-    int		    attr;
+syn_term_attr2entry(int attr)
 {
     attr -= ATTR_OFF;
     if (attr >= term_attr_table.ga_len)	    /* did ":syntax clear" */
@@ -8898,8 +8774,7 @@ syn_term_attr2entry(attr)
 }
 
     attrentry_T *
-syn_cterm_attr2entry(attr)
-    int		    attr;
+syn_cterm_attr2entry(int attr)
 {
     attr -= ATTR_OFF;
     if (attr >= cterm_attr_table.ga_len)	/* did ":syntax clear" */
@@ -8912,8 +8787,7 @@ syn_cterm_attr2entry(attr)
 #define LIST_INT    3
 
     static void
-highlight_list_one(id)
-    int		id;
+highlight_list_one(int id)
 {
     struct hl_group	*sgp;
     int			didh = FALSE;
@@ -8967,13 +8841,13 @@ highlight_list_one(id)
 }
 
     static int
-highlight_list_arg(id, didh, type, iarg, sarg, name)
-    int		id;
-    int		didh;
-    int		type;
-    int		iarg;
-    char_u	*sarg;
-    char	*name;
+highlight_list_arg(
+    int		id,
+    int		didh,
+    int		type,
+    int		iarg,
+    char_u	*sarg,
+    char	*name)
 {
     char_u	buf[100];
     char_u	*ts;
@@ -9025,10 +8899,10 @@ highlight_list_arg(id, didh, type, iarg,
  * Return NULL otherwise.
  */
     char_u *
-highlight_has_attr(id, flag, modec)
-    int		id;
-    int		flag;
-    int		modec;	/* 'g' for GUI, 'c' for cterm, 't' for term */
+highlight_has_attr(
+    int		id,
+    int		flag,
+    int		modec)	/* 'g' for GUI, 'c' for cterm, 't' for term */
 {
     int		attr;
 
@@ -9056,10 +8930,10 @@ highlight_has_attr(id, flag, modec)
  * Return color name of highlight group "id".
  */
     char_u *
-highlight_color(id, what, modec)
-    int		id;
-    char_u	*what;	/* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
-    int		modec;	/* 'g' for GUI, 'c' for cterm, 't' for term */
+highlight_color(
+    int		id,
+    char_u	*what,	/* "font", "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
+    int		modec)	/* 'g' for GUI, 'c' for cterm, 't' for term */
 {
     static char_u	name[20];
     int			n;
@@ -9137,9 +9011,9 @@ highlight_color(id, what, modec)
  * Return color name of highlight group "id" as RGB value.
  */
     long_u
-highlight_gui_color_rgb(id, fg)
-    int		id;
-    int		fg;	/* TRUE = fg, FALSE = bg */
+highlight_gui_color_rgb(
+    int		id,
+    int		fg)	/* TRUE = fg, FALSE = bg */
 {
     guicolor_T	color;
 
@@ -9163,10 +9037,10 @@ highlight_gui_color_rgb(id, fg)
  * Return TRUE when started a new line.
  */
     static int
-syn_list_header(did_header, outlen, id)
-    int	    did_header;		/* did header already */
-    int	    outlen;		/* length of string that comes */
-    int	    id;			/* highlight group id */
+syn_list_header(
+    int	    did_header,		/* did header already */
+    int	    outlen,		/* length of string that comes */
+    int	    id)			/* highlight group id */
 {
     int	    endcol = 19;
     int	    newline = TRUE;
@@ -9213,8 +9087,8 @@ syn_list_header(did_header, outlen, id)
  * Called after one of the attributes has changed.
  */
     static void
-set_hl_attr(idx)
-    int		idx;	    /* index in array */
+set_hl_attr(
+    int		idx)	    /* index in array */
 {
     attrentry_T		at_en;
     struct hl_group	*sgp = HL_TABLE() + idx;
@@ -9286,8 +9160,7 @@ set_hl_attr(idx)
  * If it is not found, 0 is returned.
  */
     int
-syn_name2id(name)
-    char_u	*name;
+syn_name2id(char_u *name)
 {
     int		i;
     char_u	name_u[200];
@@ -9309,8 +9182,7 @@ syn_name2id(name)
  * Return TRUE if highlight group "name" exists.
  */
     int
-highlight_exists(name)
-    char_u	*name;
+highlight_exists(char_u *name)
 {
     return (syn_name2id(name) > 0);
 }
@@ -9321,8 +9193,7 @@ highlight_exists(name)
  * When not a valid ID return an empty string.
  */
     char_u *
-syn_id2name(id)
-    int		id;
+syn_id2name(int id)
 {
     if (id <= 0 || id > highlight_ga.ga_len)
 	return (char_u *)"";
@@ -9335,9 +9206,7 @@ syn_id2name(id)
  * Like syn_name2id(), but take a pointer + length argument.
  */
     int
-syn_namen2id(linep, len)
-    char_u  *linep;
-    int	    len;
+syn_namen2id(char_u *linep, int len)
 {
     char_u  *name;
     int	    id = 0;
@@ -9358,9 +9227,7 @@ syn_namen2id(linep, len)
  * Return 0 for failure.
  */
     int
-syn_check_group(pp, len)
-    char_u		*pp;
-    int			len;
+syn_check_group(char_u *pp, int len)
 {
     int	    id;
     char_u  *name;
@@ -9383,8 +9250,7 @@ syn_check_group(pp, len)
  * Return 0 for failure.
  */
     static int
-syn_add_group(name)
-    char_u	*name;
+syn_add_group(char_u *name)
 {
     char_u	*p;
 
@@ -9450,7 +9316,7 @@ syn_add_group(name)
  * function deletes the new name.
  */
     static void
-syn_unadd_group()
+syn_unadd_group(void)
 {
     --highlight_ga.ga_len;
     vim_free(HL_TABLE()[highlight_ga.ga_len].sg_name);
@@ -9461,8 +9327,7 @@ syn_unadd_group()
  * Translate a group ID to highlight attributes.
  */
     int
-syn_id2attr(hl_id)
-    int			hl_id;
+syn_id2attr(int hl_id)
 {
     int			attr;
     struct hl_group	*sgp;
@@ -9492,10 +9357,7 @@ syn_id2attr(hl_id)
  * NOTE: the colors will be INVALCOLOR when not set, the color otherwise.
  */
     int
-syn_id2colors(hl_id, fgp, bgp)
-    int		hl_id;
-    guicolor_T	*fgp;
-    guicolor_T	*bgp;
+syn_id2colors(int hl_id, guicolor_T *fgp, guicolor_T *bgp)
 {
     struct hl_group	*sgp;
 
@@ -9512,8 +9374,7 @@ syn_id2colors(hl_id, fgp, bgp)
  * Translate a group ID to the final group ID (following links).
  */
     int
-syn_get_final_id(hl_id)
-    int			hl_id;
+syn_get_final_id(int hl_id)
 {
     int			count;
     struct hl_group	*sgp;
@@ -9542,7 +9403,7 @@ syn_get_final_id(hl_id)
  * It finds the font and color handles for the highlighting groups.
  */
     void
-highlight_gui_started()
+highlight_gui_started(void)
 {
     int	    idx;
 
@@ -9556,10 +9417,10 @@ highlight_gui_started()
 }
 
     static void
-gui_do_one_color(idx, do_menu, do_tooltip)
-    int		idx;
-    int		do_menu;	/* TRUE: might set the menu font */
-    int		do_tooltip;	/* TRUE: might set the tooltip font */
+gui_do_one_color(
+    int		idx,
+    int		do_menu,	/* TRUE: might set the menu font */
+    int		do_tooltip)	/* TRUE: might set the tooltip font */
 {
     int		didit = FALSE;
 
@@ -9602,7 +9463,7 @@ gui_do_one_color(idx, do_menu, do_toolti
  * Return FAIL when an invalid flag is found in 'highlight'.  OK otherwise.
  */
     int
-highlight_changed()
+highlight_changed(void)
 {
     int		hlf;
     int		i;
@@ -9813,9 +9674,7 @@ static void highlight_list_two(int cnt, 
  * Handle command line completion for :highlight command.
  */
     void
-set_context_in_highlight_cmd(xp, arg)
-    expand_T	*xp;
-    char_u	*arg;
+set_context_in_highlight_cmd(expand_T *xp, char_u *arg)
 {
     char_u	*p;
 
@@ -9865,7 +9724,7 @@ set_context_in_highlight_cmd(xp, arg)
  * List highlighting matches in a nice way.
  */
     static void
-highlight_list()
+highlight_list(void)
 {
     int		i;
 
@@ -9876,9 +9735,7 @@ highlight_list()
 }
 
     static void
-highlight_list_two(cnt, attr)
-    int	    cnt;
-    int	    attr;
+highlight_list_two(int cnt, int attr)
 {
     msg_puts_attr((char_u *)&("N \bI \b!  \b"[cnt / 11]), attr);
     msg_clr_eos();
@@ -9895,9 +9752,7 @@ highlight_list_two(cnt, attr)
  * Also used for synIDattr() function.
  */
     char_u *
-get_highlight_name(xp, idx)
-    expand_T	*xp UNUSED;
-    int		idx;
+get_highlight_name(expand_T *xp UNUSED, int idx)
 {
 #ifdef FEAT_CMDL_COMPL
     if (idx == highlight_ga.ga_len && include_none != 0)
@@ -9923,7 +9778,7 @@ get_highlight_name(xp, idx)
  * Used when quitting for systems which need it.
  */
     void
-free_highlight_fonts()
+free_highlight_fonts(void)
 {
     int	    idx;