To: vim-dev@vim.org Subject: Patch 6.1.372 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.372 Problem: With 16 bit ints there are compiler warnings. (Walter Briscoe) Solution: Change int into long. Files: src/structs.h, src/syntax.c *** ../vim61.371/src/structs.h Sat Mar 8 20:33:33 2003 --- src/structs.h Sat Mar 8 13:01:45 2003 *************** *** 592,598 **** typedef struct buf_state { int bs_idx; /* index of pattern */ ! int bs_flags; /* flags for pattern */ reg_extmatch_T *bs_extmatch; /* external matches from start pattern */ } bufstate_T; --- 592,598 ---- typedef struct buf_state { int bs_idx; /* index of pattern */ ! long bs_flags; /* flags for pattern */ reg_extmatch_T *bs_extmatch; /* external matches from start pattern */ } bufstate_T; *** ../vim61.371/src/syntax.c Mon Feb 24 11:29:15 2003 --- src/syntax.c Sun Mar 9 14:34:37 2003 *************** *** 173,178 **** --- 173,180 ---- #define HL_DISPLAY 0x1000 /* only used for displaying, not syncing */ #define HL_FOLD 0x2000 /* define fold */ #define HL_EXTEND 0x4000 /* ignore a keepend */ + /* These don't fit in a short, thus can't be used for syntax items, only for + * si_flags and bs_flags. */ #define HL_MATCHCONT 0x8000 /* match continued from previous line */ #define HL_TRANS_CONT 0x10000 /* transparent item without contains arg */ *************** *** 275,281 **** int si_end_idx; /* group ID for end pattern or zero */ int si_ends; /* if match ends before si_m_endpos */ int si_attr; /* attributes in this state */ ! int si_flags; /* HL_HAS_EOL flag in this state, and * HL_SKIP* for si_next_list */ short *si_cont_list; /* list of contained groups */ short *si_next_list; /* nextgroup IDs after this item ends */ --- 277,283 ---- int si_end_idx; /* group ID for end pattern or zero */ int si_ends; /* if match ends before si_m_endpos */ int si_attr; /* attributes in this state */ ! long si_flags; /* HL_HAS_EOL flag in this state, and * HL_SKIP* for si_next_list */ short *si_cont_list; /* list of contained groups */ short *si_next_list; /* nextgroup IDs after this item ends */ *************** *** 294,308 **** * If next_match_col == MAXCOL, no match found in this line. * (All end positions have the column of the char after the end) */ ! static int next_match_col; /* column for start of next match */ ! static lpos_T next_match_m_endpos; /* position for end of next match */ static lpos_T next_match_h_startpos; /* pos. for highl. start of next match */ ! static lpos_T next_match_h_endpos; /* pos. for highl. end of next match */ ! static int next_match_idx; /* index of matched item */ ! static int next_match_flags; /* flags for next match */ ! static lpos_T next_match_eos_pos; /* end of start pattern (start of region) */ ! static lpos_T next_match_eoe_pos; /* pos. for end of end pattern */ ! static int next_match_end_idx; /* ID of group for end pattern or zero */ static reg_extmatch_T *next_match_extmatch = NULL; /* --- 296,310 ---- * If next_match_col == MAXCOL, no match found in this line. * (All end positions have the column of the char after the end) */ ! static int next_match_col; /* column for start of next match */ ! static lpos_T next_match_m_endpos; /* position for end of next match */ static lpos_T next_match_h_startpos; /* pos. for highl. start of next match */ ! static lpos_T next_match_h_endpos; /* pos. for highl. end of next match */ ! static int next_match_idx; /* index of matched item */ ! static long next_match_flags; /* flags for next match */ ! static lpos_T next_match_eos_pos; /* end of start pattn (start region) */ ! static lpos_T next_match_eoe_pos; /* pos. for end of end pattern */ ! static int next_match_end_idx; /* ID of group for end pattn or zero */ static reg_extmatch_T *next_match_extmatch = NULL; /* *************** *** 357,363 **** static int push_current_state __ARGS((int idx)); static void pop_current_state __ARGS((void)); ! static void find_endpos __ARGS((int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_endpos, int *flagsp, lpos_T *end_endpos, int *end_idx, reg_extmatch_T *start_ext)); static void clear_syn_state __ARGS((synstate_T *p)); static void clear_current_state __ARGS((void)); --- 359,365 ---- static int push_current_state __ARGS((int idx)); static void pop_current_state __ARGS((void)); ! static void find_endpos __ARGS((int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_endpos, long *flagsp, lpos_T *end_endpos, int *end_idx, reg_extmatch_T *start_ext)); static void clear_syn_state __ARGS((synstate_T *p)); static void clear_current_state __ARGS((void)); *************** *** 367,373 **** static void syn_add_start_off __ARGS((lpos_T *result, regmmatch_T *regmatch, synpat_T *spp, int idx, int extra)); static char_u *syn_getcurline __ARGS((void)); static int syn_regexec __ARGS((regmmatch_T *rmp, linenr_T lnum, colnr_T col)); ! static int check_keyword_id __ARGS((char_u *line, int startcol, int *endcol, int *flags, short **next_list, stateitem_T *cur_si)); static void syn_cmd_case __ARGS((exarg_T *eap, int syncing)); static void syntax_sync_clear __ARGS((void)); static void syn_remove_pattern __ARGS((buf_T *buf, int idx)); --- 369,375 ---- static void syn_add_start_off __ARGS((lpos_T *result, regmmatch_T *regmatch, synpat_T *spp, int idx, int extra)); static char_u *syn_getcurline __ARGS((void)); static int syn_regexec __ARGS((regmmatch_T *rmp, linenr_T lnum, colnr_T col)); ! static int check_keyword_id __ARGS((char_u *line, int startcol, int *endcol, long *flags, short **next_list, stateitem_T *cur_si)); static void syn_cmd_case __ARGS((exarg_T *eap, int syncing)); static void syntax_sync_clear __ARGS((void)); static void syn_remove_pattern __ARGS((buf_T *buf, int idx)); *************** *** 1703,1709 **** stateitem_T *cur_si, *sip; int startcol; int endcol; ! int flags; short *next_list; int found_match; /* found usable match */ static int try_next_column = FALSE; /* must try in next col */ --- 1705,1711 ---- stateitem_T *cur_si, *sip; int startcol; int endcol; ! long flags; short *next_list; int found_match; /* found usable match */ static int try_next_column = FALSE; /* must try in next col */ *************** *** 2565,2571 **** 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 */ ! int *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 */ --- 2567,2573 ---- 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 */ *************** *** 2894,2905 **** * Return it's ID if found, 0 otherwise. */ static int ! check_keyword_id(line, startcol, endcol, flags, next_list, cur_si) char_u *line; int startcol; /* position in line to check for keyword */ ! int *endcol; /* character after found keyword */ ! int *flags; /* flags of matching keyword */ ! short **next_list; /* next_list of matching keyword */ stateitem_T *cur_si; /* item at the top of the stack */ { keyentry_T *ktab; --- 2896,2907 ---- * Return it's ID if found, 0 otherwise. */ static int ! check_keyword_id(line, startcol, endcolp, flagsp, next_listp, cur_si) 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 */ { keyentry_T *ktab; *************** *** 2971,2979 **** : in_id_list(cur_si, cur_si->si_cont_list, &ktab->k_syn, ktab->flags & HL_CONTAINED)))) { ! *endcol = startcol + len; ! *flags = ktab->flags; ! *next_list = ktab->next_list; return ktab->k_syn.id; } } --- 2973,2981 ---- : in_id_list(cur_si, cur_si->si_cont_list, &ktab->k_syn, ktab->flags & HL_CONTAINED)))) { ! *endcolp = startcol + len; ! *flagsp = ktab->flags; ! *next_listp = ktab->next_list; return ktab->k_syn.id; } } *** ../vim61.371/src/version.c Sun Mar 9 14:24:49 2003 --- src/version.c Sun Mar 9 14:26:31 2003 *************** *** 613,614 **** --- 613,616 ---- { /* Add new patch number below this line */ + /**/ + 372, /**/ -- If someone questions your market projections, simply point out that your target market is "People who are nuts" and "People who will buy any damn thing". Nobody is going to tell you there aren't enough of those people to go around. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///