forked from aniani/vim
updated for version 7.0210
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
*index.txt* For Vim version 7.0aa. Last change: 2006 Feb 24
|
*index.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -1476,6 +1476,7 @@ The commands are sorted on the non-optional part of their name.
|
|||||||
|:tselect| :ts[elect] list matching tags and select one
|
|:tselect| :ts[elect] list matching tags and select one
|
||||||
|:tunmenu| :tu[nmenu] remove menu tooltip
|
|:tunmenu| :tu[nmenu] remove menu tooltip
|
||||||
|:undo| :u[ndo] undo last change(s)
|
|:undo| :u[ndo] undo last change(s)
|
||||||
|
|:undojoin| :undoj[oin] join next change with previous undo block
|
||||||
|:unabbreviate| :una[bbreviate] remove abbreviation
|
|:unabbreviate| :una[bbreviate] remove abbreviation
|
||||||
|:unhide| :unh[ide] open a window for each loaded file in the
|
|:unhide| :unh[ide] open a window for each loaded file in the
|
||||||
buffer list
|
buffer list
|
||||||
|
@@ -670,6 +670,7 @@ normal_cmd(oap, toplevel)
|
|||||||
c = 'd';
|
c = 'd';
|
||||||
else
|
else
|
||||||
c = 'c';
|
c = 'c';
|
||||||
|
msg_nowait = TRUE; /* don't delay going to insert mode */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
89
src/spell.c
89
src/spell.c
@@ -813,6 +813,10 @@ static char_u *spell_enc __ARGS((void));
|
|||||||
static void int_wordlist_spl __ARGS((char_u *fname));
|
static void int_wordlist_spl __ARGS((char_u *fname));
|
||||||
static void spell_load_cb __ARGS((char_u *fname, void *cookie));
|
static void spell_load_cb __ARGS((char_u *fname, void *cookie));
|
||||||
static slang_T *spell_load_file __ARGS((char_u *fname, char_u *lang, slang_T *old_lp, int silent));
|
static slang_T *spell_load_file __ARGS((char_u *fname, char_u *lang, slang_T *old_lp, int silent));
|
||||||
|
static int get2c __ARGS((FILE *fd));
|
||||||
|
static int get3c __ARGS((FILE *fd));
|
||||||
|
static int get4c __ARGS((FILE *fd));
|
||||||
|
static time_t get8c __ARGS((FILE *fd));
|
||||||
static char_u *read_cnt_string __ARGS((FILE *fd, int cnt_bytes, int *lenp));
|
static char_u *read_cnt_string __ARGS((FILE *fd, int cnt_bytes, int *lenp));
|
||||||
static char_u *read_string __ARGS((FILE *fd, int cnt));
|
static char_u *read_string __ARGS((FILE *fd, int cnt));
|
||||||
static int read_region_section __ARGS((FILE *fd, slang_T *slang, int len));
|
static int read_region_section __ARGS((FILE *fd, slang_T *slang, int len));
|
||||||
@@ -2602,8 +2606,7 @@ spell_load_file(fname, lang, old_lp, silent)
|
|||||||
if (n == SN_END)
|
if (n == SN_END)
|
||||||
break;
|
break;
|
||||||
c = getc(fd); /* <sectionflags> */
|
c = getc(fd); /* <sectionflags> */
|
||||||
len = (getc(fd) << 24) + (getc(fd) << 16) + (getc(fd) << 8) + getc(fd);
|
len = get4c(fd); /* <sectionlen> */
|
||||||
/* <sectionlen> */
|
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
goto truncerr;
|
goto truncerr;
|
||||||
|
|
||||||
@@ -2657,8 +2660,7 @@ spell_load_file(fname, lang, old_lp, silent)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SN_SUGFILE:
|
case SN_SUGFILE:
|
||||||
for (i = 7; i >= 0; --i) /* <timestamp> */
|
lp->sl_sugtime = get8c(fd); /* <timestamp> */
|
||||||
lp->sl_sugtime += getc(fd) << (i * 8);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SN_COMPOUND:
|
case SN_COMPOUND:
|
||||||
@@ -2748,6 +2750,66 @@ endOK:
|
|||||||
return lp;
|
return lp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read 2 bytes from "fd" and turn them into an int, MSB first.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
get2c(fd)
|
||||||
|
FILE *fd;
|
||||||
|
{
|
||||||
|
long n;
|
||||||
|
|
||||||
|
n = getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read 3 bytes from "fd" and turn them into an int, MSB first.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
get3c(fd)
|
||||||
|
FILE *fd;
|
||||||
|
{
|
||||||
|
long n;
|
||||||
|
|
||||||
|
n = getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read 4 bytes from "fd" and turn them into an int, MSB first.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
get4c(fd)
|
||||||
|
FILE *fd;
|
||||||
|
{
|
||||||
|
long n;
|
||||||
|
|
||||||
|
n = getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Read 8 bytes from "fd" and turn them into a time_t, MSB first.
|
||||||
|
*/
|
||||||
|
static time_t
|
||||||
|
get8c(fd)
|
||||||
|
FILE *fd;
|
||||||
|
{
|
||||||
|
time_t n = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 8; ++i)
|
||||||
|
n = (n << 8) + getc(fd);
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read a length field from "fd" in "cnt_bytes" bytes.
|
* Read a length field from "fd" in "cnt_bytes" bytes.
|
||||||
* Allocate memory, read the string into it and add a NUL at the end.
|
* Allocate memory, read the string into it and add a NUL at the end.
|
||||||
@@ -2882,7 +2944,7 @@ read_prefcond_section(fd, lp)
|
|||||||
char_u buf[MAXWLEN + 1];
|
char_u buf[MAXWLEN + 1];
|
||||||
|
|
||||||
/* <prefcondcnt> <prefcond> ... */
|
/* <prefcondcnt> <prefcond> ... */
|
||||||
cnt = (getc(fd) << 8) + getc(fd); /* <prefcondcnt> */
|
cnt = get2c(fd); /* <prefcondcnt> */
|
||||||
if (cnt <= 0)
|
if (cnt <= 0)
|
||||||
return SP_FORMERROR;
|
return SP_FORMERROR;
|
||||||
|
|
||||||
@@ -2928,7 +2990,7 @@ read_rep_section(fd, gap, first)
|
|||||||
fromto_T *ftp;
|
fromto_T *ftp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
cnt = (getc(fd) << 8) + getc(fd); /* <repcount> */
|
cnt = get2c(fd); /* <repcount> */
|
||||||
if (cnt < 0)
|
if (cnt < 0)
|
||||||
return SP_TRUNCERROR;
|
return SP_TRUNCERROR;
|
||||||
|
|
||||||
@@ -2993,7 +3055,7 @@ read_sal_section(fd, slang)
|
|||||||
if (i & SAL_REM_ACCENTS)
|
if (i & SAL_REM_ACCENTS)
|
||||||
slang->sl_rem_accents = TRUE;
|
slang->sl_rem_accents = TRUE;
|
||||||
|
|
||||||
cnt = (getc(fd) << 8) + getc(fd); /* <salcount> */
|
cnt = get2c(fd); /* <salcount> */
|
||||||
if (cnt < 0)
|
if (cnt < 0)
|
||||||
return SP_TRUNCERROR;
|
return SP_TRUNCERROR;
|
||||||
|
|
||||||
@@ -3746,7 +3808,7 @@ spell_read_tree(fd, bytsp, idxsp, prefixtree, prefixcnt)
|
|||||||
|
|
||||||
/* The tree size was computed when writing the file, so that we can
|
/* The tree size was computed when writing the file, so that we can
|
||||||
* allocate it as one long block. <nodecount> */
|
* allocate it as one long block. <nodecount> */
|
||||||
len = (getc(fd) << 24) + (getc(fd) << 16) + (getc(fd) << 8) + getc(fd);
|
len = get4c(fd);
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
return SP_TRUNCERROR;
|
return SP_TRUNCERROR;
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
@@ -3836,7 +3898,7 @@ read_tree_node(fd, byts, idxs, maxidx, startidx, prefixtree, maxprefcondnr)
|
|||||||
|
|
||||||
c |= getc(fd); /* <affixID> */
|
c |= getc(fd); /* <affixID> */
|
||||||
|
|
||||||
n = (getc(fd) << 8) + getc(fd); /* <prefcondnr> */
|
n = get2c(fd); /* <prefcondnr> */
|
||||||
if (n >= maxprefcondnr)
|
if (n >= maxprefcondnr)
|
||||||
return SP_FORMERROR;
|
return SP_FORMERROR;
|
||||||
c |= (n << 8);
|
c |= (n << 8);
|
||||||
@@ -3862,7 +3924,7 @@ read_tree_node(fd, byts, idxs, maxidx, startidx, prefixtree, maxprefcondnr)
|
|||||||
else /* c == BY_INDEX */
|
else /* c == BY_INDEX */
|
||||||
{
|
{
|
||||||
/* <nodeidx> */
|
/* <nodeidx> */
|
||||||
n = (getc(fd) << 16) + (getc(fd) << 8) + getc(fd);
|
n = get3c(fd);
|
||||||
if (n < 0 || n >= maxidx)
|
if (n < 0 || n >= maxidx)
|
||||||
return SP_FORMERROR;
|
return SP_FORMERROR;
|
||||||
idxs[idx] = n + SHARED_MASK;
|
idxs[idx] = n + SHARED_MASK;
|
||||||
@@ -10185,9 +10247,7 @@ suggest_load_files()
|
|||||||
|
|
||||||
/* Check the timestamp, it must be exactly the same as the one in
|
/* Check the timestamp, it must be exactly the same as the one in
|
||||||
* the .spl file. Otherwise the word numbers won't match. */
|
* the .spl file. Otherwise the word numbers won't match. */
|
||||||
timestamp = 0;
|
timestamp = get8c(fd); /* <timestamp> */
|
||||||
for (i = 7; i >= 0; --i) /* <timestamp> */
|
|
||||||
timestamp += getc(fd) << (i * 8);
|
|
||||||
if (timestamp != slang->sl_sugtime)
|
if (timestamp != slang->sl_sugtime)
|
||||||
{
|
{
|
||||||
EMSG2(_("E781: .sug file doesn't match .spl file: %s"),
|
EMSG2(_("E781: .sug file doesn't match .spl file: %s"),
|
||||||
@@ -10220,8 +10280,7 @@ someerror:
|
|||||||
if (slang->sl_sugbuf == NULL)
|
if (slang->sl_sugbuf == NULL)
|
||||||
goto someerror;
|
goto someerror;
|
||||||
/* <sugwcount> */
|
/* <sugwcount> */
|
||||||
wcount = (getc(fd) << 24) + (getc(fd) << 16) + (getc(fd) << 8)
|
wcount = get4c(fd);
|
||||||
+ getc(fd);
|
|
||||||
if (wcount < 0)
|
if (wcount < 0)
|
||||||
goto someerror;
|
goto someerror;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user