4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
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
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,
23 *** ../vim-7.2.166/Filelist 2008-09-20 16:26:10.000000000 +0200
24 --- Filelist 2009-05-05 21:45:49.000000000 +0200
37 runtime/spell/??/main.aap \
38 runtime/spell/yi/README.txt \
39 runtime/spell/main.aap \
40 - runtime/spell/cleanadd.vim \
42 - runtime/spell/fixdup \
44 # generic language files, binary
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
53 # LINT - for running lint
54 ! LINT_OPTIONS = -beprxzF
56 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
57 # Might not work with GUI or Perl.
61 # LINT - for running lint
64 ! #LINT_OPTIONS = -beprxzF
65 ! # For splint (see cleanlint.vim for filtering the output)
67 ! LINT_OPTIONS = +unixlib -weak -macrovarprefixexclude -showfunc -linelen 9999
69 # PROFILING - Uncomment the next two lines to do profiling with gcc and gprof.
70 # Might not work with GUI or Perl.
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
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
87 # maybe the "/usr/bin/cc -E" has to be adjusted for some systems
88 # This is for cproto 3.5 patchlevel 3:
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
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
104 # maybe the "/usr/bin/cc -E" has to be adjusted for some systems
105 # This is for cproto 3.5 patchlevel 3:
109 $(SNIFF_SRC) $(WORKSHOP_SRC) $(WSDEBUG_SRC) $(NETBEANS_SRC)
111 #LINT_SRC = $(ALL_SRC)
112 + #LINT_SRC = $(BASIC_SRC)
119 # Run lint. Clean up the *.ln files that are sometimes left behind.
121 ! lint $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
124 # Check dosinst.c with lint.
126 ! lint $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
129 ###########################################################################
132 # Run lint. Clean up the *.ln files that are sometimes left behind.
134 ! $(LINT) $(LINT_OPTIONS) $(LINT_CFLAGS) $(LINT_EXTRA) $(LINT_SRC)
137 # Check dosinst.c with lint.
139 ! $(LINT) $(LINT_OPTIONS) -DWIN32 -DUNIX_LINT dosinst.c
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
149 static int ti_change __ARGS((char_u *str, char_u **last));
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));
159 if (curbuf->b_kmap_state & KEYMAP_INIT)
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);
169 redraw_later(NOT_VALID);
173 if (curbuf->b_kmap_state & KEYMAP_INIT)
174 ! (void)keymap_init();
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);
183 redraw_later(NOT_VALID);
189 ! static pos_T no_position = {1, 0};
191 wip = find_wininfo(buf, FALSE);
197 ! static pos_T no_position = INIT_POS_T(1, 0, 0);
199 wip = find_wininfo(buf, FALSE);
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 */
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 */
223 if (fullname > 1) /* 2 CTRL-G: include buffer number */
225 ! sprintf((char *)buffer, "buf %d: ", curbuf->b_fnum);
226 p = buffer + STRLEN(buffer);
231 if (fullname > 1) /* 2 CTRL-G: include buffer number */
233 ! vim_snprintf((char *)buffer, IOSIZE, "buf %d: ", curbuf->b_fnum);
234 p = buffer + STRLEN(buffer);
239 (long)curbuf->b_ml.ml_line_count,
242 ! col_print(buffer + STRLEN(buffer),
243 (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
246 ! (void)append_arg_number(curwin, buffer, !shortmess(SHM_FILE), IOSIZE);
251 (long)curbuf->b_ml.ml_line_count,
254 ! len = STRLEN(buffer);
255 ! col_print(buffer + len, IOSIZE - len,
256 (int)curwin->w_cursor.col + 1, (int)curwin->w_virtcol + 1);
259 ! (void)append_arg_number(curwin, buffer, IOSIZE, !shortmess(SHM_FILE));
268 ! col_print(buf, col, vcol)
274 ! sprintf((char *)buf, "%d", col);
276 ! sprintf((char *)buf, "%d-%d", col, vcol);
279 #if defined(FEAT_TITLE) || defined(PROTO)
284 ! col_print(buf, buflen, col, vcol)
291 ! vim_snprintf((char *)buf, buflen, "%d", col);
293 ! vim_snprintf((char *)buf, buflen, "%d-%d", col, vcol);
296 #if defined(FEAT_TITLE) || defined(PROTO)
300 /* must be a help buffer */
301 vim_strncpy(buf + off, (char_u *)_("help"),
306 /* translate unprintable chars */
307 p = transstr(buf + off);
308 ! vim_strncpy(buf + off, p, IOSIZE - off - 1);
313 ! append_arg_number(curwin, buf, FALSE, IOSIZE);
315 #if defined(FEAT_CLIENTSERVER)
316 if (serverName != NULL)
319 /* must be a help buffer */
320 vim_strncpy(buf + off, (char_u *)_("help"),
321 ! (size_t)(IOSIZE - off - 1));
325 /* translate unprintable chars */
326 p = transstr(buf + off);
327 ! vim_strncpy(buf + off, p, (size_t)(IOSIZE - off - 1));
332 ! append_arg_number(curwin, buf, IOSIZE, FALSE);
334 #if defined(FEAT_CLIENTSERVER)
335 if (serverName != NULL)
338 n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
341 ! mch_memmove(t + 1, t + n, p - (t + n));
344 /* Fill up space left over by half a double-wide char. */
346 n = (long)(p - t) - item[groupitem[groupdepth]].maxwid + 1;
349 ! mch_memmove(t + 1, t + n, (size_t)(p - (t + n)));
352 /* Fill up space left over by half a double-wide char. */
357 /* fill by inserting characters */
358 ! mch_memmove(t + n - l, t, p - t);
360 if (p + l >= out + outlen)
361 l = (long)((out + outlen) - p - 1);
365 /* fill by inserting characters */
366 ! mch_memmove(t + n - l, t, (size_t)(p - t));
368 if (p + l >= out + outlen)
369 l = (long)((out + outlen) - p - 1);
375 ! sprintf((char *)tmp, "%d", curbuf->b_fnum);
376 set_internal_string_var((char_u *)"actual_curbuf", tmp);
383 ! vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum);
384 set_internal_string_var((char_u *)"actual_curbuf", tmp);
392 ! get_rel_pos(wp, str);
395 case STL_ARGLISTSTAT:
398 ! if (append_arg_number(wp, tmp, FALSE, (int)sizeof(tmp)))
406 ! get_rel_pos(wp, str, TMPLEN);
409 case STL_ARGLISTSTAT:
412 ! if (append_arg_number(wp, tmp, (int)sizeof(tmp), FALSE))
421 ! if (wp->w_cursor.col > STRLEN(linecont))
429 ! if (wp->w_cursor.col > (colnr_T)STRLEN(linecont))
438 ! *t++ = nbase == 16 ? base : (nbase == 8 ? 'o' : 'd');
441 for (n = num, l = 1; n >= nbase; n /= nbase)
446 ! *t++ = nbase == 16 ? base : (char_u)(nbase == 8 ? 'o' : 'd');
449 for (n = num, l = 1; n >= nbase; n /= nbase)
452 #if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
453 || defined(FEAT_GUI_TABLINE) || defined(PROTO)
455 ! * Get relative cursor position in window into "str[]", in the form 99%, using
456 ! * "Top", "Bot" or "All" when appropriate.
459 ! get_rel_pos(wp, str)
463 long above; /* number of lines above window */
464 long below; /* number of lines below window */
466 #if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
467 || defined(FEAT_GUI_TABLINE) || defined(PROTO)
469 ! * Get relative cursor position in window into "buf[buflen]", in the form 99%,
470 ! * using "Top", "Bot" or "All" when appropriate.
473 ! get_rel_pos(wp, buf, buflen)
478 long above; /* number of lines above window */
479 long below; /* number of lines below window */
483 below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
485 ! STRCPY(str, above == 0 ? _("All") : _("Bot"));
487 ! STRCPY(str, _("Top"));
489 ! sprintf((char *)str, "%2d%%", above > 1000000L
490 ? (int)(above / ((above + below) / 100L))
491 : (int)(above * 100L / (above + below)));
496 ! * Append (file 2 of 8) to 'buf', if editing more than one file.
497 * Return TRUE if it was appended.
500 ! append_arg_number(wp, buf, add_file, maxlen)
503 int add_file; /* Add "file" before the arg number */
504 - int maxlen; /* maximum nr of chars in buf or zero*/
508 if (ARGCOUNT <= 1) /* nothing to do */
511 ! p = buf + STRLEN(buf); /* go to the end of the buffer */
512 ! if (maxlen && p - buf + 35 >= maxlen) /* getting too long */
518 below = wp->w_buffer->b_ml.ml_line_count - wp->w_botline + 1;
520 ! vim_strncpy(buf, (char_u *)(above == 0 ? _("All") : _("Bot")),
521 ! (size_t)(buflen - 1));
523 ! vim_strncpy(buf, (char_u *)_("Top"), (size_t)(buflen - 1));
525 ! vim_snprintf((char *)buf, (size_t)buflen, "%2d%%", above > 1000000L
526 ? (int)(above / ((above + below) / 100L))
527 : (int)(above * 100L / (above + below)));
532 ! * Append (file 2 of 8) to "buf[buflen]", if editing more than one file.
533 * Return TRUE if it was appended.
536 ! append_arg_number(wp, buf, buflen, add_file)
540 int add_file; /* Add "file" before the arg number */
544 if (ARGCOUNT <= 1) /* nothing to do */
547 ! p = buf + STRLEN(buf); /* go to the end of the buffer */
548 ! if (p - buf + 35 >= buflen) /* getting too long */
557 ! sprintf((char *)p, wp->w_arg_idx_invalid ? "(%d) of %d)"
558 : "%d of %d)", wp->w_arg_idx + 1, ARGCOUNT);
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);
575 ! col = atoi((char *)tab);
576 tab = vim_strrchr(xline, '\t');
583 ! col = (colnr_T)atoi((char *)tab);
584 tab = vim_strrchr(xline, '\t');
595 if (find_viminfo_parameter('%') == NULL)
599 max_buffers = get_viminfo_parameter('%');
601 /* Allocate room for the file name, lnum and col. */
602 ! line = alloc(MAXPATHL + 40);
607 max_buffers = get_viminfo_parameter('%');
609 /* Allocate room for the file name, lnum and col. */
610 ! #define LINE_BUF_LEN (MAXPATHL + 40)
611 ! line = alloc(LINE_BUF_LEN);
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);
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);
639 buf_change_sign_type(buf, markId, typenr)
640 buf_T *buf; /* buffer to store sign in */
641 int markId; /* sign ID */
647 buf_change_sign_type(buf, markId, typenr)
648 buf_T *buf; /* buffer to store sign in */
649 int markId; /* sign ID */
659 buf_getsigntype(buf, lnum, type)
666 ! return (linenr_T)0;
670 buf_getsigntype(buf, lnum, type)
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
677 static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
680 ! static int nr2hex __ARGS((int c));
682 static int chartab_initialized = FALSE;
685 static int win_nolbr_chartabsize __ARGS((win_T *wp, char_u *s, colnr_T col, int *headp));
688 ! static unsigned nr2hex __ARGS((unsigned c));
690 static int chartab_initialized = FALSE;
696 buf[++i] = nr2hex((unsigned)c >> 4);
697 ! buf[++i] = nr2hex(c);
704 buf[++i] = nr2hex((unsigned)c >> 4);
705 ! buf[++i] = nr2hex((unsigned)c);
711 * Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
719 return (c & 0xf) + '0';
721 * Lower case letters are used to avoid the confusion of <F1> being 0xf1 or
729 return (c & 0xf) + '0';
735 ! return dbcs_class((unsigned)c >> 8, c & 0xff) >= 2;
737 return utf_class(c) >= 2;
743 ! return dbcs_class((unsigned)c >> 8, (unsigned)(c & 0xff)) >= 2;
745 return utf_class(c) >= 2;
750 numberextra = win_col_off(wp);
752 ! colmax = W_WIDTH(wp) - numberextra;
755 n = colmax + win_col_off2(wp);
758 numberextra = win_col_off(wp);
760 ! colmax = (colnr_T)(W_WIDTH(wp) - numberextra);
763 n = colmax + win_col_off2(wp);
769 ! colnr_T width1; /* width of first line (after line number) */
770 ! colnr_T width2; /* width of further lines */
772 #ifdef FEAT_VERTSPLIT
773 if (wp->w_width == 0) /* there is no border */
776 width1 = W_WIDTH(wp) - win_col_off(wp);
777 ! if (vcol < width1 - 1)
779 ! if (vcol == width1 - 1)
781 width2 = width1 + win_col_off2(wp);
782 return ((vcol - width1) % width2 == width2 - 1);
787 ! int width1; /* width of first line (after line number) */
788 ! int width2; /* width of further lines */
790 #ifdef FEAT_VERTSPLIT
791 if (wp->w_width == 0) /* there is no border */
794 width1 = W_WIDTH(wp) - win_col_off(wp);
795 ! if ((int)vcol < width1 - 1)
797 ! if ((int)vcol == width1 - 1)
799 width2 = width1 + win_col_off2(wp);
800 return ((vcol - width1) % width2 == width2 - 1);
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))
808 int c = (*mb_ptr2char)(ptr + pos->col);
810 if (c != TAB && vim_isprintc(c))
812 ! endadd = char2cells(c) - 1;
813 if (coladd > endadd) /* past end of line */
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))
822 int c = (*mb_ptr2char)(ptr + pos->col);
824 if (c != TAB && vim_isprintc(c))
826 ! endadd = (colnr_T)(char2cells(c) - 1);
827 if (coladd > endadd) /* past end of line */
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
835 + " Vim tool: Filter output of splint
837 + " Maintainer: Bram Moolenaar <Bram@vim.org>
838 + " Last Change: 2009 May 05
840 + " Usage: redirect output of "make lint" to a file, edit that file with Vim and
841 + " :call CleanLint()
842 + " This deletes irrelevant messages. What remains might be valid warnings.
845 + g/^ Types are incompatible/lockmarks d
846 + g/Assignment of dev_t to __dev_t:/lockmarks d
847 + g/Assignment of __dev_t to dev_t:/lockmarks d
848 + g/Operands of == have incompatible types (__dev_t, dev_t): /lockmarks d
849 + g/Operands of == have incompatible types (unsigned int, int): /lockmarks d
850 + g/Assignment of char to char_u: /lockmarks d
851 + g/Assignment of unsigned int to int: /lockmarks d
852 + g/Assignment of colnr_T to int: /lockmarks d
853 + g/Assignment of int to char_u: /lockmarks d
854 + g/Function .* expects arg . to be wint_t gets int: /lockmarks d
855 + g/^digraph.c.*digraphdefault.*is type char, expects char_u:/lockmarks d
856 + g/^digraph.c.*Additional initialization errors for digraphdefault not reported/lockmarks d
857 + g/Function strncasecmp expects arg 3 to be int gets size_t: /lockmarks d
858 + g/ To ignore signs in type comparisons use +ignoresigns/lockmarks d
859 + g/ To allow arbitrary integral types to match any integral type, use +matchanyintegral./lockmarks d
860 + g/ To allow arbitrary integral types to match long unsigned, use +longintegral./lockmarks d
862 *** ../vim-7.2.166/src/digraph.c 2008-06-25 00:26:41.000000000 +0200
863 --- src/digraph.c 2009-05-05 20:32:43.000000000 +0200
866 static void printdigraph __ARGS((digr_T *));
868 /* digraphs added by the user */
869 ! static garray_T user_digraphs = {0, 0, sizeof(digr_T), 10, NULL};
872 * Note: Characters marked with XX are not included literally, because some
874 static void printdigraph __ARGS((digr_T *));
876 /* digraphs added by the user */
877 ! static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
880 * Note: Characters marked with XX are not included literally, because some
887 if (char2cells(dp->result) == 1)
889 ! sprintf((char *)p, " %3d", dp->result);
897 ! *p++ = (char_u)dp->result;
898 if (char2cells(dp->result) == 1)
900 ! vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result);
906 static void keymap_unload __ARGS((void));
909 ! * Set up key mapping tables for the 'keymap' option
914 static void keymap_unload __ARGS((void));
917 ! * Set up key mapping tables for the 'keymap' option.
918 ! * Returns NULL if OK, an error message for failure. This only needs to be
919 ! * used when setting the option, not later when the value has already been
930 /* Source the keymap file. It will contain a ":loadkeymap" command
931 * which will call ex_loadkeymap() below. */
932 ! buf = alloc((unsigned)(STRLEN(curbuf->b_p_keymap)
941 /* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
942 ! sprintf((char *)buf, "keymap/%s_%s.vim", curbuf->b_p_keymap, p_enc);
943 if (source_runtime(buf, FALSE) == FAIL)
946 /* try finding "keymap/'keymap'.vim" in 'runtimepath' */
947 ! sprintf((char *)buf, "keymap/%s.vim", curbuf->b_p_keymap);
948 if (source_runtime(buf, FALSE) == FAIL)
957 /* Source the keymap file. It will contain a ":loadkeymap" command
958 * which will call ex_loadkeymap() below. */
959 ! buflen = STRLEN(curbuf->b_p_keymap)
964 ! buf = alloc((unsigned)buflen);
969 /* try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' */
970 ! vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim",
971 ! curbuf->b_p_keymap, p_enc);
972 if (source_runtime(buf, FALSE) == FAIL)
975 /* try finding "keymap/'keymap'.vim" in 'runtimepath' */
976 ! vim_snprintf((char *)buf, buflen, "keymap/%s.vim",
977 ! curbuf->b_p_keymap);
978 if (source_runtime(buf, FALSE) == FAIL)
981 *** ../vim-7.2.166/src/edit.c 2009-02-21 20:27:00.000000000 +0100
982 --- src/edit.c 2009-05-05 21:14:50.000000000 +0200
985 N_(" Keyword Local completion (^N^P)"),
988 ! static char_u e_hitend[] = N_("Hit end of paragraph");
991 * Structure used to store one match for insert completion.
993 N_(" Keyword Local completion (^N^P)"),
996 ! static char e_hitend[] = N_("Hit end of paragraph");
999 * Structure used to store one match for insert completion.
1004 char_u *cp_str; /* matched text */
1005 char cp_icase; /* TRUE or FALSE: ignore case */
1006 + #ifdef S_SPLINT_S /* splint can't handle array of pointers */
1007 + char_u **cp_text; /* text for the menu */
1009 char_u *(cp_text[CPT_COUNT]); /* text for the menu */
1011 char_u *cp_fname; /* file containing the match, allocated when
1012 * cp_flags has FREE_FNAME */
1013 int cp_flags; /* ORIGINAL_TEXT, CONT_S_IPOS or FREE_FNAME */
1020 static linenr_T o_lnum = 0;
1022 int did_backspace = TRUE; /* previous char was backspace */
1028 static linenr_T o_lnum = 0;
1030 int did_backspace = TRUE; /* previous char was backspace */
1036 ! Insstart_textlen = linetabsize(ml_get_curline());
1037 Insstart_blank_vcol = MAXCOL;
1044 ! Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
1045 Insstart_blank_vcol = MAXCOL;
1050 mincol = curwin->w_wcol;
1051 validate_cursor_col();
1053 ! if ((int)curwin->w_wcol < (int)mincol - curbuf->b_p_ts
1054 && curwin->w_wrow == W_WINROW(curwin)
1055 + curwin->w_height - 1 - p_so
1056 && (curwin->w_cursor.lnum != curwin->w_topline
1058 mincol = curwin->w_wcol;
1059 validate_cursor_col();
1061 ! if ((int)curwin->w_wcol < mincol - curbuf->b_p_ts
1062 && curwin->w_wrow == W_WINROW(curwin)
1063 + curwin->w_height - 1 - p_so
1064 && (curwin->w_cursor.lnum != curwin->w_topline
1067 * Compute the screen column where the cursor should be.
1069 vcol = get_indent() - vcol;
1070 ! curwin->w_virtcol = (vcol < 0) ? 0 : vcol;
1073 * Advance the cursor until we reach the right screen column.
1075 * Compute the screen column where the cursor should be.
1077 vcol = get_indent() - vcol;
1078 ! curwin->w_virtcol = (colnr_T)((vcol < 0) ? 0 : vcol);
1081 * Advance the cursor until we reach the right screen column.
1085 if (vcol != (int)curwin->w_virtcol)
1087 ! curwin->w_cursor.col = new_cursor_col;
1088 i = (int)curwin->w_virtcol - vcol;
1089 ! ptr = alloc(i + 1);
1092 new_cursor_col += i;
1095 if (vcol != (int)curwin->w_virtcol)
1097 ! curwin->w_cursor.col = (colnr_T)new_cursor_col;
1098 i = (int)curwin->w_virtcol - vcol;
1099 ! ptr = alloc((unsigned)(i + 1));
1102 new_cursor_col += i;
1105 if (new_cursor_col <= 0)
1106 curwin->w_cursor.col = 0;
1108 ! curwin->w_cursor.col = new_cursor_col;
1109 curwin->w_set_curswant = TRUE;
1110 changed_cline_bef_curs();
1113 if (new_cursor_col <= 0)
1114 curwin->w_cursor.col = 0;
1116 ! curwin->w_cursor.col = (colnr_T)new_cursor_col;
1117 curwin->w_set_curswant = TRUE;
1118 changed_cline_bef_curs();
1123 if (enc_utf8 && limit_col >= 0)
1125 ! int ecol = curwin->w_cursor.col + 1;
1127 /* Make sure the cursor is at the start of a character, but
1128 * skip forward again when going too far back because of a
1131 if (enc_utf8 && limit_col >= 0)
1133 ! colnr_T ecol = curwin->w_cursor.col + 1;
1135 /* Make sure the cursor is at the start of a character, but
1136 * skip forward again when going too far back because of a
1140 if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
1142 ! del_bytes((long)(ecol - curwin->w_cursor.col), FALSE, TRUE);
1148 if (*ml_get_cursor() == NUL || curwin->w_cursor.col == ecol)
1150 ! del_bytes((long)((int)ecol - curwin->w_cursor.col), FALSE, TRUE);
1156 actual_compl_length = compl_length;
1158 /* Allocate wide character array for the completion and fill it. */
1159 ! wca = (int *)alloc(actual_len * sizeof(int));
1164 actual_compl_length = compl_length;
1166 /* Allocate wide character array for the completion and fill it. */
1167 ! wca = (int *)alloc((unsigned)(actual_len * sizeof(int)));
1175 set_completion(startcol, list)
1179 /* If already doing completions stop it. */
1183 set_completion(startcol, list)
1187 /* If already doing completions stop it. */
1190 if (stop_arrow() == FAIL)
1193 ! if (startcol > (int)curwin->w_cursor.col)
1194 startcol = curwin->w_cursor.col;
1195 compl_col = startcol;
1196 ! compl_length = curwin->w_cursor.col - startcol;
1197 /* compl_pattern doesn't need to be set */
1198 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
1199 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
1201 if (stop_arrow() == FAIL)
1204 ! if (startcol > curwin->w_cursor.col)
1205 startcol = curwin->w_cursor.col;
1206 compl_col = startcol;
1207 ! compl_length = (int)curwin->w_cursor.col - (int)startcol;
1208 /* compl_pattern doesn't need to be set */
1209 compl_orig_text = vim_strnsave(ml_get_curline() + compl_col, compl_length);
1210 if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
1213 regmatch_T regmatch;
1218 int dir = compl_direction;
1223 if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
1225 char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
1227 if (pat_esc == NULL)
1229 ! i = (int)STRLEN(pat_esc) + 10;
1236 ! vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc);
1237 regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
1241 if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
1243 char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\");
1246 if (pat_esc == NULL)
1248 ! len = STRLEN(pat_esc) + 10;
1249 ! ptr = alloc((unsigned)len);
1255 ! vim_snprintf((char *)ptr, len, "^\\s*\\zs\\V%s", pat_esc);
1256 regmatch.regprog = vim_regcomp(ptr, RE_MAGIC);
1262 vim_snprintf((char *)IObuff, IOSIZE,
1263 _("Scanning dictionary: %s"), (char *)files[i]);
1264 ! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1270 vim_snprintf((char *)IObuff, IOSIZE,
1271 _("Scanning dictionary: %s"), (char *)files[i]);
1272 ! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1281 ! int off = curwin->w_cursor.col - compl_col;
1289 ! int off = (int)curwin->w_cursor.col - (int)compl_col;
1296 vim_free(compl_leader);
1297 compl_leader = vim_strnsave(ml_get_curline() + compl_col,
1298 ! curwin->w_cursor.col - compl_col);
1299 if (compl_leader != NULL)
1300 ins_compl_new_leader();
1304 vim_free(compl_leader);
1305 compl_leader = vim_strnsave(ml_get_curline() + compl_col,
1306 ! (int)(curwin->w_cursor.col - compl_col));
1307 if (compl_leader != NULL)
1308 ins_compl_new_leader();
1312 ins_compl_addfrommatch()
1315 ! int len = curwin->w_cursor.col - compl_col;
1320 ins_compl_addfrommatch()
1323 ! int len = (int)curwin->w_cursor.col - (int)compl_col;
1329 : ins_buf->b_sfname == NULL
1330 ? (char *)ins_buf->b_fname
1331 : (char *)ins_buf->b_sfname);
1332 ! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1334 else if (*e_cpt == NUL)
1337 : ins_buf->b_sfname == NULL
1338 ? (char *)ins_buf->b_fname
1339 : (char *)ins_buf->b_sfname);
1340 ! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1342 else if (*e_cpt == NUL)
1348 sprintf((char*)IObuff, _("Scanning tags."));
1349 ! msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1356 sprintf((char*)IObuff, _("Scanning tags."));
1357 ! (void)msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
1363 ins_need_undo = FALSE;
1365 Insstart = curwin->w_cursor; /* new insertion starts here */
1366 ! Insstart_textlen = linetabsize(ml_get_curline());
1368 #ifdef FEAT_VREPLACE
1369 if (State & VREPLACE_FLAG)
1371 ins_need_undo = FALSE;
1373 Insstart = curwin->w_cursor; /* new insertion starts here */
1374 ! Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
1376 #ifdef FEAT_VREPLACE
1377 if (State & VREPLACE_FLAG)
1378 *** ../vim-7.2.166/src/ex_cmds.c 2009-04-29 18:44:38.000000000 +0200
1379 --- src/ex_cmds.c 2009-05-05 17:55:40.000000000 +0200
1382 * overwrite a user's viminfo file after a "su root", with a
1383 * viminfo file that the user can't read.
1385 ! st_old.st_dev = 0;
1387 st_old.st_mode = 0600;
1388 if (mch_stat((char *)fname, &st_old) == 0
1390 * overwrite a user's viminfo file after a "su root", with a
1391 * viminfo file that the user can't read.
1393 ! st_old.st_dev = (dev_t)0;
1395 st_old.st_mode = 0600;
1396 if (mch_stat((char *)fname, &st_old) == 0
1399 /* If the window options were changed may need to set the spell language.
1400 * Can only do this after the buffer has been properly setup. */
1401 if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
1402 ! did_set_spelllang(curbuf);
1405 if (command == NULL)
1407 /* If the window options were changed may need to set the spell language.
1408 * Can only do this after the buffer has been properly setup. */
1409 if (did_get_winopts && curwin->w_p_spell && *curbuf->b_p_spl != NUL)
1410 ! (void)did_set_spelllang(curbuf);
1413 if (command == NULL)
1418 if (curbuf->b_kmap_state & KEYMAP_INIT)
1422 --RedrawingDisabled;
1426 if (curbuf->b_kmap_state & KEYMAP_INIT)
1427 ! (void)keymap_init();
1430 --RedrawingDisabled;
1431 *** ../vim-7.2.166/src/globals.h 2009-03-05 03:13:51.000000000 +0100
1432 --- src/globals.h 2009-05-09 21:14:49.000000000 +0200
1435 EXTERN win_T *prevwin INIT(= NULL); /* previous window */
1436 # define W_NEXT(wp) ((wp)->w_next)
1437 # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
1438 ! #define FOR_ALL_TAB_WINDOWS(tp, wp) \
1439 for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
1440 for ((wp) = ((tp) == curtab) \
1441 ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
1443 EXTERN win_T *prevwin INIT(= NULL); /* previous window */
1444 # define W_NEXT(wp) ((wp)->w_next)
1445 # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
1446 ! # define FOR_ALL_TAB_WINDOWS(tp, wp) \
1447 for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
1448 for ((wp) = ((tp) == curtab) \
1449 ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
1453 EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
1461 EXTERN pos_T saved_cursor /* w_cursor before formatting text. */
1463 ! = INIT_POS_T(0, 0, 0)
1469 EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
1470 EXTERN pos_T last_cursormoved /* for CursorMoved event */
1477 EXTERN int did_cursorhold INIT(= FALSE); /* set when CursorHold t'gerd */
1478 EXTERN pos_T last_cursormoved /* for CursorMoved event */
1480 ! = INIT_POS_T(0, 0, 0)
1484 *** ../vim-7.2.166/src/ops.c 2009-04-29 17:39:17.000000000 +0200
1485 --- src/ops.c 2009-05-13 12:41:02.000000000 +0200
1489 getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
1491 ! sprintf((char *)buf1, _("%ld Cols; "),
1492 (long)(oparg.end_vcol - oparg.start_vcol + 1));
1497 getvcols(curwin, &min_pos, &max_pos, &min_pos.col,
1499 ! vim_snprintf((char *)buf1, sizeof(buf1), _("%ld Cols; "),
1500 (long)(oparg.end_vcol - oparg.start_vcol + 1));
1506 if (char_count_cursor == byte_count_cursor
1507 && char_count == byte_count)
1508 ! sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
1509 buf1, line_count_selected,
1510 (long)curbuf->b_ml.ml_line_count,
1511 word_count_cursor, word_count,
1512 byte_count_cursor, byte_count);
1514 ! sprintf((char *)IObuff, _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
1515 buf1, line_count_selected,
1516 (long)curbuf->b_ml.ml_line_count,
1517 word_count_cursor, word_count,
1520 if (char_count_cursor == byte_count_cursor
1521 && char_count == byte_count)
1522 ! vim_snprintf((char *)IObuff, IOSIZE,
1523 ! _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Bytes"),
1524 buf1, line_count_selected,
1525 (long)curbuf->b_ml.ml_line_count,
1526 word_count_cursor, word_count,
1527 byte_count_cursor, byte_count);
1529 ! vim_snprintf((char *)IObuff, IOSIZE,
1530 ! _("Selected %s%ld of %ld Lines; %ld of %ld Words; %ld of %ld Chars; %ld of %ld Bytes"),
1531 buf1, line_count_selected,
1532 (long)curbuf->b_ml.ml_line_count,
1533 word_count_cursor, word_count,
1537 p = ml_get_curline();
1539 ! col_print(buf1, (int)curwin->w_cursor.col + 1,
1540 (int)curwin->w_virtcol + 1);
1541 ! col_print(buf2, (int)STRLEN(p), linetabsize(p));
1543 if (char_count_cursor == byte_count_cursor
1544 && char_count == byte_count)
1545 ! sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
1546 (char *)buf1, (char *)buf2,
1547 (long)curwin->w_cursor.lnum,
1548 (long)curbuf->b_ml.ml_line_count,
1549 word_count_cursor, word_count,
1550 byte_count_cursor, byte_count);
1552 ! sprintf((char *)IObuff, _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
1553 (char *)buf1, (char *)buf2,
1554 (long)curwin->w_cursor.lnum,
1555 (long)curbuf->b_ml.ml_line_count,
1558 p = ml_get_curline();
1560 ! col_print(buf1, sizeof(buf1), (int)curwin->w_cursor.col + 1,
1561 (int)curwin->w_virtcol + 1);
1562 ! col_print(buf2, sizeof(buf2), (int)STRLEN(p), linetabsize(p));
1564 if (char_count_cursor == byte_count_cursor
1565 && char_count == byte_count)
1566 ! vim_snprintf((char *)IObuff, IOSIZE,
1567 ! _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Byte %ld of %ld"),
1568 (char *)buf1, (char *)buf2,
1569 (long)curwin->w_cursor.lnum,
1570 (long)curbuf->b_ml.ml_line_count,
1571 word_count_cursor, word_count,
1572 byte_count_cursor, byte_count);
1574 ! vim_snprintf((char *)IObuff, IOSIZE,
1575 ! _("Col %s of %s; Line %ld of %ld; Word %ld of %ld; Char %ld of %ld; Byte %ld of %ld"),
1576 (char *)buf1, (char *)buf2,
1577 (long)curwin->w_cursor.lnum,
1578 (long)curbuf->b_ml.ml_line_count,
1579 *** ../vim-7.2.166/src/os_unix.c 2009-03-02 02:44:54.000000000 +0100
1580 --- src/os_unix.c 2009-05-05 17:35:58.000000000 +0200
1586 ! # define SIG_ERR ((RETSIGTYPE (*)())-1)
1589 /* volatile because it is used in signal handler sig_winch(). */
1594 ! # ifndef S_SPLINT_S
1595 ! # define SIG_ERR ((RETSIGTYPE (*)())-1)
1599 /* volatile because it is used in signal handler sig_winch(). */
1603 #if defined(HAVE_TOTAL_MEM) || defined(PROTO)
1604 # ifdef HAVE_SYS_RESOURCE_H
1605 ! # include <sys/resource.h>
1607 # if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
1608 # include <sys/sysctl.h>
1611 #if defined(HAVE_TOTAL_MEM) || defined(PROTO)
1612 # ifdef HAVE_SYS_RESOURCE_H
1613 ! # ifndef S_SPLINT_S /* splint crashes on bits/resource.h */
1614 ! # include <sys/resource.h>
1617 # if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTL)
1618 # include <sys/sysctl.h>
1619 *** ../vim-7.2.166/src/os_unix.h 2008-06-20 18:06:36.000000000 +0200
1620 --- src/os_unix.h 2009-05-05 17:07:45.000000000 +0200
1625 #ifdef HAVE_UNISTD_H
1626 ! # include <unistd.h>
1633 #ifdef HAVE_UNISTD_H
1634 ! # ifndef S_SPLINT_S /* splint crashes on bits/confname.h */
1635 ! # include <unistd.h>
1640 *** ../vim-7.2.166/src/proto/buffer.pro 2008-11-15 14:10:23.000000000 +0100
1641 --- src/proto/buffer.pro 2009-05-13 12:23:41.000000000 +0200
1644 int otherfile __ARGS((char_u *ffname));
1645 void buf_setino __ARGS((buf_T *buf));
1646 void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
1647 ! void col_print __ARGS((char_u *buf, int col, int vcol));
1648 void maketitle __ARGS((void));
1649 void resettitle __ARGS((void));
1650 void free_titles __ARGS((void));
1651 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));
1652 ! void get_rel_pos __ARGS((win_T *wp, char_u *str));
1653 ! int append_arg_number __ARGS((win_T *wp, char_u *buf, int add_file, int maxlen));
1654 char_u *fix_fname __ARGS((char_u *fname));
1655 void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
1656 char_u *alist_name __ARGS((aentry_T *aep));
1658 int otherfile __ARGS((char_u *ffname));
1659 void buf_setino __ARGS((buf_T *buf));
1660 void fileinfo __ARGS((int fullname, int shorthelp, int dont_truncate));
1661 ! void col_print __ARGS((char_u *buf, size_t buflen, int col, int vcol));
1662 void maketitle __ARGS((void));
1663 void resettitle __ARGS((void));
1664 void free_titles __ARGS((void));
1665 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));
1666 ! void get_rel_pos __ARGS((win_T *wp, char_u *buf, int buflen));
1667 char_u *fix_fname __ARGS((char_u *fname));
1668 void fname_expand __ARGS((buf_T *buf, char_u **ffname, char_u **sfname));
1669 char_u *alist_name __ARGS((aentry_T *aep));
1672 void write_viminfo_bufferlist __ARGS((FILE *fp));
1673 char *buf_spname __ARGS((buf_T *buf));
1674 void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
1675 ! int buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
1676 ! int_u buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
1677 linenr_T buf_delsign __ARGS((buf_T *buf, int id));
1678 int buf_findsign __ARGS((buf_T *buf, int id));
1679 int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
1681 void write_viminfo_bufferlist __ARGS((FILE *fp));
1682 char *buf_spname __ARGS((buf_T *buf));
1683 void buf_addsign __ARGS((buf_T *buf, int id, linenr_T lnum, int typenr));
1684 ! linenr_T buf_change_sign_type __ARGS((buf_T *buf, int markId, int typenr));
1685 ! int buf_getsigntype __ARGS((buf_T *buf, linenr_T lnum, int type));
1686 linenr_T buf_delsign __ARGS((buf_T *buf, int id));
1687 int buf_findsign __ARGS((buf_T *buf, int id));
1688 int buf_findsign_id __ARGS((buf_T *buf, linenr_T lnum));
1689 *** ../vim-7.2.166/src/proto/edit.pro 2008-01-16 20:03:13.000000000 +0100
1690 --- src/proto/edit.pro 2009-05-05 20:51:56.000000000 +0200
1693 void backspace_until_column __ARGS((int col));
1694 int vim_is_ctrl_x_key __ARGS((int c));
1695 int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
1696 ! void set_completion __ARGS((int startcol, list_T *list));
1697 void ins_compl_show_pum __ARGS((void));
1698 char_u *find_word_start __ARGS((char_u *ptr));
1699 char_u *find_word_end __ARGS((char_u *ptr));
1701 void backspace_until_column __ARGS((int col));
1702 int vim_is_ctrl_x_key __ARGS((int c));
1703 int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
1704 ! void set_completion __ARGS((colnr_T startcol, list_T *list));
1705 void ins_compl_show_pum __ARGS((void));
1706 char_u *find_word_start __ARGS((char_u *ptr));
1707 char_u *find_word_end __ARGS((char_u *ptr));
1708 *** ../vim-7.2.166/src/screen.c 2009-03-18 19:07:09.000000000 +0100
1709 --- src/screen.c 2009-05-05 17:42:45.000000000 +0200
1715 ! char_u buffer[70];
1719 int empty_line = FALSE;
1723 #ifdef FEAT_VERTSPLIT
1729 ! #define RULER_BUF_LEN 70
1730 ! char_u buffer[RULER_BUF_LEN];
1734 int empty_line = FALSE;
1739 #ifdef FEAT_VERTSPLIT
1743 * Some sprintfs return the length, some return a pointer.
1744 * To avoid portability problems we use strlen() here.
1746 ! sprintf((char *)buffer, "%ld,",
1747 (wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
1749 : (long)(wp->w_cursor.lnum));
1750 ! col_print(buffer + STRLEN(buffer),
1751 empty_line ? 0 : (int)wp->w_cursor.col + 1,
1755 * Some sprintfs return the length, some return a pointer.
1756 * To avoid portability problems we use strlen() here.
1758 ! vim_snprintf((char *)buffer, RULER_BUF_LEN, "%ld,",
1759 (wp->w_buffer->b_ml.ml_flags & ML_EMPTY)
1761 : (long)(wp->w_cursor.lnum));
1762 ! len = STRLEN(buffer);
1763 ! col_print(buffer + len, RULER_BUF_LEN - len,
1764 empty_line ? 0 : (int)wp->w_cursor.col + 1,
1769 * screen up on some terminals).
1771 i = (int)STRLEN(buffer);
1772 ! get_rel_pos(wp, buffer + i + 1);
1773 o = i + vim_strsize(buffer + i + 1);
1775 if (wp->w_status_height == 0) /* can't use last char of screen */
1777 * screen up on some terminals).
1779 i = (int)STRLEN(buffer);
1780 ! get_rel_pos(wp, buffer + i + 1, RULER_BUF_LEN - i - 1);
1781 o = i + vim_strsize(buffer + i + 1);
1783 if (wp->w_status_height == 0) /* can't use last char of screen */
1786 buffer[i++] = fillchar;
1789 ! get_rel_pos(wp, buffer + i);
1791 /* Truncate at window boundary. */
1794 buffer[i++] = fillchar;
1797 ! get_rel_pos(wp, buffer + i, RULER_BUF_LEN - i);
1799 /* Truncate at window boundary. */
1801 *** ../vim-7.2.166/src/structs.h 2008-11-15 16:05:30.000000000 +0100
1802 --- src/structs.h 2009-05-05 18:20:36.000000000 +0200
1807 #ifdef FEAT_VIRTUALEDIT
1808 ! # define INIT_POS_T {0, 0, 0}
1810 ! # define INIT_POS_T {0, 0}
1817 #ifdef FEAT_VIRTUALEDIT
1818 ! # define INIT_POS_T(l, c, ca) {l, c, ca}
1820 ! # define INIT_POS_T(l, c, ca) {l, c}
1826 char_u *b_fname; /* current file name */
1829 ! int b_dev; /* device number (-1 if not set) */
1830 ino_t b_ino; /* inode number */
1832 #ifdef FEAT_CW_EDITOR
1834 char_u *b_fname; /* current file name */
1837 ! dev_t b_dev; /* device number (-1 if not set) */
1838 ino_t b_ino; /* inode number */
1840 #ifdef FEAT_CW_EDITOR
1846 diff_T *tp_first_diff;
1847 + # ifdef S_SPLINT_S /* splint doesn't understand the array of pointers */
1848 + buf_T **tp_diffbuf;
1850 buf_T *(tp_diffbuf[DB_COUNT]);
1852 int tp_diff_invalid; /* list of diffs is outdated */
1854 frame_T *tp_snapshot; /* window layout snapshot */
1855 *** ../vim-7.2.166/src/version.c 2009-04-29 18:44:38.000000000 +0200
1856 --- src/version.c 2009-05-13 12:06:36.000000000 +0200
1860 { /* Add new patch number below this line */
1866 Snoring is prohibited unless all bedroom windows are closed and securely
1868 [real standing law in Massachusetts, United States of America]
1870 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
1871 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
1872 \\\ download, build and distribute -- http://www.A-A-P.org ///
1873 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///