|
Karsten Hopp |
3efd19 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
3efd19 |
Subject: Patch 7.3.160
|
|
Karsten Hopp |
3efd19 |
Fcc: outbox
|
|
Karsten Hopp |
3efd19 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
3efd19 |
Mime-Version: 1.0
|
|
Karsten Hopp |
3efd19 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
3efd19 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
3efd19 |
------------
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
Patch 7.3.160
|
|
Karsten Hopp |
3efd19 |
Problem: Unsafe string copying.
|
|
Karsten Hopp |
3efd19 |
Solution: Use vim_strncpy() instead of strcpy(). Use vim_strcat() instead
|
|
Karsten Hopp |
3efd19 |
of strcat().
|
|
Karsten Hopp |
3efd19 |
Files: src/buffer.c, src/ex_docmd.c, src/hardcopy.c, src/menu.c,
|
|
Karsten Hopp |
3efd19 |
src/misc1.c, src/misc2.c, src/proto/misc2.pro, src/netbeans.c,
|
|
Karsten Hopp |
3efd19 |
src/os_unix.c, src/spell.c, src/syntax.c, src/tag.c
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/buffer.c 2011-02-15 14:24:42.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/buffer.c 2011-04-11 16:08:38.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 3176,3182 ****
|
|
Karsten Hopp |
3efd19 |
/* format: "fname + (path) (1 of 2) - VIM" */
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
if (curbuf->b_fname == NULL)
|
|
Karsten Hopp |
3efd19 |
! STRCPY(buf, _("[No Name]"));
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
p = transstr(gettail(curbuf->b_fname));
|
|
Karsten Hopp |
3efd19 |
--- 3176,3182 ----
|
|
Karsten Hopp |
3efd19 |
/* format: "fname + (path) (1 of 2) - VIM" */
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
if (curbuf->b_fname == NULL)
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(buf, (char_u *)_("[No Name]"), IOSIZE - 100);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
p = transstr(gettail(curbuf->b_fname));
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 3232,3238 ****
|
|
Karsten Hopp |
3efd19 |
if (serverName != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
STRCAT(buf, " - ");
|
|
Karsten Hopp |
3efd19 |
! STRCAT(buf, serverName);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
#endif
|
|
Karsten Hopp |
3efd19 |
--- 3232,3238 ----
|
|
Karsten Hopp |
3efd19 |
if (serverName != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
STRCAT(buf, " - ");
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(buf, serverName, IOSIZE);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
#endif
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/ex_docmd.c 2011-03-03 15:54:45.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/ex_docmd.c 2011-04-11 15:43:48.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 5096,5102 ****
|
|
Karsten Hopp |
3efd19 |
char_u buff[IOSIZE];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
if (n == 1)
|
|
Karsten Hopp |
3efd19 |
! STRCPY(buff, _("1 more file to edit. Quit anyway?"));
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
vim_snprintf((char *)buff, IOSIZE,
|
|
Karsten Hopp |
3efd19 |
_("%d more files to edit. Quit anyway?"), n);
|
|
Karsten Hopp |
3efd19 |
--- 5096,5104 ----
|
|
Karsten Hopp |
3efd19 |
char_u buff[IOSIZE];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
if (n == 1)
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(buff,
|
|
Karsten Hopp |
3efd19 |
! (char_u *)_("1 more file to edit. Quit anyway?"),
|
|
Karsten Hopp |
3efd19 |
! IOSIZE - 1);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
vim_snprintf((char *)buff, IOSIZE,
|
|
Karsten Hopp |
3efd19 |
_("%d more files to edit. Quit anyway?"), n);
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/hardcopy.c 2010-08-15 21:57:25.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/hardcopy.c 2011-04-11 15:30:09.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 1761,1772 ****
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
char_u buffer[MAXPATHL + 1];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! STRCPY(resource->name, name);
|
|
Karsten Hopp |
3efd19 |
/* Look for named resource file in runtimepath */
|
|
Karsten Hopp |
3efd19 |
STRCPY(buffer, "print");
|
|
Karsten Hopp |
3efd19 |
add_pathsep(buffer);
|
|
Karsten Hopp |
3efd19 |
! STRCAT(buffer, name);
|
|
Karsten Hopp |
3efd19 |
! STRCAT(buffer, ".ps");
|
|
Karsten Hopp |
3efd19 |
resource->filename[0] = NUL;
|
|
Karsten Hopp |
3efd19 |
return (do_in_runtimepath(buffer, FALSE, prt_resource_name,
|
|
Karsten Hopp |
3efd19 |
resource->filename)
|
|
Karsten Hopp |
3efd19 |
--- 1761,1772 ----
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
char_u buffer[MAXPATHL + 1];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(resource->name, (char_u *)name, 63);
|
|
Karsten Hopp |
3efd19 |
/* Look for named resource file in runtimepath */
|
|
Karsten Hopp |
3efd19 |
STRCPY(buffer, "print");
|
|
Karsten Hopp |
3efd19 |
add_pathsep(buffer);
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(buffer, (char_u *)name, MAXPATHL);
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(buffer, (char_u *)".ps", MAXPATHL);
|
|
Karsten Hopp |
3efd19 |
resource->filename[0] = NUL;
|
|
Karsten Hopp |
3efd19 |
return (do_in_runtimepath(buffer, FALSE, prt_resource_name,
|
|
Karsten Hopp |
3efd19 |
resource->filename)
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/menu.c 2011-01-04 17:49:25.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/menu.c 2011-04-11 15:17:21.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 1394,1400 ****
|
|
Karsten Hopp |
3efd19 |
int idx;
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
static vimmenu_T *menu = NULL;
|
|
Karsten Hopp |
3efd19 |
! static char_u tbuffer[256]; /*hack*/
|
|
Karsten Hopp |
3efd19 |
char_u *str;
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
static int should_advance = FALSE;
|
|
Karsten Hopp |
3efd19 |
--- 1394,1401 ----
|
|
Karsten Hopp |
3efd19 |
int idx;
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
static vimmenu_T *menu = NULL;
|
|
Karsten Hopp |
3efd19 |
! #define TBUFFER_LEN 256
|
|
Karsten Hopp |
3efd19 |
! static char_u tbuffer[TBUFFER_LEN]; /*hack*/
|
|
Karsten Hopp |
3efd19 |
char_u *str;
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
static int should_advance = FALSE;
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 1428,1438 ****
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
if (should_advance)
|
|
Karsten Hopp |
3efd19 |
! STRCPY(tbuffer, menu->en_dname);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
#endif
|
|
Karsten Hopp |
3efd19 |
! STRCPY(tbuffer, menu->dname);
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
if (menu->en_dname == NULL)
|
|
Karsten Hopp |
3efd19 |
should_advance = TRUE;
|
|
Karsten Hopp |
3efd19 |
--- 1429,1439 ----
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
if (should_advance)
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
#endif
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2);
|
|
Karsten Hopp |
3efd19 |
#ifdef FEAT_MULTI_LANG
|
|
Karsten Hopp |
3efd19 |
if (menu->en_dname == NULL)
|
|
Karsten Hopp |
3efd19 |
should_advance = TRUE;
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/misc1.c 2011-04-11 14:27:34.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/misc1.c 2011-04-11 16:03:22.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 3332,3350 ****
|
|
Karsten Hopp |
3efd19 |
if (pn == 1)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (n > 0)
|
|
Karsten Hopp |
3efd19 |
! STRCPY(msg_buf, _("1 more line"));
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! STRCPY(msg_buf, _("1 line less"));
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (n > 0)
|
|
Karsten Hopp |
3efd19 |
! sprintf((char *)msg_buf, _("%ld more lines"), pn);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! sprintf((char *)msg_buf, _("%ld fewer lines"), pn);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
if (got_int)
|
|
Karsten Hopp |
3efd19 |
! STRCAT(msg_buf, _(" (Interrupted)"));
|
|
Karsten Hopp |
3efd19 |
if (msg(msg_buf))
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
set_keep_msg(msg_buf, 0);
|
|
Karsten Hopp |
3efd19 |
--- 3332,3354 ----
|
|
Karsten Hopp |
3efd19 |
if (pn == 1)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (n > 0)
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(msg_buf, (char_u *)_("1 more line"),
|
|
Karsten Hopp |
3efd19 |
! MSG_BUF_LEN - 1);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(msg_buf, (char_u *)_("1 line less"),
|
|
Karsten Hopp |
3efd19 |
! MSG_BUF_LEN - 1);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (n > 0)
|
|
Karsten Hopp |
3efd19 |
! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
|
|
Karsten Hopp |
3efd19 |
! _("%ld more lines"), pn);
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
|
|
Karsten Hopp |
3efd19 |
! _("%ld fewer lines"), pn);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
if (got_int)
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(msg_buf, (char_u *)_(" (Interrupted)"), MSG_BUF_LEN);
|
|
Karsten Hopp |
3efd19 |
if (msg(msg_buf))
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
set_keep_msg(msg_buf, 0);
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/misc2.c 2010-12-08 13:11:15.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/misc2.c 2011-04-11 15:30:20.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 1647,1652 ****
|
|
Karsten Hopp |
3efd19 |
--- 1647,1674 ----
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/*
|
|
Karsten Hopp |
3efd19 |
+ * Like strcat(), but make sure the result fits in "tosize" bytes and is
|
|
Karsten Hopp |
3efd19 |
+ * always NUL terminated.
|
|
Karsten Hopp |
3efd19 |
+ */
|
|
Karsten Hopp |
3efd19 |
+ void
|
|
Karsten Hopp |
3efd19 |
+ vim_strcat(to, from, tosize)
|
|
Karsten Hopp |
3efd19 |
+ char_u *to;
|
|
Karsten Hopp |
3efd19 |
+ char_u *from;
|
|
Karsten Hopp |
3efd19 |
+ size_t tosize;
|
|
Karsten Hopp |
3efd19 |
+ {
|
|
Karsten Hopp |
3efd19 |
+ size_t tolen = STRLEN(to);
|
|
Karsten Hopp |
3efd19 |
+ size_t fromlen = STRLEN(from);
|
|
Karsten Hopp |
3efd19 |
+
|
|
Karsten Hopp |
3efd19 |
+ if (tolen + fromlen + 1 > tosize)
|
|
Karsten Hopp |
3efd19 |
+ {
|
|
Karsten Hopp |
3efd19 |
+ mch_memmove(to + tolen, from, tosize - tolen - 1);
|
|
Karsten Hopp |
3efd19 |
+ to[tosize - 1] = NUL;
|
|
Karsten Hopp |
3efd19 |
+ }
|
|
Karsten Hopp |
3efd19 |
+ else
|
|
Karsten Hopp |
3efd19 |
+ STRCPY(to + tolen, from);
|
|
Karsten Hopp |
3efd19 |
+ }
|
|
Karsten Hopp |
3efd19 |
+
|
|
Karsten Hopp |
3efd19 |
+ /*
|
|
Karsten Hopp |
3efd19 |
* Isolate one part of a string option where parts are separated with
|
|
Karsten Hopp |
3efd19 |
* "sep_chars".
|
|
Karsten Hopp |
3efd19 |
* The part is copied into "buf[maxlen]".
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/proto/misc2.pro 2010-08-15 21:57:28.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/proto/misc2.pro 2011-04-11 15:29:55.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 40,45 ****
|
|
Karsten Hopp |
3efd19 |
--- 40,46 ----
|
|
Karsten Hopp |
3efd19 |
void copy_chars __ARGS((char_u *ptr, size_t count, int c));
|
|
Karsten Hopp |
3efd19 |
void del_trailing_spaces __ARGS((char_u *ptr));
|
|
Karsten Hopp |
3efd19 |
void vim_strncpy __ARGS((char_u *to, char_u *from, size_t len));
|
|
Karsten Hopp |
3efd19 |
+ void vim_strcat __ARGS((char_u *to, char_u *from, size_t tosize));
|
|
Karsten Hopp |
3efd19 |
int copy_option_part __ARGS((char_u **option, char_u *buf, int maxlen, char *sep_chars));
|
|
Karsten Hopp |
3efd19 |
void vim_free __ARGS((void *x));
|
|
Karsten Hopp |
3efd19 |
int vim_stricmp __ARGS((char *s1, char *s2));
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/netbeans.c 2011-04-01 15:33:54.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/netbeans.c 2011-04-11 16:02:51.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 3914,3927 ****
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
! char_u ebuf[BUFSIZ];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! STRCPY(ebuf, (char_u *)_("E505: "));
|
|
Karsten Hopp |
3efd19 |
! STRCAT(ebuf, IObuff);
|
|
Karsten Hopp |
3efd19 |
! STRCAT(ebuf, (char_u *)_("is read-only (add ! to override)"));
|
|
Karsten Hopp |
3efd19 |
! STRCPY(IObuff, ebuf);
|
|
Karsten Hopp |
3efd19 |
! nbdebug((" %s\n", ebuf ));
|
|
Karsten Hopp |
3efd19 |
! emsg(IObuff);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
--- 3914,3925 ----
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
! char_u msgbuf[IOSIZE];
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! vim_snprintf((char *)msgbuf, IOSIZE,
|
|
Karsten Hopp |
3efd19 |
! _("E505: %s is read-only (add ! to override)"), IObuff);
|
|
Karsten Hopp |
3efd19 |
! nbdebug((" %s\n", msgbuf));
|
|
Karsten Hopp |
3efd19 |
! emsg(msgbuf);
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/os_unix.c 2011-02-15 17:39:14.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/os_unix.c 2011-04-11 16:39:11.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 5725,5730 ****
|
|
Karsten Hopp |
3efd19 |
--- 5725,5731 ----
|
|
Karsten Hopp |
3efd19 |
if (shell_style == STYLE_PRINT && !did_find_nul)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* If there is a NUL, set did_find_nul, else set check_spaces */
|
|
Karsten Hopp |
3efd19 |
+ buffer[len] = NUL;
|
|
Karsten Hopp |
3efd19 |
if (len && (int)STRLEN(buffer) < (int)len - 1)
|
|
Karsten Hopp |
3efd19 |
did_find_nul = TRUE;
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 6594,6600 ****
|
|
Karsten Hopp |
3efd19 |
xterm_hints.x = 2;
|
|
Karsten Hopp |
3efd19 |
return TRUE;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
! if (mouse_code == NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
xterm_trace = 0;
|
|
Karsten Hopp |
3efd19 |
return FALSE;
|
|
Karsten Hopp |
3efd19 |
--- 6595,6601 ----
|
|
Karsten Hopp |
3efd19 |
xterm_hints.x = 2;
|
|
Karsten Hopp |
3efd19 |
return TRUE;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
! if (mouse_code == NULL || STRLEN(mouse_code) > 45)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
xterm_trace = 0;
|
|
Karsten Hopp |
3efd19 |
return FALSE;
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/spell.c 2011-02-01 13:59:44.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/spell.c 2011-04-11 15:50:40.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 6957,6963 ****
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_add == NULL)
|
|
Karsten Hopp |
3efd19 |
*newword = NUL;
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! STRCPY(newword, ae->ae_add);
|
|
Karsten Hopp |
3efd19 |
p = word;
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_chop != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
--- 6957,6963 ----
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_add == NULL)
|
|
Karsten Hopp |
3efd19 |
*newword = NUL;
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(newword, ae->ae_add, MAXWLEN - 1);
|
|
Karsten Hopp |
3efd19 |
p = word;
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_chop != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 6978,6984 ****
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* suffix: chop/add at the end of the word */
|
|
Karsten Hopp |
3efd19 |
! STRCPY(newword, word);
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_chop != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Remove chop string. */
|
|
Karsten Hopp |
3efd19 |
--- 6978,6984 ----
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* suffix: chop/add at the end of the word */
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(newword, word, MAXWLEN - 1);
|
|
Karsten Hopp |
3efd19 |
if (ae->ae_chop != NULL)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Remove chop string. */
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 8654,8660 ****
|
|
Karsten Hopp |
3efd19 |
* Write the .sug file.
|
|
Karsten Hopp |
3efd19 |
* Make the file name by changing ".spl" to ".sug".
|
|
Karsten Hopp |
3efd19 |
*/
|
|
Karsten Hopp |
3efd19 |
! STRCPY(fname, wfname);
|
|
Karsten Hopp |
3efd19 |
len = (int)STRLEN(fname);
|
|
Karsten Hopp |
3efd19 |
fname[len - 2] = 'u';
|
|
Karsten Hopp |
3efd19 |
fname[len - 1] = 'g';
|
|
Karsten Hopp |
3efd19 |
--- 8654,8660 ----
|
|
Karsten Hopp |
3efd19 |
* Write the .sug file.
|
|
Karsten Hopp |
3efd19 |
* Make the file name by changing ".spl" to ".sug".
|
|
Karsten Hopp |
3efd19 |
*/
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(fname, wfname, MAXPATHL - 1);
|
|
Karsten Hopp |
3efd19 |
len = (int)STRLEN(fname);
|
|
Karsten Hopp |
3efd19 |
fname[len - 2] = 'u';
|
|
Karsten Hopp |
3efd19 |
fname[len - 1] = 'g';
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 10261,10267 ****
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/* The suggested word may replace only part of the bad word, add
|
|
Karsten Hopp |
3efd19 |
* the not replaced part. */
|
|
Karsten Hopp |
3efd19 |
! STRCPY(wcopy, stp->st_word);
|
|
Karsten Hopp |
3efd19 |
if (sug.su_badlen > stp->st_orglen)
|
|
Karsten Hopp |
3efd19 |
vim_strncpy(wcopy + stp->st_wordlen,
|
|
Karsten Hopp |
3efd19 |
sug.su_badptr + stp->st_orglen,
|
|
Karsten Hopp |
3efd19 |
--- 10261,10267 ----
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/* The suggested word may replace only part of the bad word, add
|
|
Karsten Hopp |
3efd19 |
* the not replaced part. */
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(wcopy, stp->st_word, MAXWLEN);
|
|
Karsten Hopp |
3efd19 |
if (sug.su_badlen > stp->st_orglen)
|
|
Karsten Hopp |
3efd19 |
vim_strncpy(wcopy + stp->st_wordlen,
|
|
Karsten Hopp |
3efd19 |
sug.su_badptr + stp->st_orglen,
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 13162,13168 ****
|
|
Karsten Hopp |
3efd19 |
pbad = badsound2;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! if (lendiff > 0)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Add part of the bad word to the good word, so that we soundfold
|
|
Karsten Hopp |
3efd19 |
* what replaces the bad word. */
|
|
Karsten Hopp |
3efd19 |
--- 13162,13168 ----
|
|
Karsten Hopp |
3efd19 |
pbad = badsound2;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
! if (lendiff > 0 && stp->st_wordlen + lendiff < MAXWLEN)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Add part of the bad word to the good word, so that we soundfold
|
|
Karsten Hopp |
3efd19 |
* what replaces the bad word. */
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 13875,13881 ****
|
|
Karsten Hopp |
3efd19 |
for (i = gap->ga_len - 1; i >= 0; --i)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Need to append what follows to check for "the the". */
|
|
Karsten Hopp |
3efd19 |
! STRCPY(longword, stp[i].st_word);
|
|
Karsten Hopp |
3efd19 |
len = stp[i].st_wordlen;
|
|
Karsten Hopp |
3efd19 |
vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen,
|
|
Karsten Hopp |
3efd19 |
MAXWLEN - len);
|
|
Karsten Hopp |
3efd19 |
--- 13875,13881 ----
|
|
Karsten Hopp |
3efd19 |
for (i = gap->ga_len - 1; i >= 0; --i)
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
/* Need to append what follows to check for "the the". */
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(longword, stp[i].st_word, MAXWLEN);
|
|
Karsten Hopp |
3efd19 |
len = stp[i].st_wordlen;
|
|
Karsten Hopp |
3efd19 |
vim_strncpy(longword + len, su->su_badptr + stp[i].st_orglen,
|
|
Karsten Hopp |
3efd19 |
MAXWLEN - len);
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 14221,14227 ****
|
|
Karsten Hopp |
3efd19 |
*t = NUL;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! STRCPY(word, s);
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
smp = (salitem_T *)slang->sl_sal.ga_data;
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
--- 14221,14227 ----
|
|
Karsten Hopp |
3efd19 |
*t = NUL;
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
else
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(word, s, MAXWLEN - 1);
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
smp = (salitem_T *)slang->sl_sal.ga_data;
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/syntax.c 2011-04-02 15:12:45.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/syntax.c 2011-04-11 15:44:30.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 8576,8583 ****
|
|
Karsten Hopp |
3efd19 |
if (iarg & hl_attr_table[i])
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (buf[0] != NUL)
|
|
Karsten Hopp |
3efd19 |
! STRCAT(buf, ",");
|
|
Karsten Hopp |
3efd19 |
! STRCAT(buf, hl_name_table[i]);
|
|
Karsten Hopp |
3efd19 |
iarg &= ~hl_attr_table[i]; /* don't want "inverse" */
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
--- 8576,8583 ----
|
|
Karsten Hopp |
3efd19 |
if (iarg & hl_attr_table[i])
|
|
Karsten Hopp |
3efd19 |
{
|
|
Karsten Hopp |
3efd19 |
if (buf[0] != NUL)
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(buf, (char_u *)",", 100);
|
|
Karsten Hopp |
3efd19 |
! vim_strcat(buf, (char_u *)hl_name_table[i], 100);
|
|
Karsten Hopp |
3efd19 |
iarg &= ~hl_attr_table[i]; /* don't want "inverse" */
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
}
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/tag.c 2011-02-25 15:13:43.000000000 +0100
|
|
Karsten Hopp |
3efd19 |
--- src/tag.c 2011-04-11 15:34:59.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 806,812 ****
|
|
Karsten Hopp |
3efd19 |
p = tag_full_fname(&tagp);
|
|
Karsten Hopp |
3efd19 |
if (p == NULL)
|
|
Karsten Hopp |
3efd19 |
continue;
|
|
Karsten Hopp |
3efd19 |
! STRCPY(fname, p);
|
|
Karsten Hopp |
3efd19 |
vim_free(p);
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/*
|
|
Karsten Hopp |
3efd19 |
--- 806,812 ----
|
|
Karsten Hopp |
3efd19 |
p = tag_full_fname(&tagp);
|
|
Karsten Hopp |
3efd19 |
if (p == NULL)
|
|
Karsten Hopp |
3efd19 |
continue;
|
|
Karsten Hopp |
3efd19 |
! vim_strncpy(fname, p, MAXPATHL);
|
|
Karsten Hopp |
3efd19 |
vim_free(p);
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/*
|
|
Karsten Hopp |
3efd19 |
*** ../vim-7.3.159/src/version.c 2011-04-11 14:29:13.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
--- src/version.c 2011-04-11 16:50:53.000000000 +0200
|
|
Karsten Hopp |
3efd19 |
***************
|
|
Karsten Hopp |
3efd19 |
*** 716,717 ****
|
|
Karsten Hopp |
3efd19 |
--- 716,719 ----
|
|
Karsten Hopp |
3efd19 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
3efd19 |
+ /**/
|
|
Karsten Hopp |
3efd19 |
+ 160,
|
|
Karsten Hopp |
3efd19 |
/**/
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
--
|
|
Karsten Hopp |
3efd19 |
If someone questions your market projections, simply point out that your
|
|
Karsten Hopp |
3efd19 |
target market is "People who are nuts" and "People who will buy any damn
|
|
Karsten Hopp |
3efd19 |
thing". Nobody is going to tell you there aren't enough of those people
|
|
Karsten Hopp |
3efd19 |
to go around.
|
|
Karsten Hopp |
3efd19 |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
3efd19 |
|
|
Karsten Hopp |
3efd19 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
3efd19 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
3efd19 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
3efd19 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|