|
Karsten Hopp |
e5719f |
To: vim-dev@vim.org
|
|
Karsten Hopp |
e5719f |
Subject: Patch 7.3.017
|
|
Karsten Hopp |
e5719f |
Fcc: outbox
|
|
Karsten Hopp |
e5719f |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e5719f |
Mime-Version: 1.0
|
|
Karsten Hopp |
e5719f |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
e5719f |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e5719f |
------------
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
Patch 7.3.017
|
|
Karsten Hopp |
e5719f |
Problem: smatch reports errors.
|
|
Karsten Hopp |
e5719f |
Solution: Fix the reported errors. (Dominique Pelle)
|
|
Karsten Hopp |
e5719f |
Files: src/spell.c, src/syntax.c
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
*** ../vim-7.3.016/src/spell.c 2010-09-18 13:36:41.000000000 +0200
|
|
Karsten Hopp |
e5719f |
--- src/spell.c 2010-09-29 18:25:09.000000000 +0200
|
|
Karsten Hopp |
e5719f |
***************
|
|
Karsten Hopp |
e5719f |
*** 4951,4957 ****
|
|
Karsten Hopp |
e5719f |
char_u *si_info; /* info text chars or NULL */
|
|
Karsten Hopp |
e5719f |
int si_region_count; /* number of regions supported (1 when there
|
|
Karsten Hopp |
e5719f |
are no regions) */
|
|
Karsten Hopp |
e5719f |
! char_u si_region_name[16]; /* region names; used only if
|
|
Karsten Hopp |
e5719f |
* si_region_count > 1) */
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
garray_T si_rep; /* list of fromto_T entries from REP lines */
|
|
Karsten Hopp |
e5719f |
--- 4951,4957 ----
|
|
Karsten Hopp |
e5719f |
char_u *si_info; /* info text chars or NULL */
|
|
Karsten Hopp |
e5719f |
int si_region_count; /* number of regions supported (1 when there
|
|
Karsten Hopp |
e5719f |
are no regions) */
|
|
Karsten Hopp |
e5719f |
! char_u si_region_name[17]; /* region names; used only if
|
|
Karsten Hopp |
e5719f |
* si_region_count > 1) */
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
garray_T si_rep; /* list of fromto_T entries from REP lines */
|
|
Karsten Hopp |
e5719f |
***************
|
|
Karsten Hopp |
e5719f |
*** 9530,9536 ****
|
|
Karsten Hopp |
e5719f |
if (aspath)
|
|
Karsten Hopp |
e5719f |
/* Use directory of an entry with path, e.g., for
|
|
Karsten Hopp |
e5719f |
* "/dir/lg.utf-8.spl" use "/dir". */
|
|
Karsten Hopp |
e5719f |
! vim_strncpy(buf, curbuf->b_s.b_p_spl, lstart - curbuf->b_s.b_p_spl - 1);
|
|
Karsten Hopp |
e5719f |
else
|
|
Karsten Hopp |
e5719f |
/* Copy the path from 'runtimepath' to buf[]. */
|
|
Karsten Hopp |
e5719f |
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
|
Karsten Hopp |
e5719f |
--- 9530,9537 ----
|
|
Karsten Hopp |
e5719f |
if (aspath)
|
|
Karsten Hopp |
e5719f |
/* Use directory of an entry with path, e.g., for
|
|
Karsten Hopp |
e5719f |
* "/dir/lg.utf-8.spl" use "/dir". */
|
|
Karsten Hopp |
e5719f |
! vim_strncpy(buf, curbuf->b_s.b_p_spl,
|
|
Karsten Hopp |
e5719f |
! lstart - curbuf->b_s.b_p_spl - 1);
|
|
Karsten Hopp |
e5719f |
else
|
|
Karsten Hopp |
e5719f |
/* Copy the path from 'runtimepath' to buf[]. */
|
|
Karsten Hopp |
e5719f |
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
|
Karsten Hopp |
e5719f |
***************
|
|
Karsten Hopp |
e5719f |
*** 9539,9551 ****
|
|
Karsten Hopp |
e5719f |
/* Use the first language name from 'spelllang' and the
|
|
Karsten Hopp |
e5719f |
* encoding used in the first loaded .spl file. */
|
|
Karsten Hopp |
e5719f |
if (aspath)
|
|
Karsten Hopp |
e5719f |
! vim_strncpy(buf, curbuf->b_s.b_p_spl, lend - curbuf->b_s.b_p_spl);
|
|
Karsten Hopp |
e5719f |
else
|
|
Karsten Hopp |
e5719f |
{
|
|
Karsten Hopp |
e5719f |
/* Create the "spell" directory if it doesn't exist yet. */
|
|
Karsten Hopp |
e5719f |
l = (int)STRLEN(buf);
|
|
Karsten Hopp |
e5719f |
vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell");
|
|
Karsten Hopp |
e5719f |
! if (!filewritable(buf) != 2)
|
|
Karsten Hopp |
e5719f |
vim_mkdir(buf, 0755);
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
l = (int)STRLEN(buf);
|
|
Karsten Hopp |
e5719f |
--- 9540,9553 ----
|
|
Karsten Hopp |
e5719f |
/* Use the first language name from 'spelllang' and the
|
|
Karsten Hopp |
e5719f |
* encoding used in the first loaded .spl file. */
|
|
Karsten Hopp |
e5719f |
if (aspath)
|
|
Karsten Hopp |
e5719f |
! vim_strncpy(buf, curbuf->b_s.b_p_spl,
|
|
Karsten Hopp |
e5719f |
! lend - curbuf->b_s.b_p_spl);
|
|
Karsten Hopp |
e5719f |
else
|
|
Karsten Hopp |
e5719f |
{
|
|
Karsten Hopp |
e5719f |
/* Create the "spell" directory if it doesn't exist yet. */
|
|
Karsten Hopp |
e5719f |
l = (int)STRLEN(buf);
|
|
Karsten Hopp |
e5719f |
vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell");
|
|
Karsten Hopp |
e5719f |
! if (filewritable(buf) != 2)
|
|
Karsten Hopp |
e5719f |
vim_mkdir(buf, 0755);
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
l = (int)STRLEN(buf);
|
|
Karsten Hopp |
e5719f |
*** ../vim-7.3.016/src/syntax.c 2010-08-15 21:57:32.000000000 +0200
|
|
Karsten Hopp |
e5719f |
--- src/syntax.c 2010-09-29 18:28:26.000000000 +0200
|
|
Karsten Hopp |
e5719f |
***************
|
|
Karsten Hopp |
e5719f |
*** 7600,7609 ****
|
|
Karsten Hopp |
e5719f |
/*
|
|
Karsten Hopp |
e5719f |
* Copy characters from arg[] to buf[], translating <> codes.
|
|
Karsten Hopp |
e5719f |
*/
|
|
Karsten Hopp |
e5719f |
! for (p = arg, off = 0; off < 100 && *p; )
|
|
Karsten Hopp |
e5719f |
{
|
|
Karsten Hopp |
e5719f |
len = trans_special(&p, buf + off, FALSE);
|
|
Karsten Hopp |
e5719f |
! if (len) /* recognized special char */
|
|
Karsten Hopp |
e5719f |
off += len;
|
|
Karsten Hopp |
e5719f |
else /* copy as normal char */
|
|
Karsten Hopp |
e5719f |
buf[off++] = *p++;
|
|
Karsten Hopp |
e5719f |
--- 7600,7609 ----
|
|
Karsten Hopp |
e5719f |
/*
|
|
Karsten Hopp |
e5719f |
* Copy characters from arg[] to buf[], translating <> codes.
|
|
Karsten Hopp |
e5719f |
*/
|
|
Karsten Hopp |
e5719f |
! for (p = arg, off = 0; off < 100 - 6 && *p; )
|
|
Karsten Hopp |
e5719f |
{
|
|
Karsten Hopp |
e5719f |
len = trans_special(&p, buf + off, FALSE);
|
|
Karsten Hopp |
e5719f |
! if (len > 0) /* recognized special char */
|
|
Karsten Hopp |
e5719f |
off += len;
|
|
Karsten Hopp |
e5719f |
else /* copy as normal char */
|
|
Karsten Hopp |
e5719f |
buf[off++] = *p++;
|
|
Karsten Hopp |
e5719f |
*** ../vim-7.3.016/src/version.c 2010-09-29 17:26:57.000000000 +0200
|
|
Karsten Hopp |
e5719f |
--- src/version.c 2010-09-29 17:47:27.000000000 +0200
|
|
Karsten Hopp |
e5719f |
***************
|
|
Karsten Hopp |
e5719f |
*** 716,717 ****
|
|
Karsten Hopp |
e5719f |
--- 716,719 ----
|
|
Karsten Hopp |
e5719f |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e5719f |
+ /**/
|
|
Karsten Hopp |
e5719f |
+ 17,
|
|
Karsten Hopp |
e5719f |
/**/
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
--
|
|
Karsten Hopp |
e5719f |
A computer without Windows is like a fish without a bicycle.
|
|
Karsten Hopp |
e5719f |
|
|
Karsten Hopp |
e5719f |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e5719f |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e5719f |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
e5719f |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|