home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.2 / 7.2.167 < prev    next >
Encoding:
Internet Message Format  |  2009-05-12  |  53.4 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.2.167
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.2.167
  11. Problem:    Splint doesn't work well for checking the code.
  12. Solution:   Add splint arguments in the Makefile.  Exclude some code from
  13.         splint that it can't handle.  Tune splint arguments to give
  14.         reasonable errors.  Add a filter for removing false warnings from
  15.         splint output.  Many small changes to avoid warnings.  More to
  16.         follow...
  17. Files:        Filelist, src/Makefile, src/buffer.c, src/charset.c,
  18.         src/cleanlint.vim, src/digraph.c, src/edit.c, src/ex_cmds.c,
  19.         src/globals.h, src/ops.c, src/os_unix.c, src/os_unix.h,
  20.         src/proto/buffer.pro, src/proto/edit.pro, src/screen.c,
  21.         src/structs.h
  22.  
  23. *** ../vim-7.2.166/Filelist    2008-09-20 16:26:10.000000000 +0200
  24. --- Filelist    2009-05-05 21:45:49.000000000 +0200
  25. ***************
  26. *** 139,144 ****
  27. --- 139,145 ----
  28.           src/INSTALL \
  29.           src/INSTALLx.txt \
  30.           src/Makefile \
  31. +         src/cleanlint.vim \
  32.           src/auto/configure \
  33.           src/config.aap.in \
  34.           src/config.h.in \
  35. ***************
  36. *** 683,691 ****
  37.           runtime/spell/??/main.aap \
  38.           runtime/spell/yi/README.txt \
  39.           runtime/spell/main.aap \
  40. -         runtime/spell/cleanadd.vim \
  41.           runtime/spell/*.vim \
  42. -         runtime/spell/fixdup \
  43.   
  44.   # generic language files, binary
  45.   LANG_GEN_BIN = \
  46. --- 684,690 ----
  47. *** ../vim-7.2.166/src/Makefile    2009-04-29 18:44:45.000000000 +0200
  48. --- src/Makefile    2009-05-06 00:23:15.000000000 +0200
  49. ***************
  50. *** 551,557 ****
  51.   # }}}
  52.   
  53.   # LINT - for running lint
  54. ! LINT_OPTIONS = -beprxzF
  55.   
  56.   # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
  57.   # Might not work with GUI or Perl.
  58. --- 551,562 ----
  59.   # }}}
  60.   
  61.   # LINT - for running lint
  62. ! #  For standard lint
  63. ! #LINT = lint
  64. ! #LINT_OPTIONS = -beprxzF
  65. ! #  For splint  (see cleanlint.vim for filtering the output)
  66. ! LINT = splint
  67. ! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
  68.   
  69.   # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
  70.   # Might not work with GUI or Perl.
  71. ***************
  72. *** 1259,1274 ****
  73.   #     This is for cproto 3 patchlevel 8 or below
  74.   #     __inline, __attribute__ and __extension__ are not recognized by cproto
  75.   #     G_IMPLEMENT_INLINES is to avoid functions defined in glib/gutils.h.
  76. ! NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
  77. !       -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
  78. !       -D__extension__= -D__restrict="" \
  79. !       -D__gnuc_va_list=char -D__builtin_va_list=char
  80.   
  81.   #
  82. ! #     This is for cproto 3 patchlevel 9 or above (currently 4.6)
  83.   #     __inline and __attribute__ are now recognized by cproto
  84.   #     -D"foo()=" is not supported by all compilers so do not use it
  85. ! # NO_ATTR=
  86.   #
  87.   #     maybe the "/usr/bin/cc -E" has to be adjusted for some systems
  88.   # This is for cproto 3.5 patchlevel 3:
  89. --- 1264,1279 ----
  90.   #     This is for cproto 3 patchlevel 8 or below
  91.   #     __inline, __attribute__ and __extension__ are not recognized by cproto
  92.   #     G_IMPLEMENT_INLINES is to avoid functions defined in glib/gutils.h.
  93. ! #NO_ATTR = -D__inline= -D__inline__= -DG_IMPLEMENT_INLINES \
  94. ! #      -D"__attribute__\\(x\\)=" -D"__asm__\\(x\\)=" \
  95. ! #      -D__extension__= -D__restrict="" \
  96. ! #      -D__gnuc_va_list=char -D__builtin_va_list=char
  97.   
  98.   #
  99. ! #     This is for cproto 3 patchlevel 9 or above (currently 4.6, 4.7g)
  100.   #     __inline and __attribute__ are now recognized by cproto
  101.   #     -D"foo()=" is not supported by all compilers so do not use it
  102. ! NO_ATTR=
  103.   #
  104.   #     maybe the "/usr/bin/cc -E" has to be adjusted for some systems
  105.   # This is for cproto 3.5 patchlevel 3:
  106. ***************
  107. *** 1432,1437 ****
  108. --- 1437,1443 ----
  109.       $(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) $(NETBEANS_SRC)
  110.   #LINT_SRC = $(SRC)
  111.   #LINT_SRC = $(ALL_SRC)
  112. + #LINT_SRC = $(BASIC_SRC)
  113.   
  114.   OBJ = \
  115.       objects/buffer.o \
  116. ***************
  117. *** 2272,2283 ****
  118.   
  119.   # Run lint.  Clean up the *.ln files that are sometimes left behind.
  120.   lint:
  121. !     lint $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
  122.       -rm -f *.ln
  123.   
  124.   # Check dosinst.c with lint.
  125.   lintinstall:
  126. !     lint $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
  127.       -rm -f dosinst.ln
  128.   
  129.   ###########################################################################
  130. --- 2279,2290 ----
  131.   
  132.   # Run lint.  Clean up the *.ln files that are sometimes left behind.
  133.   lint:
  134. !     $(LINT) $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
  135.       -rm -f *.ln
  136.   
  137.   # Check dosinst.c with lint.
  138.   lintinstall:
  139. !     $(LINT) $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
  140.       -rm -f dosinst.ln
  141.   
  142.   ###########################################################################
  143. *** ../vim-7.2.166/src/buffer.c    2009-02-22 00:01:42.000000000 +0100
  144. --- src/buffer.c    2009-05-13 12:25:29.000000000 +0200
  145. ***************
  146. *** 44,49 ****
  147. --- 44,50 ----
  148.   #ifdef FEAT_TITLE
  149.   static int    ti_change __ARGS((char_u *str, char_u **last));
  150.   #endif
  151. + static int    append_arg_number __ARGS((win_T *wp, char_u *buf, int buflen, int add_file));
  152.   static void    free_buffer __ARGS((buf_T *));
  153.   static void    free_buffer_stuff __ARGS((buf_T *buf, int free_options));
  154.   static void    clear_wininfo __ARGS((buf_T *buf));
  155. ***************
  156. *** 1453,1465 ****
  157.   
  158.   #ifdef FEAT_KEYMAP
  159.       if (curbuf->b_kmap_state & KEYMAP_INIT)
  160. !     keymap_init();
  161.   #endif
  162.   #ifdef FEAT_SPELL
  163.       /* May need to set the spell language.  Can only do this after the buffer
  164.        * has been properly setup. */
  165.       if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
  166. !     did_set_spelllang(curbuf);
  167.   #endif
  168.   
  169.       redraw_later(NOT_VALID);
  170. --- 1454,1466 ----
  171.   
  172.   #ifdef FEAT_KEYMAP
  173.       if (curbuf->b_kmap_state & KEYMAP_INIT)
  174. !     (void)keymap_init();
  175.   #endif
  176.   #ifdef FEAT_SPELL
  177.       /* May need to set the spell language.  Can only do this after the buffer
  178.        * has been properly setup. */
  179.       if (!curbuf->b_help && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
  180. !     (void)did_set_spelllang(curbuf);
  181.   #endif
  182.   
  183.       redraw_later(NOT_VALID);
  184. ***************
  185. *** 2516,2522 ****
  186.       buf_T    *buf;
  187.   {
  188.       wininfo_T    *wip;
  189. !     static pos_T no_position = {1, 0};
  190.   
  191.       wip = find_wininfo(buf, FALSE);
  192.       if (wip != NULL)
  193. --- 2517,2523 ----
  194.       buf_T    *buf;
  195.   {
  196.       wininfo_T    *wip;
  197. !     static pos_T no_position = INIT_POS_T(1, 0, 0);
  198.   
  199.       wip = find_wininfo(buf, FALSE);
  200.       if (wip != NULL)
  201. ***************
  202. *** 2577,2584 ****
  203.       {
  204.           IObuff[len++] = ' ';
  205.       } while (--i > 0 && len < IOSIZE - 18);
  206. !     vim_snprintf((char *)IObuff + len, IOSIZE - len, _("line %ld"),
  207. !         buf == curbuf ? curwin->w_cursor.lnum
  208.                              : (long)buflist_findlnum(buf));
  209.       msg_outtrans(IObuff);
  210.       out_flush();        /* output one line at a time */
  211. --- 2578,2585 ----
  212.       {
  213.           IObuff[len++] = ' ';
  214.       } while (--i > 0 && len < IOSIZE - 18);
  215. !     vim_snprintf((char *)IObuff + len, (size_t)(IOSIZE - len),
  216. !         _("line %ld"), buf == curbuf ? curwin->w_cursor.lnum
  217.                              : (long)buflist_findlnum(buf));
  218.       msg_outtrans(IObuff);
  219.       out_flush();        /* output one line at a time */
  220. ***************
  221. *** 2967,2973 ****
  222.   
  223.       if (fullname > 1)        /* 2 CTRL-G: include buffer number */
  224.       {
  225. !     sprintf((char *)buffer, "buf %d: ", curbuf->b_fnum);
  226.       p = buffer + STRLEN(buffer);
  227.       }
  228.       else
  229. --- 2968,2974 ----
  230.   
  231.       if (fullname > 1)        /* 2 CTRL-G: include buffer number */
  232.       {
  233. !     vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
  234.       p = buffer + STRLEN(buffer);
  235.       }
  236.       else
  237. ***************
  238. *** 3041,3051 ****
  239.           (long)curbuf->b_ml.ml_line_count,
  240.           n);
  241.       validate_virtcol();
  242. !     col_print(buffer + STRLEN(buffer),
  243.              (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
  244.       }
  245.   
  246. !     (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
  247.   
  248.       if (dont_truncate)
  249.       {
  250. --- 3042,3053 ----
  251.           (long)curbuf->b_ml.ml_line_count,
  252.           n);
  253.       validate_virtcol();
  254. !     len = STRLEN(buffer);
  255. !     col_print(buffer + len, IOSIZE - len,
  256.              (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
  257.       }
  258.   
  259. !     (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
  260.   
  261.       if (dont_truncate)
  262.       {
  263. ***************
  264. *** 3073,3087 ****
  265.   }
  266.   
  267.       void
  268. ! col_print(buf, col, vcol)
  269.       char_u  *buf;
  270.       int        col;
  271.       int        vcol;
  272.   {
  273.       if (col == vcol)
  274. !     sprintf((char *)buf, "%d", col);
  275.       else
  276. !     sprintf((char *)buf, "%d-%d", col, vcol);
  277.   }
  278.   
  279.   #if defined(FEAT_TITLE) || defined(PROTO)
  280. --- 3075,3090 ----
  281.   }
  282.   
  283.       void
  284. ! col_print(buf, buflen, col, vcol)
  285.       char_u  *buf;
  286. +     size_t  buflen;
  287.       int        col;
  288.       int        vcol;
  289.   {
  290.       if (col == vcol)
  291. !     vim_snprintf((char *)buf, buflen, "%d", col);
  292.       else
  293. !     vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol);
  294.   }
  295.   
  296.   #if defined(FEAT_TITLE) || defined(PROTO)
  297. ***************
  298. *** 3194,3211 ****
  299.           if (p == buf + off)
  300.               /* must be a help buffer */
  301.               vim_strncpy(buf + off, (char_u *)_("help"),
  302. !                                 IOSIZE - off - 1);
  303.           else
  304.               *p = NUL;
  305.   
  306.           /* translate unprintable chars */
  307.           p = transstr(buf + off);
  308. !         vim_strncpy(buf + off, p, IOSIZE - off - 1);
  309.           vim_free(p);
  310.           STRCAT(buf, ")");
  311.           }
  312.   
  313. !         append_arg_number(curwin, buf, FALSE, IOSIZE);
  314.   
  315.   #if defined(FEAT_CLIENTSERVER)
  316.           if (serverName != NULL)
  317. --- 3197,3214 ----
  318.           if (p == buf + off)
  319.               /* must be a help buffer */
  320.               vim_strncpy(buf + off, (char_u *)_("help"),
  321. !                           (size_t)(IOSIZE - off - 1));
  322.           else
  323.               *p = NUL;
  324.   
  325.           /* translate unprintable chars */
  326.           p = transstr(buf + off);
  327. !         vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
  328.           vim_free(p);
  329.           STRCAT(buf, ")");
  330.           }
  331.   
  332. !         append_arg_number(curwin, buf, IOSIZE, FALSE);
  333.   
  334.   #if defined(FEAT_CLIENTSERVER)
  335.           if (serverName != NULL)
  336. ***************
  337. *** 3520,3526 ****
  338.               n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
  339.   
  340.           *t = '<';
  341. !         mch_memmove(t + 1, t + n, p - (t + n));
  342.           p = p - n + 1;
  343.   #ifdef FEAT_MBYTE
  344.           /* Fill up space left over by half a double-wide char. */
  345. --- 3523,3529 ----
  346.               n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
  347.   
  348.           *t = '<';
  349. !         mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
  350.           p = p - n + 1;
  351.   #ifdef FEAT_MBYTE
  352.           /* Fill up space left over by half a double-wide char. */
  353. ***************
  354. *** 3550,3556 ****
  355.           else
  356.           {
  357.               /* fill by inserting characters */
  358. !             mch_memmove(t + n - l, t, p - t);
  359.               l = n - l;
  360.               if (p + l >= out + outlen)
  361.               l = (long)((out + outlen) - p - 1);
  362. --- 3553,3559 ----
  363.           else
  364.           {
  365.               /* fill by inserting characters */
  366. !             mch_memmove(t + n - l, t, (size_t)(p - t));
  367.               l = n - l;
  368.               if (p + l >= out + outlen)
  369.               l = (long)((out + outlen) - p - 1);
  370. ***************
  371. *** 3686,3692 ****
  372.           p = t;
  373.   
  374.   #ifdef FEAT_EVAL
  375. !         sprintf((char *)tmp, "%d", curbuf->b_fnum);
  376.           set_internal_string_var((char_u *)"actual_curbuf", tmp);
  377.   
  378.           o_curbuf = curbuf;
  379. --- 3689,3695 ----
  380.           p = t;
  381.   
  382.   #ifdef FEAT_EVAL
  383. !         vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
  384.           set_internal_string_var((char_u *)"actual_curbuf", tmp);
  385.   
  386.           o_curbuf = curbuf;
  387. ***************
  388. *** 3753,3765 ****
  389.   
  390.       case STL_ALTPERCENT:
  391.           str = tmp;
  392. !         get_rel_pos(wp, str);
  393.           break;
  394.   
  395.       case STL_ARGLISTSTAT:
  396.           fillable = FALSE;
  397.           tmp[0] = 0;
  398. !         if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
  399.           str = tmp;
  400.           break;
  401.   
  402. --- 3756,3768 ----
  403.   
  404.       case STL_ALTPERCENT:
  405.           str = tmp;
  406. !         get_rel_pos(wp, str, TMPLEN);
  407.           break;
  408.   
  409.       case STL_ARGLISTSTAT:
  410.           fillable = FALSE;
  411.           tmp[0] = 0;
  412. !         if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE))
  413.           str = tmp;
  414.           break;
  415.   
  416. ***************
  417. *** 3794,3800 ****
  418.       case STL_BYTEVAL_X:
  419.           base = 'X';
  420.       case STL_BYTEVAL:
  421. !         if (wp->w_cursor.col > STRLEN(linecont))
  422.           num = 0;
  423.           else
  424.           {
  425. --- 3797,3803 ----
  426.       case STL_BYTEVAL_X:
  427.           base = 'X';
  428.       case STL_BYTEVAL:
  429. !         if (wp->w_cursor.col > (colnr_T)STRLEN(linecont))
  430.           num = 0;
  431.           else
  432.           {
  433. ***************
  434. *** 3967,3973 ****
  435.           if (zeropad)
  436.           *t++ = '0';
  437.           *t++ = '*';
  438. !         *t++ = nbase == 16 ? base : (nbase == 8 ? 'o' : 'd');
  439.           *t = 0;
  440.   
  441.           for (n = num, l = 1; n >= nbase; n /= nbase)
  442. --- 3970,3976 ----
  443.           if (zeropad)
  444.           *t++ = '0';
  445.           *t++ = '*';
  446. !         *t++ = nbase == 16 ? base : (char_u)(nbase == 8 ? 'o' : 'd');
  447.           *t = 0;
  448.   
  449.           for (n = num, l = 1; n >= nbase; n /= nbase)
  450. ***************
  451. *** 4160,4172 ****
  452.   #if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
  453.           || defined(FEAT_GUI_TABLINE) || defined(PROTO)
  454.   /*
  455. !  * Get relative cursor position in window into "str[]", in the form 99%, using
  456. !  * "Top", "Bot" or "All" when appropriate.
  457.    */
  458.       void
  459. ! get_rel_pos(wp, str)
  460.       win_T    *wp;
  461. !     char_u    *str;
  462.   {
  463.       long    above; /* number of lines above window */
  464.       long    below; /* number of lines below window */
  465. --- 4163,4176 ----
  466.   #if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
  467.           || defined(FEAT_GUI_TABLINE) || defined(PROTO)
  468.   /*
  469. !  * Get relative cursor position in window into "buf[buflen]", in the form 99%,
  470. !  * using "Top", "Bot" or "All" when appropriate.
  471.    */
  472.       void
  473. ! get_rel_pos(wp, buf, buflen)
  474.       win_T    *wp;
  475. !     char_u    *buf;
  476. !     int        buflen;
  477.   {
  478.       long    above; /* number of lines above window */
  479.       long    below; /* number of lines below window */
  480. ***************
  481. *** 4177,4210 ****
  482.   #endif
  483.       below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
  484.       if (below <= 0)
  485. !     STRCPY(str, above == 0 ? _("All") : _("Bot"));
  486.       else if (above <= 0)
  487. !     STRCPY(str, _("Top"));
  488.       else
  489. !     sprintf((char *)str, "%2d%%", above > 1000000L
  490.                       ? (int)(above / ((above + below) / 100L))
  491.                       : (int)(above * 100L / (above + below)));
  492.   }
  493.   #endif
  494.   
  495.   /*
  496. !  * Append (file 2 of 8) to 'buf', if editing more than one file.
  497.    * Return TRUE if it was appended.
  498.    */
  499. !     int
  500. ! append_arg_number(wp, buf, add_file, maxlen)
  501.       win_T    *wp;
  502.       char_u    *buf;
  503.       int        add_file;    /* Add "file" before the arg number */
  504. -     int        maxlen;        /* maximum nr of chars in buf or zero*/
  505.   {
  506.       char_u    *p;
  507.   
  508.       if (ARGCOUNT <= 1)        /* nothing to do */
  509.       return FALSE;
  510.   
  511. !     p = buf + STRLEN(buf);        /* go to the end of the buffer */
  512. !     if (maxlen && p - buf + 35 >= maxlen) /* getting too long */
  513.       return FALSE;
  514.       *p++ = ' ';
  515.       *p++ = '(';
  516. --- 4181,4215 ----
  517.   #endif
  518.       below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
  519.       if (below <= 0)
  520. !     vim_strncpy(buf, (char_u *)(above == 0 ? _("All") : _("Bot")),
  521. !                             (size_t)(buflen - 1));
  522.       else if (above <= 0)
  523. !     vim_strncpy(buf, (char_u *)_("Top"), (size_t)(buflen - 1));
  524.       else
  525. !     vim_snprintf((char *)buf, (size_t)buflen, "%2d%%", above > 1000000L
  526.                       ? (int)(above / ((above + below) / 100L))
  527.                       : (int)(above * 100L / (above + below)));
  528.   }
  529.   #endif
  530.   
  531.   /*
  532. !  * Append (file 2 of 8) to "buf[buflen]", if editing more than one file.
  533.    * Return TRUE if it was appended.
  534.    */
  535. !     static int
  536. ! append_arg_number(wp, buf, buflen, add_file)
  537.       win_T    *wp;
  538.       char_u    *buf;
  539. +     int        buflen;
  540.       int        add_file;    /* Add "file" before the arg number */
  541.   {
  542.       char_u    *p;
  543.   
  544.       if (ARGCOUNT <= 1)        /* nothing to do */
  545.       return FALSE;
  546.   
  547. !     p = buf + STRLEN(buf);    /* go to the end of the buffer */
  548. !     if (p - buf + 35 >= buflen)    /* getting too long */
  549.       return FALSE;
  550.       *p++ = ' ';
  551.       *p++ = '(';
  552. ***************
  553. *** 4213,4219 ****
  554.       STRCPY(p, "file ");
  555.       p += 5;
  556.       }
  557. !     sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
  558.                     : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
  559.       return TRUE;
  560.   }
  561. --- 4218,4225 ----
  562.       STRCPY(p, "file ");
  563.       p += 5;
  564.       }
  565. !     vim_snprintf((char *)p, (size_t)(buflen - (p - buf)),
  566. !         wp->w_arg_idx_invalid ? "(%d) of %d)"
  567.                     : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
  568.       return TRUE;
  569.   }
  570. ***************
  571. *** 4996,5002 ****
  572.       if (tab != NULL)
  573.       {
  574.           *tab++ = '\0';
  575. !         col = atoi((char *)tab);
  576.           tab = vim_strrchr(xline, '\t');
  577.           if (tab != NULL)
  578.           {
  579. --- 5002,5008 ----
  580.       if (tab != NULL)
  581.       {
  582.           *tab++ = '\0';
  583. !         col = (colnr_T)atoi((char *)tab);
  584.           tab = vim_strrchr(xline, '\t');
  585.           if (tab != NULL)
  586.           {
  587. ***************
  588. *** 5034,5039 ****
  589. --- 5040,5046 ----
  590.   #endif
  591.       char_u    *line;
  592.       int        max_buffers;
  593. +     size_t    len;
  594.   
  595.       if (find_viminfo_parameter('%') == NULL)
  596.       return;
  597. ***************
  598. *** 5042,5048 ****
  599.       max_buffers = get_viminfo_parameter('%');
  600.   
  601.       /* Allocate room for the file name, lnum and col. */
  602. !     line = alloc(MAXPATHL + 40);
  603.       if (line == NULL)
  604.       return;
  605.   
  606. --- 5049,5056 ----
  607.       max_buffers = get_viminfo_parameter('%');
  608.   
  609.       /* Allocate room for the file name, lnum and col. */
  610. ! #define LINE_BUF_LEN (MAXPATHL + 40)
  611. !     line = alloc(LINE_BUF_LEN);
  612.       if (line == NULL)
  613.       return;
  614.   
  615. ***************
  616. *** 5068,5074 ****
  617.           break;
  618.       putc('%', fp);
  619.       home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
  620. !     sprintf((char *)line + STRLEN(line), "\t%ld\t%d",
  621.               (long)buf->b_last_cursor.lnum,
  622.               buf->b_last_cursor.col);
  623.       viminfo_writestring(fp, line);
  624. --- 5076,5083 ----
  625.           break;
  626.       putc('%', fp);
  627.       home_replace(NULL, buf->b_ffname, line, MAXPATHL, TRUE);
  628. !     len = STRLEN(line);
  629. !     vim_snprintf((char *)line + len, len - LINE_BUF_LEN, "\t%ld\t%d",
  630.               (long)buf->b_last_cursor.lnum,
  631.               buf->b_last_cursor.col);
  632.       viminfo_writestring(fp, line);
  633. ***************
  634. *** 5226,5232 ****
  635.       return;
  636.   }
  637.   
  638. !     int
  639.   buf_change_sign_type(buf, markId, typenr)
  640.       buf_T    *buf;        /* buffer to store sign in */
  641.       int        markId;        /* sign ID */
  642. --- 5235,5241 ----
  643.       return;
  644.   }
  645.   
  646. !     linenr_T
  647.   buf_change_sign_type(buf, markId, typenr)
  648.       buf_T    *buf;        /* buffer to store sign in */
  649.       int        markId;        /* sign ID */
  650. ***************
  651. *** 5243,5252 ****
  652.       }
  653.       }
  654.   
  655. !     return 0;
  656.   }
  657.   
  658. !     int_u
  659.   buf_getsigntype(buf, lnum, type)
  660.       buf_T    *buf;
  661.       linenr_T    lnum;
  662. --- 5252,5261 ----
  663.       }
  664.       }
  665.   
  666. !     return (linenr_T)0;
  667.   }
  668.   
  669. !     int
  670.   buf_getsigntype(buf, lnum, type)
  671.       buf_T    *buf;
  672.       linenr_T    lnum;
  673. *** ../vim-7.2.166/src/charset.c    2008-07-24 21:30:44.000000000 +0200
  674. --- src/charset.c    2009-05-05 18:17:11.000000000 +0200
  675. ***************
  676. *** 17,23 ****
  677.   static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
  678.   #endif
  679.   
  680. ! static int nr2hex __ARGS((int c));
  681.   
  682.   static int    chartab_initialized = FALSE;
  683.   
  684. --- 17,23 ----
  685.   static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
  686.   #endif
  687.   
  688. ! static unsigned nr2hex __ARGS((unsigned c));
  689.   
  690.   static int    chartab_initialized = FALSE;
  691.   
  692. ***************
  693. *** 664,670 ****
  694.       }
  695.   #endif
  696.       buf[++i] = nr2hex((unsigned)c >> 4);
  697. !     buf[++i] = nr2hex(c);
  698.       buf[++i] = '>';
  699.       buf[++i] = NUL;
  700.   }
  701. --- 664,670 ----
  702.       }
  703.   #endif
  704.       buf[++i] = nr2hex((unsigned)c >> 4);
  705. !     buf[++i] = nr2hex((unsigned)c);
  706.       buf[++i] = '>';
  707.       buf[++i] = NUL;
  708.   }
  709. ***************
  710. *** 674,682 ****
  711.    * Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
  712.    * function key 1.
  713.    */
  714. !     static int
  715.   nr2hex(c)
  716. !     int        c;
  717.   {
  718.       if ((c & 0xf) <= 9)
  719.       return (c & 0xf) + '0';
  720. --- 674,682 ----
  721.    * Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
  722.    * function key 1.
  723.    */
  724. !     static unsigned
  725.   nr2hex(c)
  726. !     unsigned    c;
  727.   {
  728.       if ((c & 0xf) <= 9)
  729.       return (c & 0xf) + '0';
  730. ***************
  731. *** 884,890 ****
  732.       if (c >= 0x100)
  733.       {
  734.       if (enc_dbcs != 0)
  735. !         return dbcs_class((unsigned)c >> 8, c & 0xff) >= 2;
  736.       if (enc_utf8)
  737.           return utf_class(c) >= 2;
  738.       }
  739. --- 884,890 ----
  740.       if (c >= 0x100)
  741.       {
  742.       if (enc_dbcs != 0)
  743. !         return dbcs_class((unsigned)c >> 8, (unsigned)(c & 0xff)) >= 2;
  744.       if (enc_utf8)
  745.           return utf_class(c) >= 2;
  746.       }
  747. ***************
  748. *** 1090,1096 ****
  749.        */
  750.       numberextra = win_col_off(wp);
  751.       col2 = col;
  752. !     colmax = W_WIDTH(wp) - numberextra;
  753.       if (col >= colmax)
  754.       {
  755.           n = colmax + win_col_off2(wp);
  756. --- 1090,1096 ----
  757.        */
  758.       numberextra = win_col_off(wp);
  759.       col2 = col;
  760. !     colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
  761.       if (col >= colmax)
  762.       {
  763.           n = colmax + win_col_off2(wp);
  764. ***************
  765. *** 1201,1217 ****
  766.       win_T    *wp;
  767.       colnr_T    vcol;
  768.   {
  769. !     colnr_T    width1;        /* width of first line (after line number) */
  770. !     colnr_T    width2;        /* width of further lines */
  771.   
  772.   #ifdef FEAT_VERTSPLIT
  773.       if (wp->w_width == 0)    /* there is no border */
  774.       return FALSE;
  775.   #endif
  776.       width1 = W_WIDTH(wp) - win_col_off(wp);
  777. !     if (vcol < width1 - 1)
  778.       return FALSE;
  779. !     if (vcol == width1 - 1)
  780.       return TRUE;
  781.       width2 = width1 + win_col_off2(wp);
  782.       return ((vcol - width1) % width2 == width2 - 1);
  783. --- 1201,1217 ----
  784.       win_T    *wp;
  785.       colnr_T    vcol;
  786.   {
  787. !     int        width1;        /* width of first line (after line number) */
  788. !     int        width2;        /* width of further lines */
  789.   
  790.   #ifdef FEAT_VERTSPLIT
  791.       if (wp->w_width == 0)    /* there is no border */
  792.       return FALSE;
  793.   #endif
  794.       width1 = W_WIDTH(wp) - win_col_off(wp);
  795. !     if ((int)vcol < width1 - 1)
  796.       return FALSE;
  797. !     if ((int)vcol == width1 - 1)
  798.       return TRUE;
  799.       width2 = width1 + win_col_off2(wp);
  800.       return ((vcol - width1) % width2 == width2 - 1);
  801. ***************
  802. *** 1396,1408 ****
  803.   # ifdef FEAT_MBYTE
  804.       /* Cannot put the cursor on part of a wide character. */
  805.       ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
  806. !     if (pos->col < STRLEN(ptr))
  807.       {
  808.           int c = (*mb_ptr2char)(ptr + pos->col);
  809.   
  810.           if (c != TAB && vim_isprintc(c))
  811.           {
  812. !         endadd = char2cells(c) - 1;
  813.           if (coladd > endadd)    /* past end of line */
  814.               endadd = 0;
  815.           else
  816. --- 1396,1408 ----
  817.   # ifdef FEAT_MBYTE
  818.       /* Cannot put the cursor on part of a wide character. */
  819.       ptr = ml_get_buf(wp->w_buffer, pos->lnum, FALSE);
  820. !     if (pos->col < (colnr_T)STRLEN(ptr))
  821.       {
  822.           int c = (*mb_ptr2char)(ptr + pos->col);
  823.   
  824.           if (c != TAB && vim_isprintc(c))
  825.           {
  826. !         endadd = (colnr_T)(char2cells(c) - 1);
  827.           if (coladd > endadd)    /* past end of line */
  828.               endadd = 0;
  829.           else
  830. *** ../vim-7.2.166/src/cleanlint.vim    2009-05-13 12:08:12.000000000 +0200
  831. --- src/cleanlint.vim    2009-05-05 21:34:01.000000000 +0200
  832. ***************
  833. *** 0 ****
  834. --- 1,27 ----
  835. + " Vim tool: Filter output of splint
  836. + "
  837. + " Maintainer:    Bram Moolenaar <Bram@vim.org>
  838. + " Last Change:    2009 May 05
  839. + " Usage: redirect output of "make lint" to a file, edit that file with Vim and
  840. + " :call CleanLint()
  841. + " This deletes irrelevant messages.  What remains might be valid warnings.
  842. + fun! CleanLint()
  843. +   g/^  Types are incompatible/lockmarks d
  844. +   g/Assignment of dev_t to __dev_t:/lockmarks d
  845. +   g/Assignment of __dev_t to dev_t:/lockmarks d
  846. +   g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
  847. +   g/Operands of == have incompatible types (unsigned int, int): /lockmarks d
  848. +   g/Assignment of char to char_u: /lockmarks d
  849. +   g/Assignment of unsigned int to int: /lockmarks d
  850. +   g/Assignment of colnr_T to int: /lockmarks d
  851. +   g/Assignment of int to char_u: /lockmarks d
  852. +   g/Function .* expects arg . to be wint_t gets int: /lockmarks d
  853. +   g/^digraph.c.*digraphdefault.*is type char, expects char_u:/lockmarks d
  854. +   g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
  855. +   g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
  856. +   g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
  857. +   g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
  858. +   g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
  859. + endfun
  860. *** ../vim-7.2.166/src/digraph.c    2008-06-25 00:26:41.000000000 +0200
  861. --- src/digraph.c    2009-05-05 20:32:43.000000000 +0200
  862. ***************
  863. *** 32,38 ****
  864.   static void printdigraph __ARGS((digr_T *));
  865.   
  866.   /* digraphs added by the user */
  867. ! static garray_T    user_digraphs = {0, 0, sizeof(digr_T), 10, NULL};
  868.   
  869.   /*
  870.    * Note: Characters marked with XX are not included literally, because some
  871. --- 32,38 ----
  872.   static void printdigraph __ARGS((digr_T *));
  873.   
  874.   /* digraphs added by the user */
  875. ! static garray_T    user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
  876.   
  877.   /*
  878.    * Note: Characters marked with XX are not included literally, because some
  879. ***************
  880. *** 2371,2380 ****
  881.       }
  882.       else
  883.   #endif
  884. !         *p++ = dp->result;
  885.       if (char2cells(dp->result) == 1)
  886.           *p++ = ' ';
  887. !     sprintf((char *)p, " %3d", dp->result);
  888.       msg_outtrans(buf);
  889.       }
  890.   }
  891. --- 2371,2380 ----
  892.       }
  893.       else
  894.   #endif
  895. !         *p++ = (char_u)dp->result;
  896.       if (char2cells(dp->result) == 1)
  897.           *p++ = ' ';
  898. !     vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
  899.       msg_outtrans(buf);
  900.       }
  901.   }
  902. ***************
  903. *** 2395,2401 ****
  904.   static void keymap_unload __ARGS((void));
  905.   
  906.   /*
  907. !  * Set up key mapping tables for the 'keymap' option
  908.    */
  909.       char_u *
  910.   keymap_init()
  911. --- 2395,2404 ----
  912.   static void keymap_unload __ARGS((void));
  913.   
  914.   /*
  915. !  * Set up key mapping tables for the 'keymap' option.
  916. !  * Returns NULL if OK, an error message for failure.  This only needs to be
  917. !  * used when setting the option, not later when the value has already been
  918. !  * checked.
  919.    */
  920.       char_u *
  921.   keymap_init()
  922. ***************
  923. *** 2412,2436 ****
  924.       else
  925.       {
  926.       char_u    *buf;
  927.   
  928.       /* Source the keymap file.  It will contain a ":loadkeymap" command
  929.        * which will call ex_loadkeymap() below. */
  930. !     buf = alloc((unsigned)(STRLEN(curbuf->b_p_keymap)
  931.   # ifdef FEAT_MBYTE
  932. !                                + STRLEN(p_enc)
  933.   # endif
  934. !                                + 14));
  935.       if (buf == NULL)
  936.           return e_outofmem;
  937.   
  938.   # ifdef FEAT_MBYTE
  939.       /* try finding "keymap/'keymap'_'encoding'.vim"  in 'runtimepath' */
  940. !     sprintf((char *)buf, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc);
  941.       if (source_runtime(buf, FALSE) == FAIL)
  942.   # endif
  943.       {
  944.           /* try finding "keymap/'keymap'.vim" in 'runtimepath'  */
  945. !         sprintf((char *)buf, "keymap/%s.vim", curbuf->b_p_keymap);
  946.           if (source_runtime(buf, FALSE) == FAIL)
  947.           {
  948.           vim_free(buf);
  949. --- 2415,2443 ----
  950.       else
  951.       {
  952.       char_u    *buf;
  953. +     size_t  buflen;
  954.   
  955.       /* Source the keymap file.  It will contain a ":loadkeymap" command
  956.        * which will call ex_loadkeymap() below. */
  957. !     buflen = STRLEN(curbuf->b_p_keymap)
  958.   # ifdef FEAT_MBYTE
  959. !                        + STRLEN(p_enc)
  960.   # endif
  961. !                                + 14;
  962. !     buf = alloc((unsigned)buflen);
  963.       if (buf == NULL)
  964.           return e_outofmem;
  965.   
  966.   # ifdef FEAT_MBYTE
  967.       /* try finding "keymap/'keymap'_'encoding'.vim"  in 'runtimepath' */
  968. !     vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
  969. !                            curbuf->b_p_keymap, p_enc);
  970.       if (source_runtime(buf, FALSE) == FAIL)
  971.   # endif
  972.       {
  973.           /* try finding "keymap/'keymap'.vim" in 'runtimepath'  */
  974. !         vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
  975. !                               curbuf->b_p_keymap);
  976.           if (source_runtime(buf, FALSE) == FAIL)
  977.           {
  978.           vim_free(buf);
  979. *** ../vim-7.2.166/src/edit.c    2009-02-21 20:27:00.000000000 +0100
  980. --- src/edit.c    2009-05-05 21:14:50.000000000 +0200
  981. ***************
  982. *** 57,63 ****
  983.       N_(" Keyword Local completion (^N^P)"),
  984.   };
  985.   
  986. ! static char_u e_hitend[] = N_("Hit end of paragraph");
  987.   
  988.   /*
  989.    * Structure used to store one match for insert completion.
  990. --- 57,63 ----
  991.       N_(" Keyword Local completion (^N^P)"),
  992.   };
  993.   
  994. ! static char e_hitend[] = N_("Hit end of paragraph");
  995.   
  996.   /*
  997.    * Structure used to store one match for insert completion.
  998. ***************
  999. *** 69,75 ****
  1000. --- 69,79 ----
  1001.       compl_T    *cp_prev;
  1002.       char_u    *cp_str;    /* matched text */
  1003.       char    cp_icase;    /* TRUE or FALSE: ignore case */
  1004. + #ifdef S_SPLINT_S  /* splint can't handle array of pointers */
  1005. +     char_u    **cp_text;    /* text for the menu */
  1006. + #else
  1007.       char_u    *(cp_text[CPT_COUNT]);    /* text for the menu */
  1008. + #endif
  1009.       char_u    *cp_fname;    /* file containing the match, allocated when
  1010.                    * cp_flags has FREE_FNAME */
  1011.       int        cp_flags;    /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
  1012. ***************
  1013. *** 306,312 ****
  1014.       int        c = 0;
  1015.       char_u    *ptr;
  1016.       int        lastc;
  1017. !     colnr_T    mincol;
  1018.       static linenr_T o_lnum = 0;
  1019.       int        i;
  1020.       int        did_backspace = TRUE;        /* previous char was backspace */
  1021. --- 310,316 ----
  1022.       int        c = 0;
  1023.       char_u    *ptr;
  1024.       int        lastc;
  1025. !     int        mincol;
  1026.       static linenr_T o_lnum = 0;
  1027.       int        i;
  1028.       int        did_backspace = TRUE;        /* previous char was backspace */
  1029. ***************
  1030. *** 387,393 ****
  1031.       if (startln)
  1032.           Insstart.col = 0;
  1033.       }
  1034. !     Insstart_textlen = linetabsize(ml_get_curline());
  1035.       Insstart_blank_vcol = MAXCOL;
  1036.       if (!did_ai)
  1037.       ai_col = 0;
  1038. --- 391,397 ----
  1039.       if (startln)
  1040.           Insstart.col = 0;
  1041.       }
  1042. !     Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
  1043.       Insstart_blank_vcol = MAXCOL;
  1044.       if (!did_ai)
  1045.       ai_col = 0;
  1046. ***************
  1047. *** 653,659 ****
  1048.           mincol = curwin->w_wcol;
  1049.           validate_cursor_col();
  1050.   
  1051. !         if ((int)curwin->w_wcol < (int)mincol - curbuf->b_p_ts
  1052.               && curwin->w_wrow == W_WINROW(curwin)
  1053.                            + curwin->w_height - 1 - p_so
  1054.               && (curwin->w_cursor.lnum != curwin->w_topline
  1055. --- 657,663 ----
  1056.           mincol = curwin->w_wcol;
  1057.           validate_cursor_col();
  1058.   
  1059. !         if ((int)curwin->w_wcol < mincol - curbuf->b_p_ts
  1060.               && curwin->w_wrow == W_WINROW(curwin)
  1061.                            + curwin->w_height - 1 - p_so
  1062.               && (curwin->w_cursor.lnum != curwin->w_topline
  1063. ***************
  1064. *** 1773,1779 ****
  1065.        * Compute the screen column where the cursor should be.
  1066.        */
  1067.       vcol = get_indent() - vcol;
  1068. !     curwin->w_virtcol = (vcol < 0) ? 0 : vcol;
  1069.   
  1070.       /*
  1071.        * Advance the cursor until we reach the right screen column.
  1072. --- 1777,1783 ----
  1073.        * Compute the screen column where the cursor should be.
  1074.        */
  1075.       vcol = get_indent() - vcol;
  1076. !     curwin->w_virtcol = (colnr_T)((vcol < 0) ? 0 : vcol);
  1077.   
  1078.       /*
  1079.        * Advance the cursor until we reach the right screen column.
  1080. ***************
  1081. *** 1800,1808 ****
  1082.        */
  1083.       if (vcol != (int)curwin->w_virtcol)
  1084.       {
  1085. !         curwin->w_cursor.col = new_cursor_col;
  1086.           i = (int)curwin->w_virtcol - vcol;
  1087. !         ptr = alloc(i + 1);
  1088.           if (ptr != NULL)
  1089.           {
  1090.           new_cursor_col += i;
  1091. --- 1804,1812 ----
  1092.        */
  1093.       if (vcol != (int)curwin->w_virtcol)
  1094.       {
  1095. !         curwin->w_cursor.col = (colnr_T)new_cursor_col;
  1096.           i = (int)curwin->w_virtcol - vcol;
  1097. !         ptr = alloc((unsigned)(i + 1));
  1098.           if (ptr != NULL)
  1099.           {
  1100.           new_cursor_col += i;
  1101. ***************
  1102. *** 1826,1832 ****
  1103.       if (new_cursor_col <= 0)
  1104.       curwin->w_cursor.col = 0;
  1105.       else
  1106. !     curwin->w_cursor.col = new_cursor_col;
  1107.       curwin->w_set_curswant = TRUE;
  1108.       changed_cline_bef_curs();
  1109.   
  1110. --- 1830,1836 ----
  1111.       if (new_cursor_col <= 0)
  1112.       curwin->w_cursor.col = 0;
  1113.       else
  1114. !     curwin->w_cursor.col = (colnr_T)new_cursor_col;
  1115.       curwin->w_set_curswant = TRUE;
  1116.       changed_cline_bef_curs();
  1117.   
  1118. ***************
  1119. *** 1966,1972 ****
  1120.   #ifdef FEAT_MBYTE
  1121.       if (enc_utf8 && limit_col >= 0)
  1122.       {
  1123. !     int ecol = curwin->w_cursor.col + 1;
  1124.   
  1125.       /* Make sure the cursor is at the start of a character, but
  1126.        * skip forward again when going too far back because of a
  1127. --- 1970,1976 ----
  1128.   #ifdef FEAT_MBYTE
  1129.       if (enc_utf8 && limit_col >= 0)
  1130.       {
  1131. !     colnr_T ecol = curwin->w_cursor.col + 1;
  1132.   
  1133.       /* Make sure the cursor is at the start of a character, but
  1134.        * skip forward again when going too far back because of a
  1135. ***************
  1136. *** 1982,1988 ****
  1137.       }
  1138.       if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
  1139.           return FALSE;
  1140. !     del_bytes((long)(ecol - curwin->w_cursor.col), FALSE, TRUE);
  1141.       }
  1142.       else
  1143.   #endif
  1144. --- 1986,1992 ----
  1145.       }
  1146.       if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
  1147.           return FALSE;
  1148. !     del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE);
  1149.       }
  1150.       else
  1151.   #endif
  1152. ***************
  1153. *** 2201,2207 ****
  1154.           actual_compl_length = compl_length;
  1155.   
  1156.       /* Allocate wide character array for the completion and fill it. */
  1157. !     wca = (int *)alloc(actual_len * sizeof(int));
  1158.       if (wca != NULL)
  1159.       {
  1160.           p = str;
  1161. --- 2205,2211 ----
  1162.           actual_compl_length = compl_length;
  1163.   
  1164.       /* Allocate wide character array for the completion and fill it. */
  1165. !     wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
  1166.       if (wca != NULL)
  1167.       {
  1168.           p = str;
  1169. ***************
  1170. *** 2580,2586 ****
  1171.    */
  1172.       void
  1173.   set_completion(startcol, list)
  1174. !     int        startcol;
  1175.       list_T  *list;
  1176.   {
  1177.       /* If already doing completions stop it. */
  1178. --- 2584,2590 ----
  1179.    */
  1180.       void
  1181.   set_completion(startcol, list)
  1182. !     colnr_T startcol;
  1183.       list_T  *list;
  1184.   {
  1185.       /* If already doing completions stop it. */
  1186. ***************
  1187. *** 2591,2600 ****
  1188.       if (stop_arrow() == FAIL)
  1189.       return;
  1190.   
  1191. !     if (startcol > (int)curwin->w_cursor.col)
  1192.       startcol = curwin->w_cursor.col;
  1193.       compl_col = startcol;
  1194. !     compl_length = curwin->w_cursor.col - startcol;
  1195.       /* compl_pattern doesn't need to be set */
  1196.       compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
  1197.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  1198. --- 2595,2604 ----
  1199.       if (stop_arrow() == FAIL)
  1200.       return;
  1201.   
  1202. !     if (startcol > curwin->w_cursor.col)
  1203.       startcol = curwin->w_cursor.col;
  1204.       compl_col = startcol;
  1205. !     compl_length = (int)curwin->w_cursor.col - (int)startcol;
  1206.       /* compl_pattern doesn't need to be set */
  1207.       compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
  1208.       if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
  1209. ***************
  1210. *** 2860,2866 ****
  1211.       regmatch_T    regmatch;
  1212.       char_u    **files;
  1213.       int        count;
  1214. -     int        i;
  1215.       int        save_p_scs;
  1216.       int        dir = compl_direction;
  1217.   
  1218. --- 2864,2869 ----
  1219. ***************
  1220. *** 2892,2908 ****
  1221.       if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
  1222.       {
  1223.       char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
  1224.   
  1225.       if (pat_esc == NULL)
  1226.           goto theend;
  1227. !     i = (int)STRLEN(pat_esc) + 10;
  1228. !     ptr = alloc(i);
  1229.       if (ptr == NULL)
  1230.       {
  1231.           vim_free(pat_esc);
  1232.           goto theend;
  1233.       }
  1234. !     vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
  1235.       regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
  1236.       vim_free(pat_esc);
  1237.       vim_free(ptr);
  1238. --- 2895,2912 ----
  1239.       if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
  1240.       {
  1241.       char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
  1242. +     size_t len;
  1243.   
  1244.       if (pat_esc == NULL)
  1245.           goto theend;
  1246. !     len = STRLEN(pat_esc) + 10;
  1247. !     ptr = alloc((unsigned)len);
  1248.       if (ptr == NULL)
  1249.       {
  1250.           vim_free(pat_esc);
  1251.           goto theend;
  1252.       }
  1253. !     vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
  1254.       regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
  1255.       vim_free(pat_esc);
  1256.       vim_free(ptr);
  1257. ***************
  1258. *** 2993,2999 ****
  1259.       {
  1260.           vim_snprintf((char *)IObuff, IOSIZE,
  1261.                     _("Scanning dictionary: %s"), (char *)files[i]);
  1262. !         msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1263.       }
  1264.   
  1265.       if (fp != NULL)
  1266. --- 2997,3003 ----
  1267.       {
  1268.           vim_snprintf((char *)IObuff, IOSIZE,
  1269.                     _("Scanning dictionary: %s"), (char *)files[i]);
  1270. !         (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1271.       }
  1272.   
  1273.       if (fp != NULL)
  1274. ***************
  1275. *** 3311,3317 ****
  1276.       static int
  1277.   ins_compl_len()
  1278.   {
  1279. !     int off = curwin->w_cursor.col - compl_col;
  1280.   
  1281.       if (off < 0)
  1282.       return 0;
  1283. --- 3315,3321 ----
  1284.       static int
  1285.   ins_compl_len()
  1286.   {
  1287. !     int off = (int)curwin->w_cursor.col - (int)compl_col;
  1288.   
  1289.       if (off < 0)
  1290.       return 0;
  1291. ***************
  1292. *** 3347,3353 ****
  1293.   
  1294.       vim_free(compl_leader);
  1295.       compl_leader = vim_strnsave(ml_get_curline() + compl_col,
  1296. !                         curwin->w_cursor.col - compl_col);
  1297.       if (compl_leader != NULL)
  1298.       ins_compl_new_leader();
  1299.   }
  1300. --- 3351,3357 ----
  1301.   
  1302.       vim_free(compl_leader);
  1303.       compl_leader = vim_strnsave(ml_get_curline() + compl_col,
  1304. !                      (int)(curwin->w_cursor.col - compl_col));
  1305.       if (compl_leader != NULL)
  1306.       ins_compl_new_leader();
  1307.   }
  1308. ***************
  1309. *** 3395,3401 ****
  1310.   ins_compl_addfrommatch()
  1311.   {
  1312.       char_u    *p;
  1313. !     int        len = curwin->w_cursor.col - compl_col;
  1314.       int        c;
  1315.       compl_T    *cp;
  1316.   
  1317. --- 3399,3405 ----
  1318.   ins_compl_addfrommatch()
  1319.   {
  1320.       char_u    *p;
  1321. !     int        len = (int)curwin->w_cursor.col - (int)compl_col;
  1322.       int        c;
  1323.       compl_T    *cp;
  1324.   
  1325. ***************
  1326. *** 3961,3967 ****
  1327.                   : ins_buf->b_sfname == NULL
  1328.                   ? (char *)ins_buf->b_fname
  1329.                   : (char *)ins_buf->b_sfname);
  1330. !         msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1331.           }
  1332.           else if (*e_cpt == NUL)
  1333.           break;
  1334. --- 3965,3971 ----
  1335.                   : ins_buf->b_sfname == NULL
  1336.                   ? (char *)ins_buf->b_fname
  1337.                   : (char *)ins_buf->b_sfname);
  1338. !         (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1339.           }
  1340.           else if (*e_cpt == NUL)
  1341.           break;
  1342. ***************
  1343. *** 3991,3997 ****
  1344.           {
  1345.               type = CTRL_X_TAGS;
  1346.               sprintf((char*)IObuff, _("Scanning tags."));
  1347. !             msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1348.           }
  1349.           else
  1350.               type = -1;
  1351. --- 3995,4001 ----
  1352.           {
  1353.               type = CTRL_X_TAGS;
  1354.               sprintf((char*)IObuff, _("Scanning tags."));
  1355. !             (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
  1356.           }
  1357.           else
  1358.               type = -1;
  1359. ***************
  1360. *** 6320,6326 ****
  1361.           ins_need_undo = FALSE;
  1362.       }
  1363.       Insstart = curwin->w_cursor;    /* new insertion starts here */
  1364. !     Insstart_textlen = linetabsize(ml_get_curline());
  1365.       ai_col = 0;
  1366.   #ifdef FEAT_VREPLACE
  1367.       if (State & VREPLACE_FLAG)
  1368. --- 6324,6330 ----
  1369.           ins_need_undo = FALSE;
  1370.       }
  1371.       Insstart = curwin->w_cursor;    /* new insertion starts here */
  1372. !     Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
  1373.       ai_col = 0;
  1374.   #ifdef FEAT_VREPLACE
  1375.       if (State & VREPLACE_FLAG)
  1376. *** ../vim-7.2.166/src/ex_cmds.c    2009-04-29 18:44:38.000000000 +0200
  1377. --- src/ex_cmds.c    2009-05-05 17:55:40.000000000 +0200
  1378. ***************
  1379. *** 1789,1795 ****
  1380.        * overwrite a user's viminfo file after a "su root", with a
  1381.        * viminfo file that the user can't read.
  1382.        */
  1383. !     st_old.st_dev = 0;
  1384.       st_old.st_ino = 0;
  1385.       st_old.st_mode = 0600;
  1386.       if (mch_stat((char *)fname, &st_old) == 0
  1387. --- 1789,1795 ----
  1388.        * overwrite a user's viminfo file after a "su root", with a
  1389.        * viminfo file that the user can't read.
  1390.        */
  1391. !     st_old.st_dev = (dev_t)0;
  1392.       st_old.st_ino = 0;
  1393.       st_old.st_mode = 0600;
  1394.       if (mch_stat((char *)fname, &st_old) == 0
  1395. ***************
  1396. *** 3715,3721 ****
  1397.       /* If the window options were changed may need to set the spell language.
  1398.        * Can only do this after the buffer has been properly setup. */
  1399.       if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
  1400. !     did_set_spelllang(curbuf);
  1401.   #endif
  1402.   
  1403.       if (command == NULL)
  1404. --- 3715,3721 ----
  1405.       /* If the window options were changed may need to set the spell language.
  1406.        * Can only do this after the buffer has been properly setup. */
  1407.       if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
  1408. !     (void)did_set_spelllang(curbuf);
  1409.   #endif
  1410.   
  1411.       if (command == NULL)
  1412. ***************
  1413. *** 3788,3794 ****
  1414.   
  1415.   #ifdef FEAT_KEYMAP
  1416.       if (curbuf->b_kmap_state & KEYMAP_INIT)
  1417. !     keymap_init();
  1418.   #endif
  1419.   
  1420.       --RedrawingDisabled;
  1421. --- 3788,3794 ----
  1422.   
  1423.   #ifdef FEAT_KEYMAP
  1424.       if (curbuf->b_kmap_state & KEYMAP_INIT)
  1425. !     (void)keymap_init();
  1426.   #endif
  1427.   
  1428.       --RedrawingDisabled;
  1429. *** ../vim-7.2.166/src/globals.h    2009-03-05 03:13:51.000000000 +0100
  1430. --- src/globals.h    2009-05-09 21:14:49.000000000 +0200
  1431. ***************
  1432. *** 524,530 ****
  1433.   EXTERN win_T    *prevwin INIT(= NULL);    /* previous window */
  1434.   # define W_NEXT(wp) ((wp)->w_next)
  1435.   # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
  1436. ! #define FOR_ALL_TAB_WINDOWS(tp, wp) \
  1437.       for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
  1438.       for ((wp) = ((tp) == curtab) \
  1439.           ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
  1440. --- 524,530 ----
  1441.   EXTERN win_T    *prevwin INIT(= NULL);    /* previous window */
  1442.   # define W_NEXT(wp) ((wp)->w_next)
  1443.   # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
  1444. ! # define FOR_ALL_TAB_WINDOWS(tp, wp) \
  1445.       for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
  1446.       for ((wp) = ((tp) == curtab) \
  1447.           ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
  1448. ***************
  1449. *** 718,724 ****
  1450.   
  1451.   EXTERN pos_T    saved_cursor        /* w_cursor before formatting text. */
  1452.   # ifdef DO_INIT
  1453. !     = INIT_POS_T
  1454.   # endif
  1455.       ;
  1456.   
  1457. --- 718,724 ----
  1458.   
  1459.   EXTERN pos_T    saved_cursor        /* w_cursor before formatting text. */
  1460.   # ifdef DO_INIT
  1461. !     = INIT_POS_T(0, 0, 0)
  1462.   # endif
  1463.       ;
  1464.   
  1465. ***************
  1466. *** 1039,1045 ****
  1467.   EXTERN int    did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
  1468.   EXTERN pos_T    last_cursormoved        /* for CursorMoved event */
  1469.   # ifdef DO_INIT
  1470. !             = INIT_POS_T
  1471.   # endif
  1472.               ;
  1473.   #endif
  1474. --- 1039,1045 ----
  1475.   EXTERN int    did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
  1476.   EXTERN pos_T    last_cursormoved        /* for CursorMoved event */
  1477.   # ifdef DO_INIT
  1478. !             = INIT_POS_T(0, 0, 0)
  1479.   # endif
  1480.               ;
  1481.   #endif
  1482. *** ../vim-7.2.166/src/ops.c    2009-04-29 17:39:17.000000000 +0200
  1483. --- src/ops.c    2009-05-13 12:41:02.000000000 +0200
  1484. ***************
  1485. *** 6400,6406 ****
  1486.           {
  1487.           getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
  1488.                                   &max_pos.col);
  1489. !         sprintf((char *)buf1, _("%ld Cols; "),
  1490.               (long)(oparg.end_vcol - oparg.start_vcol + 1));
  1491.           }
  1492.           else
  1493. --- 6400,6406 ----
  1494.           {
  1495.           getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
  1496.                                   &max_pos.col);
  1497. !         vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
  1498.               (long)(oparg.end_vcol - oparg.start_vcol + 1));
  1499.           }
  1500.           else
  1501. ***************
  1502. *** 6408,6420 ****
  1503.   
  1504.           if (char_count_cursor == byte_count_cursor
  1505.                             && char_count == byte_count)
  1506. !         sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
  1507.               buf1, line_count_selected,
  1508.               (long)curbuf->b_ml.ml_line_count,
  1509.               word_count_cursor, word_count,
  1510.               byte_count_cursor, byte_count);
  1511.           else
  1512. !         sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
  1513.               buf1, line_count_selected,
  1514.               (long)curbuf->b_ml.ml_line_count,
  1515.               word_count_cursor, word_count,
  1516. --- 6408,6422 ----
  1517.   
  1518.           if (char_count_cursor == byte_count_cursor
  1519.                             && char_count == byte_count)
  1520. !         vim_snprintf((char *)IObuff, IOSIZE,
  1521. !             _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
  1522.               buf1, line_count_selected,
  1523.               (long)curbuf->b_ml.ml_line_count,
  1524.               word_count_cursor, word_count,
  1525.               byte_count_cursor, byte_count);
  1526.           else
  1527. !         vim_snprintf((char *)IObuff, IOSIZE,
  1528. !             _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
  1529.               buf1, line_count_selected,
  1530.               (long)curbuf->b_ml.ml_line_count,
  1531.               word_count_cursor, word_count,
  1532. ***************
  1533. *** 6426,6445 ****
  1534.       {
  1535.           p = ml_get_curline();
  1536.           validate_virtcol();
  1537. !         col_print(buf1, (int)curwin->w_cursor.col + 1,
  1538.               (int)curwin->w_virtcol + 1);
  1539. !         col_print(buf2, (int)STRLEN(p), linetabsize(p));
  1540.   
  1541.           if (char_count_cursor == byte_count_cursor
  1542.               && char_count == byte_count)
  1543. !         sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
  1544.               (char *)buf1, (char *)buf2,
  1545.               (long)curwin->w_cursor.lnum,
  1546.               (long)curbuf->b_ml.ml_line_count,
  1547.               word_count_cursor, word_count,
  1548.               byte_count_cursor, byte_count);
  1549.           else
  1550. !         sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
  1551.               (char *)buf1, (char *)buf2,
  1552.               (long)curwin->w_cursor.lnum,
  1553.               (long)curbuf->b_ml.ml_line_count,
  1554. --- 6428,6449 ----
  1555.       {
  1556.           p = ml_get_curline();
  1557.           validate_virtcol();
  1558. !         col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
  1559.               (int)curwin->w_virtcol + 1);
  1560. !         col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p));
  1561.   
  1562.           if (char_count_cursor == byte_count_cursor
  1563.               && char_count == byte_count)
  1564. !         vim_snprintf((char *)IObuff, IOSIZE,
  1565. !             _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
  1566.               (char *)buf1, (char *)buf2,
  1567.               (long)curwin->w_cursor.lnum,
  1568.               (long)curbuf->b_ml.ml_line_count,
  1569.               word_count_cursor, word_count,
  1570.               byte_count_cursor, byte_count);
  1571.           else
  1572. !         vim_snprintf((char *)IObuff, IOSIZE,
  1573. !             _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
  1574.               (char *)buf1, (char *)buf2,
  1575.               (long)curwin->w_cursor.lnum,
  1576.               (long)curbuf->b_ml.ml_line_count,
  1577. *** ../vim-7.2.166/src/os_unix.c    2009-03-02 02:44:54.000000000 +0100
  1578. --- src/os_unix.c    2009-05-05 17:35:58.000000000 +0200
  1579. ***************
  1580. *** 199,205 ****
  1581.   #endif
  1582.   
  1583.   #ifndef SIG_ERR
  1584. ! # define SIG_ERR    ((RETSIGTYPE (*)())-1)
  1585.   #endif
  1586.   
  1587.   /* volatile because it is used in signal handler sig_winch(). */
  1588. --- 199,207 ----
  1589.   #endif
  1590.   
  1591.   #ifndef SIG_ERR
  1592. ! # ifndef S_SPLINT_S
  1593. ! #  define SIG_ERR    ((RETSIGTYPE (*)())-1)
  1594. ! # endif
  1595.   #endif
  1596.   
  1597.   /* volatile because it is used in signal handler sig_winch(). */
  1598. ***************
  1599. *** 441,447 ****
  1600.   
  1601.   #if defined(HAVE_TOTAL_MEM) || defined(PROTO)
  1602.   # ifdef HAVE_SYS_RESOURCE_H
  1603. ! #  include <sys/resource.h>
  1604.   # endif
  1605.   # if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
  1606.   #  include <sys/sysctl.h>
  1607. --- 443,451 ----
  1608.   
  1609.   #if defined(HAVE_TOTAL_MEM) || defined(PROTO)
  1610.   # ifdef HAVE_SYS_RESOURCE_H
  1611. ! #  ifndef S_SPLINT_S  /* splint crashes on bits/resource.h */
  1612. ! #   include <sys/resource.h>
  1613. ! #  endif
  1614.   # endif
  1615.   # if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
  1616.   #  include <sys/sysctl.h>
  1617. *** ../vim-7.2.166/src/os_unix.h    2008-06-20 18:06:36.000000000 +0200
  1618. --- src/os_unix.h    2009-05-05 17:07:45.000000000 +0200
  1619. ***************
  1620. *** 53,59 ****
  1621.   #endif
  1622.   
  1623.   #ifdef HAVE_UNISTD_H
  1624. ! # include <unistd.h>
  1625.   #endif
  1626.   
  1627.   #ifdef HAVE_LIBC_H
  1628. --- 53,61 ----
  1629.   #endif
  1630.   
  1631.   #ifdef HAVE_UNISTD_H
  1632. ! # ifndef S_SPLINT_S  /* splint crashes on bits/confname.h */
  1633. ! #  include <unistd.h>
  1634. ! # endif
  1635.   #endif
  1636.   
  1637.   #ifdef HAVE_LIBC_H
  1638. *** ../vim-7.2.166/src/proto/buffer.pro    2008-11-15 14:10:23.000000000 +0100
  1639. --- src/proto/buffer.pro    2009-05-13 12:23:41.000000000 +0200
  1640. ***************
  1641. *** 37,49 ****
  1642.   int otherfile __ARGS((char_u *ffname));
  1643.   void buf_setino __ARGS((buf_T *buf));
  1644.   void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
  1645. ! void col_print __ARGS((char_u *buf, int col, int vcol));
  1646.   void maketitle __ARGS((void));
  1647.   void resettitle __ARGS((void));
  1648.   void free_titles __ARGS((void));
  1649.   int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab));
  1650. ! void get_rel_pos __ARGS((win_T *wp, char_u *str));
  1651. ! int append_arg_number __ARGS((win_T *wp, char_u *buf, int add_file, int maxlen));
  1652.   char_u *fix_fname __ARGS((char_u *fname));
  1653.   void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
  1654.   char_u *alist_name __ARGS((aentry_T *aep));
  1655. --- 37,48 ----
  1656.   int otherfile __ARGS((char_u *ffname));
  1657.   void buf_setino __ARGS((buf_T *buf));
  1658.   void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
  1659. ! void col_print __ARGS((char_u *buf, size_t buflen, int col, int vcol));
  1660.   void maketitle __ARGS((void));
  1661.   void resettitle __ARGS((void));
  1662.   void free_titles __ARGS((void));
  1663.   int build_stl_str_hl __ARGS((win_T *wp, char_u *out, size_t outlen, char_u *fmt, int use_sandbox, int fillchar, int maxwidth, struct stl_hlrec *hltab, struct stl_hlrec *tabtab));
  1664. ! void get_rel_pos __ARGS((win_T *wp, char_u *buf, int buflen));
  1665.   char_u *fix_fname __ARGS((char_u *fname));
  1666.   void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
  1667.   char_u *alist_name __ARGS((aentry_T *aep));
  1668. ***************
  1669. *** 54,61 ****
  1670.   void write_viminfo_bufferlist __ARGS((FILE *fp));
  1671.   char *buf_spname __ARGS((buf_T *buf));
  1672.   void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
  1673. ! int buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
  1674. ! int_u buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
  1675.   linenr_T buf_delsign __ARGS((buf_T *buf, int id));
  1676.   int buf_findsign __ARGS((buf_T *buf, int id));
  1677.   int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
  1678. --- 53,60 ----
  1679.   void write_viminfo_bufferlist __ARGS((FILE *fp));
  1680.   char *buf_spname __ARGS((buf_T *buf));
  1681.   void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
  1682. ! linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
  1683. ! int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
  1684.   linenr_T buf_delsign __ARGS((buf_T *buf, int id));
  1685.   int buf_findsign __ARGS((buf_T *buf, int id));
  1686.   int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
  1687. *** ../vim-7.2.166/src/proto/edit.pro    2008-01-16 20:03:13.000000000 +0100
  1688. --- src/proto/edit.pro    2009-05-05 20:51:56.000000000 +0200
  1689. ***************
  1690. *** 8,14 ****
  1691.   void backspace_until_column __ARGS((int col));
  1692.   int vim_is_ctrl_x_key __ARGS((int c));
  1693.   int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
  1694. ! void set_completion __ARGS((int startcol, list_T *list));
  1695.   void ins_compl_show_pum __ARGS((void));
  1696.   char_u *find_word_start __ARGS((char_u *ptr));
  1697.   char_u *find_word_end __ARGS((char_u *ptr));
  1698. --- 8,14 ----
  1699.   void backspace_until_column __ARGS((int col));
  1700.   int vim_is_ctrl_x_key __ARGS((int c));
  1701.   int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
  1702. ! void set_completion __ARGS((colnr_T startcol, list_T *list));
  1703.   void ins_compl_show_pum __ARGS((void));
  1704.   char_u *find_word_start __ARGS((char_u *ptr));
  1705.   char_u *find_word_end __ARGS((char_u *ptr));
  1706. *** ../vim-7.2.166/src/screen.c    2009-03-18 19:07:09.000000000 +0100
  1707. --- src/screen.c    2009-05-05 17:42:45.000000000 +0200
  1708. ***************
  1709. *** 9481,9493 ****
  1710.       win_T    *wp;
  1711.       int        always;
  1712.   {
  1713. !     char_u    buffer[70];
  1714.       int        row;
  1715.       int        fillchar;
  1716.       int        attr;
  1717.       int        empty_line = FALSE;
  1718.       colnr_T    virtcol;
  1719.       int        i;
  1720.       int        o;
  1721.   #ifdef FEAT_VERTSPLIT
  1722.       int        this_ru_col;
  1723. --- 9481,9495 ----
  1724.       win_T    *wp;
  1725.       int        always;
  1726.   {
  1727. ! #define RULER_BUF_LEN 70
  1728. !     char_u    buffer[RULER_BUF_LEN];
  1729.       int        row;
  1730.       int        fillchar;
  1731.       int        attr;
  1732.       int        empty_line = FALSE;
  1733.       colnr_T    virtcol;
  1734.       int        i;
  1735. +     size_t    len;
  1736.       int        o;
  1737.   #ifdef FEAT_VERTSPLIT
  1738.       int        this_ru_col;
  1739. ***************
  1740. *** 9602,9612 ****
  1741.        * Some sprintfs return the length, some return a pointer.
  1742.        * To avoid portability problems we use strlen() here.
  1743.        */
  1744. !     sprintf((char *)buffer, "%ld,",
  1745.           (wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
  1746.               ? 0L
  1747.               : (long)(wp->w_cursor.lnum));
  1748. !     col_print(buffer + STRLEN(buffer),
  1749.               empty_line ? 0 : (int)wp->w_cursor.col + 1,
  1750.               (int)virtcol + 1);
  1751.   
  1752. --- 9604,9615 ----
  1753.        * Some sprintfs return the length, some return a pointer.
  1754.        * To avoid portability problems we use strlen() here.
  1755.        */
  1756. !     vim_snprintf((char *)buffer, RULER_BUF_LEN, "%ld,",
  1757.           (wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
  1758.               ? 0L
  1759.               : (long)(wp->w_cursor.lnum));
  1760. !     len = STRLEN(buffer);
  1761. !     col_print(buffer + len, RULER_BUF_LEN - len,
  1762.               empty_line ? 0 : (int)wp->w_cursor.col + 1,
  1763.               (int)virtcol + 1);
  1764.   
  1765. ***************
  1766. *** 9616,9622 ****
  1767.        * screen up on some terminals).
  1768.        */
  1769.       i = (int)STRLEN(buffer);
  1770. !     get_rel_pos(wp, buffer + i + 1);
  1771.       o = i + vim_strsize(buffer + i + 1);
  1772.   #ifdef FEAT_WINDOWS
  1773.       if (wp->w_status_height == 0)    /* can't use last char of screen */
  1774. --- 9619,9625 ----
  1775.        * screen up on some terminals).
  1776.        */
  1777.       i = (int)STRLEN(buffer);
  1778. !     get_rel_pos(wp, buffer + i + 1, RULER_BUF_LEN - i - 1);
  1779.       o = i + vim_strsize(buffer + i + 1);
  1780.   #ifdef FEAT_WINDOWS
  1781.       if (wp->w_status_height == 0)    /* can't use last char of screen */
  1782. ***************
  1783. *** 9643,9649 ****
  1784.               buffer[i++] = fillchar;
  1785.           ++o;
  1786.           }
  1787. !         get_rel_pos(wp, buffer + i);
  1788.       }
  1789.       /* Truncate at window boundary. */
  1790.   #ifdef FEAT_MBYTE
  1791. --- 9646,9652 ----
  1792.               buffer[i++] = fillchar;
  1793.           ++o;
  1794.           }
  1795. !         get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
  1796.       }
  1797.       /* Truncate at window boundary. */
  1798.   #ifdef FEAT_MBYTE
  1799. *** ../vim-7.2.166/src/structs.h    2008-11-15 16:05:30.000000000 +0100
  1800. --- src/structs.h    2009-05-05 18:20:36.000000000 +0200
  1801. ***************
  1802. *** 33,41 ****
  1803.   } pos_T;
  1804.   
  1805.   #ifdef FEAT_VIRTUALEDIT
  1806. ! # define INIT_POS_T {0, 0, 0}
  1807.   #else
  1808. ! # define INIT_POS_T {0, 0}
  1809.   #endif
  1810.   
  1811.   /*
  1812. --- 33,41 ----
  1813.   } pos_T;
  1814.   
  1815.   #ifdef FEAT_VIRTUALEDIT
  1816. ! # define INIT_POS_T(l, c, ca) {l, c, ca}
  1817.   #else
  1818. ! # define INIT_POS_T(l, c, ca) {l, c}
  1819.   #endif
  1820.   
  1821.   /*
  1822. ***************
  1823. *** 1166,1172 ****
  1824.       char_u    *b_fname;    /* current file name */
  1825.   
  1826.   #ifdef UNIX
  1827. !     int        b_dev;        /* device number (-1 if not set) */
  1828.       ino_t    b_ino;        /* inode number */
  1829.   #endif
  1830.   #ifdef FEAT_CW_EDITOR
  1831. --- 1166,1172 ----
  1832.       char_u    *b_fname;    /* current file name */
  1833.   
  1834.   #ifdef UNIX
  1835. !     dev_t    b_dev;        /* device number (-1 if not set) */
  1836.       ino_t    b_ino;        /* inode number */
  1837.   #endif
  1838.   #ifdef FEAT_CW_EDITOR
  1839. ***************
  1840. *** 1645,1651 ****
  1841. --- 1645,1655 ----
  1842.   #endif
  1843.   #ifdef FEAT_DIFF
  1844.       diff_T        *tp_first_diff;
  1845. + # ifdef S_SPLINT_S  /* splint doesn't understand the array of pointers */
  1846. +     buf_T        **tp_diffbuf;
  1847. + # else
  1848.       buf_T        *(tp_diffbuf[DB_COUNT]);
  1849. + # endif
  1850.       int            tp_diff_invalid;    /* list of diffs is outdated */
  1851.   #endif
  1852.       frame_T        *tp_snapshot;    /* window layout snapshot */
  1853. *** ../vim-7.2.166/src/version.c    2009-04-29 18:44:38.000000000 +0200
  1854. --- src/version.c    2009-05-13 12:06:36.000000000 +0200
  1855. ***************
  1856. *** 678,679 ****
  1857. --- 678,681 ----
  1858.   {   /* Add new patch number below this line */
  1859. + /**/
  1860. +     167,
  1861.   /**/
  1862.  
  1863. -- 
  1864. Snoring is prohibited unless all bedroom windows are closed and securely
  1865. locked.
  1866.         [real standing law in Massachusetts, United States of America]
  1867.  
  1868.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  1869. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  1870. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  1871.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  1872.