From b4ccf5c20a41ea4d4bfeb636259553c8e55cb911 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 11 Jun 2017 18:35:16 +0900 Subject: vim-patch:7.4.2354 Problem: The example that explains nested backreferences does not work properly with the new regexp engine. (Harm te Hennepe) Solution: Also save the end position when adding a state. (closes vim/vim#990) https://github.com/vim/vim/commit/d563883a1fb5ec6cf4a2758c5e36ac1ff4e9bb3d --- src/nvim/regexp_nfa.c | 26 ++++++++++---------------- src/nvim/testdir/test_regexp_utf8.vim | 15 +++++++++++++++ src/nvim/version.c | 2 +- 3 files changed, 26 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index 24c156d2ba..491693a371 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -3913,7 +3913,7 @@ addstate ( int k; int found = FALSE; nfa_thread_T *thread; - lpos_T save_lpos; + struct multipos save_multipos; int save_in_use; char_u *save_ptr; int i; @@ -4127,15 +4127,13 @@ skip_add: /* avoid compiler warnings */ save_ptr = NULL; - save_lpos.lnum = 0; - save_lpos.col = 0; + memset(&save_multipos, 0, sizeof(save_multipos)); /* Set the position (with "off" added) in the subexpression. Save * and restore it when it was in use. Otherwise fill any gap. */ if (REG_MULTI) { if (subidx < sub->in_use) { - save_lpos.lnum = sub->list.multi[subidx].start_lnum; - save_lpos.col = sub->list.multi[subidx].start_col; + save_multipos = sub->list.multi[subidx]; save_in_use = -1; } else { save_in_use = sub->in_use; @@ -4178,9 +4176,8 @@ skip_add: sub = &subs->norm; if (save_in_use == -1) { - if (REG_MULTI){ - sub->list.multi[subidx].start_lnum = save_lpos.lnum; - sub->list.multi[subidx].start_col = save_lpos.col; + if (REG_MULTI) { + sub->list.multi[subidx] = save_multipos; } else sub->list.line[subidx].start = save_ptr; @@ -4234,8 +4231,7 @@ skip_add: if (sub->in_use <= subidx) sub->in_use = subidx + 1; if (REG_MULTI) { - save_lpos.lnum = sub->list.multi[subidx].end_lnum; - save_lpos.col = sub->list.multi[subidx].end_col; + save_multipos = sub->list.multi[subidx]; if (off == -1) { sub->list.multi[subidx].end_lnum = reglnum + 1; sub->list.multi[subidx].end_col = 0; @@ -4249,9 +4245,8 @@ skip_add: } else { save_ptr = sub->list.line[subidx].end; sub->list.line[subidx].end = reginput + off; - /* avoid compiler warnings */ - save_lpos.lnum = 0; - save_lpos.col = 0; + // avoid compiler warnings + memset(&save_multipos, 0, sizeof(save_multipos)); } subs = addstate(l, state->out, subs, pim, off_arg); @@ -4261,9 +4256,8 @@ skip_add: else sub = &subs->norm; - if (REG_MULTI){ - sub->list.multi[subidx].end_lnum = save_lpos.lnum; - sub->list.multi[subidx].end_col = save_lpos.col; + if (REG_MULTI) { + sub->list.multi[subidx] = save_multipos; } else sub->list.line[subidx].end = save_ptr; diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index 7f3b31575d..a2f4286d4f 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -98,6 +98,21 @@ func Test_recursive_substitute() bwipe! endfunc +func Test_nested_backrefs() + " Check example in change.txt. + new + for re in range(0, 2) + exe 'set re=' . re + call setline(1, 'aa ab x') + 1s/\(\(a[a-d] \)*\)\(x\)/-\1- -\2- -\3-/ + call assert_equal('-aa ab - -ab - -x-', getline(1)) + + call assert_equal('-aa ab - -ab - -x-', substitute('aa ab x', '\(\(a[a-d] \)*\)\(x\)', '-\1- -\2- -\3-', '')) + endfor + bwipe! + set re=0 +endfunc + func Test_eow_with_optional() let expected = ['abc def', 'abc', 'def', '', '', '', '', '', '', ''] for re in range(0, 2) diff --git a/src/nvim/version.c b/src/nvim/version.c index 094ca29b01..0713684303 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -90,7 +90,7 @@ static const int included_patches[] = { 2357, 2356, 2355, - // 2354, + 2354, 2353, // 2352 NA // 2351 NA -- cgit From 04de6a64e2f7b3b235acd4ab779bfed30e59451f Mon Sep 17 00:00:00 2001 From: ckelsel Date: Fri, 7 Jul 2017 14:57:50 +0800 Subject: vim-patch:7.4.2189 https://github.com/vim/vim/commit/f71d7b9ee5ceba75f70c30845332ddd728fd16c6 Author: Bram Moolenaar Date: Tue Aug 9 22:14:05 2016 +0200 patch 7.4.2189 Problem: Cannot detect encoding in a fifo. Solution: Extend the stdin way of detecting encoding to fifo. Add a test for detecting encoding on stdin and fifo. (Ken Takata) --- src/nvim/buffer.c | 114 +++++++++++++++++++++++---------- src/nvim/fileio.c | 14 ++-- src/nvim/fileio.h | 3 +- src/nvim/testdir/Makefile | 2 + src/nvim/testdir/test_startup.vim | 2 +- src/nvim/testdir/test_startup_utf8.vim | 64 ++++++++++++++++++ src/nvim/version.c | 2 +- 7 files changed, 158 insertions(+), 43 deletions(-) create mode 100644 src/nvim/testdir/test_startup_utf8.vim (limited to 'src') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index b5ca6543c5..504be8dde6 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -91,6 +91,54 @@ static char *e_auabort = N_("E855: Autocommands caused command to abort"); // Number of times free_buffer() was called. static int buf_free_count = 0; +/* Read data from buffer for retrying. */ +static int +read_buffer( + int read_stdin, /* read file from stdin, otherwise fifo */ + exarg_T *eap, /* for forced 'ff' and 'fenc' or NULL */ + int flags) /* extra flags for readfile() */ +{ + int retval = OK; + linenr_T line_count; + + /* + * Read from the buffer which the text is already filled in and append at + * the end. This makes it possible to retry when 'fileformat' or + * 'fileencoding' was guessed wrong. + */ + line_count = curbuf->b_ml.ml_line_count; + retval = readfile( + read_stdin ? NULL : curbuf->b_ffname, + read_stdin ? NULL : curbuf->b_fname, + (linenr_T)line_count, (linenr_T)0, (linenr_T)MAXLNUM, eap, + flags | READ_BUFFER); + if (retval == OK) { + /* Delete the binary lines. */ + while (--line_count >= 0) + ml_delete((linenr_T)1, FALSE); + } else { + /* Delete the converted lines. */ + while (curbuf->b_ml.ml_line_count > line_count) + ml_delete(line_count, FALSE); + } + /* Put the cursor on the first line. */ + curwin->w_cursor.lnum = 1; + curwin->w_cursor.col = 0; + + if (read_stdin) { + /* Set or reset 'modified' before executing autocommands, so that + * it can be changed there. */ + if (!readonlymode && !bufempty()) + changed(); + else if (retval != FAIL) + unchanged(curbuf, FALSE); + + apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE, + curbuf, &retval); + } + return retval; +} + /* * Open current buffer, that is: open the memfile and read the file into * memory. @@ -106,6 +154,7 @@ open_buffer ( int retval = OK; bufref_T old_curbuf; long old_tw = curbuf->b_p_tw; + int read_fifo = FALSE; /* * The 'readonly' flag is only set when BF_NEVERLOADED is being reset. @@ -156,13 +205,37 @@ open_buffer ( if (curbuf->b_ffname != NULL) { int old_msg_silent = msg_silent; +#ifdef UNIX + int save_bin = curbuf->b_p_bin; + int perm; + + perm = os_getperm((const char *)curbuf->b_ffname); + if (perm >= 0 && (0 +# ifdef S_ISFIFO + || S_ISFIFO(perm) +# endif +# ifdef S_ISSOCK + || S_ISSOCK(perm) +# endif + )) + read_fifo = TRUE; + if (read_fifo) + curbuf->b_p_bin = TRUE; +#endif if (shortmess(SHM_FILEINFO)) { msg_silent = 1; } retval = readfile(curbuf->b_ffname, curbuf->b_fname, (linenr_T)0, (linenr_T)0, (linenr_T)MAXLNUM, eap, - flags | READ_NEW); + flags | READ_NEW | (read_fifo ? READ_FIFO : 0)); +#ifdef UNIX + if (read_fifo) { + curbuf->b_p_bin = save_bin; + if (retval == OK) + retval = read_buffer(FALSE, eap, flags); + } +#endif msg_silent = old_msg_silent; // Help buffer is filtered. @@ -170,8 +243,7 @@ open_buffer ( fix_help_buffer(); } } else if (read_stdin) { - int save_bin = curbuf->b_p_bin; - linenr_T line_count; + int save_bin = curbuf->b_p_bin; /* * First read the text in binary mode into the buffer. @@ -184,37 +256,9 @@ open_buffer ( (linenr_T)0, (linenr_T)MAXLNUM, NULL, flags | (READ_NEW + READ_STDIN)); curbuf->b_p_bin = save_bin; - if (retval == OK) { - line_count = curbuf->b_ml.ml_line_count; - retval = readfile(NULL, NULL, (linenr_T)line_count, - (linenr_T)0, (linenr_T)MAXLNUM, eap, - flags | READ_BUFFER); - if (retval == OK) { - /* Delete the binary lines. */ - while (--line_count >= 0) - ml_delete((linenr_T)1, FALSE); - } else { - /* Delete the converted lines. */ - while (curbuf->b_ml.ml_line_count > line_count) - ml_delete(line_count, FALSE); - } - /* Put the cursor on the first line. */ - curwin->w_cursor.lnum = 1; - curwin->w_cursor.col = 0; - - // Set or reset 'modified' before executing autocommands, so that - // it can be changed there. - if (!readonlymode && !bufempty()) { - changed(); - } else if (retval == OK) { - unchanged(curbuf, false); - } - - if (retval == OK) { - apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, false, - curbuf, &retval); - } - } + if (retval == OK) + retval = read_buffer(TRUE, eap, flags); + } /* if first time loading this buffer, init b_chartab[] */ @@ -234,7 +278,7 @@ open_buffer ( || modified_was_set // ":set modified" used in autocmd || (aborting() && vim_strchr(p_cpo, CPO_INTMOD) != NULL)) { changed(); - } else if (retval == OK && !read_stdin) { + } else if (retval != FAIL && !read_stdin && !read_fifo) { unchanged(curbuf, false); } save_file_ff(curbuf); // keep this fileformat diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index be4188c4df..dcef09e21f 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -247,6 +247,7 @@ void filemess(buf_T *buf, char_u *name, char_u *s, int attr) * stdin) * READ_DUMMY read into a dummy buffer (to check if file contents changed) * READ_KEEP_UNDO don't clear undo info or read it from a file + * READ_FIFO read from fifo/socket instead of a file * * return FAIL for failure, NOTDONE for directory (failure), or OK */ @@ -267,6 +268,7 @@ readfile ( int filtering = (flags & READ_FILTER); int read_stdin = (flags & READ_STDIN); int read_buffer = (flags & READ_BUFFER); + int read_fifo = (flags & READ_FIFO); int set_options = newfile || read_buffer || (eap != NULL && eap->read_edit); linenr_T read_buf_lnum = 1; /* next line to read from curbuf */ @@ -426,7 +428,7 @@ readfile ( } } - if (!read_buffer && !read_stdin) { + if (!read_buffer && !read_stdin && !read_fifo) { perm = os_getperm((const char *)fname); #ifdef UNIX // On Unix it is possible to read a directory, so we have to @@ -468,7 +470,7 @@ readfile ( if (check_readonly && !readonlymode) curbuf->b_p_ro = FALSE; - if (newfile && !read_stdin && !read_buffer) { + if (newfile && !read_stdin && !read_buffer && !read_fifo) { /* Remember time of file. */ FileInfo file_info; if (os_fileinfo((char *)fname, &file_info)) { @@ -895,6 +897,7 @@ retry: * and we can't do it internally or with iconv(). */ if (fio_flags == 0 && !read_stdin && !read_buffer && *p_ccv != NUL + && !read_fifo # ifdef USE_ICONV && iconv_fd == (iconv_t)-1 # endif @@ -935,7 +938,7 @@ retry: /* Set "can_retry" when it's possible to rewind the file and try with * another "fenc" value. It's FALSE when no other "fenc" to try, reading * stdin or fixed at a specific encoding. */ - can_retry = (*fenc != NUL && !read_stdin && !keep_dest_enc); + can_retry = (*fenc != NUL && !read_stdin && !keep_dest_enc && !read_fifo); if (!skip_read) { linerest = 0; @@ -947,6 +950,7 @@ retry: && curbuf->b_ffname != NULL && curbuf->b_p_udf && !filtering + && !read_fifo && !read_stdin && !read_buffer); if (read_undo_file) @@ -1919,7 +1923,7 @@ failed: u_read_undo(NULL, hash, fname); } - if (!read_stdin && !read_buffer) { + if (!read_stdin && !read_fifo && (!read_buffer || sfname != NULL)) { int m = msg_scroll; int n = msg_scrolled; @@ -1937,7 +1941,7 @@ failed: if (filtering) { apply_autocmds_exarg(EVENT_FILTERREADPOST, NULL, sfname, false, curbuf, eap); - } else if (newfile) { + } else if (newfile || (read_buffer && sfname != NULL)) { apply_autocmds_exarg(EVENT_BUFREADPOST, NULL, sfname, false, curbuf, eap); if (!au_did_filetype && *curbuf->b_p_ft != NUL) { diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h index 426dc0fcb3..05dd0fa2c3 100644 --- a/src/nvim/fileio.h +++ b/src/nvim/fileio.h @@ -10,7 +10,8 @@ #define READ_STDIN 0x04 /* read from stdin */ #define READ_BUFFER 0x08 /* read from curbuf (converting stdin) */ #define READ_DUMMY 0x10 /* reading into a dummy buffer */ -#define READ_KEEP_UNDO 0x20 /* keep undo info*/ +#define READ_KEEP_UNDO 0x20 /* keep undo info */ +#define READ_FIFO 0x40 /* read from fifo or socket */ #define READ_STRING(x, y) (char_u *)read_string((x), (size_t)(y)) diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 7e55fffa06..510e8820f4 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -62,6 +62,8 @@ NEW_TESTS ?= \ test_signs.res \ test_smartindent.res \ test_stat.res \ + test_startup.res \ + test_startup_utf8.res \ test_substitute.res \ test_syntax.res \ test_tabpage.res \ diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim index 5996b2cd4a..64f7f31294 100644 --- a/src/nvim/testdir/test_startup.vim +++ b/src/nvim/testdir/test_startup.vim @@ -75,7 +75,7 @@ func Test_help_arg() " check if couple of lines are there let found = [] for line in lines - if line =~ '-R.*Readonly mode' + if line =~ '-R.*Read-only mode' call add(found, 'Readonly mode') endif " Watch out for a second --version line in the Gnome version. diff --git a/src/nvim/testdir/test_startup_utf8.vim b/src/nvim/testdir/test_startup_utf8.vim new file mode 100644 index 0000000000..d179a4cc79 --- /dev/null +++ b/src/nvim/testdir/test_startup_utf8.vim @@ -0,0 +1,64 @@ +" Tests for startup using utf-8. +if !has('multi_byte') + finish +endif + +source shared.vim + +func Test_read_stdin_utf8() + let linesin = ['テスト', '€ÀÈÌÒÙ'] + call writefile(linesin, 'Xtestin') + let before = [ + \ 'set enc=utf-8', + \ 'set fencs=cp932,utf-8', + \ ] + let after = [ + \ 'write ++enc=utf-8 Xtestout', + \ 'quit!', + \ ] + if has('win32') + let pipecmd = 'type Xtestin | ' + else + let pipecmd = 'cat Xtestin | ' + endif + if RunVimPiped(before, after, '-', pipecmd) + let lines = readfile('Xtestout') + call assert_equal(linesin, lines) + else + call assert_equal('', 'RunVimPiped failed.') + endif + call delete('Xtestout') + call delete('Xtestin') +endfunc + +func Test_read_fifo_utf8() + if !has('unix') + return + endif + " Using bash/zsh's process substitution. + if executable('bash') + set shell=bash + elseif executable('zsh') + set shell=zsh + else + return + endif + let linesin = ['テスト', '€ÀÈÌÒÙ'] + call writefile(linesin, 'Xtestin') + let before = [ + \ 'set enc=utf-8', + \ 'set fencs=cp932,utf-8', + \ ] + let after = [ + \ 'write ++enc=utf-8 Xtestout', + \ 'quit!', + \ ] + if RunVim(before, after, '<(cat Xtestin)') + let lines = readfile('Xtestout') + call assert_equal(linesin, lines) + else + call assert_equal('', 'RunVim failed.') + endif + call delete('Xtestout') + call delete('Xtestin') +endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index 0713684303..ec4a804f2e 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -255,7 +255,7 @@ static const int included_patches[] = { // 2192 NA // 2191 NA 2190, - // 2189, + 2189, 2188, 2187, // 2186 NA -- cgit From 2999d7c0e89087f76711e914eb65af55578a6691 Mon Sep 17 00:00:00 2001 From: ckelsel Date: Mon, 10 Jul 2017 07:58:40 +0800 Subject: vim-patch:7.4.2229 https://github.com/vim/vim/commit/f04507d132fbcb63999167ec006fc6e700b5af4f Author: Bram Moolenaar Date: Sat Aug 20 15:05:39 2016 +0200 patch 7.4.2229 Problem: Startup test fails on Solaris. Solution: Recognize a character device. (Danek Duvall) --- src/nvim/buffer.c | 3 +++ src/nvim/fileio.c | 2 +- src/nvim/version.c | 2 +- src/nvim/vim.h | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 504be8dde6..1534af478f 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -216,6 +216,9 @@ open_buffer ( # endif # ifdef S_ISSOCK || S_ISSOCK(perm) +# endif +# ifdef OPEN_CHR_FILES + || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname)) # endif )) read_fifo = TRUE; diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index dcef09e21f..41117fdd3d 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1974,7 +1974,7 @@ failed: /// Do not accept "/dev/fd/[012]", opening these may hang Vim. /// /// @param fname file name to check -static bool is_dev_fd_file(char_u *fname) +bool is_dev_fd_file(char_u *fname) FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT { return STRNCMP(fname, "/dev/fd/", 8) == 0 diff --git a/src/nvim/version.c b/src/nvim/version.c index ec4a804f2e..09ee23e58f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -215,7 +215,7 @@ static const int included_patches[] = { // 2232 NA 2231, 2230, - // 2229, + 2229, 2228, 2227, 2226, diff --git a/src/nvim/vim.h b/src/nvim/vim.h index f29ccdd296..5d2c27a2f4 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -319,4 +319,8 @@ enum { FOLD_TEXT_LEN = 51 }; //!< buffer size for get_foldtext() // Lowest number used for window ID. Cannot have this many windows per tab. #define LOWEST_WIN_ID 1000 +#if defined(__FreeBSD__) && defined(S_ISCHR) +# define OPEN_CHR_FILES +#endif + #endif /* NVIM_VIM_H */ -- cgit From 462a6148a64f2c2faabdee1eacac273ddbbd095a Mon Sep 17 00:00:00 2001 From: ckelsel Date: Tue, 11 Jul 2017 09:07:18 +0800 Subject: lint --- src/nvim/buffer.c | 86 ++++++++++++++++++++++++++++++------------------------- src/nvim/fileio.c | 4 +-- src/nvim/fileio.h | 16 +++++------ 3 files changed, 57 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 1534af478f..90a564bb6a 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -91,21 +91,21 @@ static char *e_auabort = N_("E855: Autocommands caused command to abort"); // Number of times free_buffer() was called. static int buf_free_count = 0; -/* Read data from buffer for retrying. */ +// Read data from buffer for retrying. static int read_buffer( - int read_stdin, /* read file from stdin, otherwise fifo */ - exarg_T *eap, /* for forced 'ff' and 'fenc' or NULL */ - int flags) /* extra flags for readfile() */ + int read_stdin, // read file from stdin, otherwise fifo + exarg_T *eap, // for forced 'ff' and 'fenc' or NULL + int flags) // extra flags for readfile() { int retval = OK; linenr_T line_count; - /* - * Read from the buffer which the text is already filled in and append at - * the end. This makes it possible to retry when 'fileformat' or - * 'fileencoding' was guessed wrong. - */ + // + // Read from the buffer which the text is already filled in and append at + // the end. This makes it possible to retry when 'fileformat' or + // 'fileencoding' was guessed wrong. + // line_count = curbuf->b_ml.ml_line_count; retval = readfile( read_stdin ? NULL : curbuf->b_ffname, @@ -113,27 +113,30 @@ read_buffer( (linenr_T)line_count, (linenr_T)0, (linenr_T)MAXLNUM, eap, flags | READ_BUFFER); if (retval == OK) { - /* Delete the binary lines. */ - while (--line_count >= 0) - ml_delete((linenr_T)1, FALSE); + // Delete the binary lines. + while (--line_count >= 0) { + ml_delete((linenr_T)1, false); + } } else { - /* Delete the converted lines. */ - while (curbuf->b_ml.ml_line_count > line_count) - ml_delete(line_count, FALSE); + // Delete the converted lines. + while (curbuf->b_ml.ml_line_count > line_count) { + ml_delete(line_count, false); + } } - /* Put the cursor on the first line. */ + // Put the cursor on the first line. curwin->w_cursor.lnum = 1; curwin->w_cursor.col = 0; if (read_stdin) { - /* Set or reset 'modified' before executing autocommands, so that - * it can be changed there. */ - if (!readonlymode && !bufempty()) + // Set or reset 'modified' before executing autocommands, so that + // it can be changed there. + if (!readonlymode && !bufempty()) { changed(); - else if (retval != FAIL) - unchanged(curbuf, FALSE); + } else if (retval != FAIL) { + unchanged(curbuf, false); + } - apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, FALSE, + apply_autocmds_retval(EVENT_STDINREADPOST, NULL, NULL, false, curbuf, &retval); } return retval; @@ -154,7 +157,7 @@ open_buffer ( int retval = OK; bufref_T old_curbuf; long old_tw = curbuf->b_p_tw; - int read_fifo = FALSE; + int read_fifo = false; /* * The 'readonly' flag is only set when BF_NEVERLOADED is being reset. @@ -212,18 +215,22 @@ open_buffer ( perm = os_getperm((const char *)curbuf->b_ffname); if (perm >= 0 && (0 # ifdef S_ISFIFO - || S_ISFIFO(perm) + || S_ISFIFO(perm) # endif # ifdef S_ISSOCK - || S_ISSOCK(perm) + || S_ISSOCK(perm) # endif # ifdef OPEN_CHR_FILES - || (S_ISCHR(perm) && is_dev_fd_file(curbuf->b_ffname)) + || (S_ISCHR(perm) + && is_dev_fd_file(curbuf->b_ffname)) # endif - )) - read_fifo = TRUE; - if (read_fifo) - curbuf->b_p_bin = TRUE; + ) + ) { + read_fifo = true; + } + if (read_fifo) { + curbuf->b_p_bin = true; + } #endif if (shortmess(SHM_FILEINFO)) { msg_silent = 1; @@ -235,8 +242,9 @@ open_buffer ( #ifdef UNIX if (read_fifo) { curbuf->b_p_bin = save_bin; - if (retval == OK) - retval = read_buffer(FALSE, eap, flags); + if (retval == OK) { + retval = read_buffer(false, eap, flags); + } } #endif msg_silent = old_msg_silent; @@ -246,7 +254,7 @@ open_buffer ( fix_help_buffer(); } } else if (read_stdin) { - int save_bin = curbuf->b_p_bin; + int save_bin = curbuf->b_p_bin; /* * First read the text in binary mode into the buffer. @@ -259,14 +267,14 @@ open_buffer ( (linenr_T)0, (linenr_T)MAXLNUM, NULL, flags | (READ_NEW + READ_STDIN)); curbuf->b_p_bin = save_bin; - if (retval == OK) - retval = read_buffer(TRUE, eap, flags); - + if (retval == OK) { + retval = read_buffer(true, eap, flags); + } } /* if first time loading this buffer, init b_chartab[] */ if (curbuf->b_flags & BF_NEVERLOADED) { - (void)buf_init_chartab(curbuf, FALSE); + (void)buf_init_chartab(curbuf, false); parse_cino(curbuf); } @@ -463,8 +471,8 @@ void close_buffer(win_T *win, buf_T *buf, int action, int abort_if_last) return; } - /* When the buffer becomes hidden, but is not unloaded, trigger - * BufHidden */ + // When the buffer becomes hidden, but is not unloaded, trigger + // BufHidden if (!unload_buf) { buf->b_locked++; if (apply_autocmds(EVENT_BUFHIDDEN, buf->b_fname, buf->b_fname, false, diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 41117fdd3d..a0536d456d 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -268,7 +268,7 @@ readfile ( int filtering = (flags & READ_FILTER); int read_stdin = (flags & READ_STDIN); int read_buffer = (flags & READ_BUFFER); - int read_fifo = (flags & READ_FIFO); + int read_fifo = (flags & READ_FIFO); int set_options = newfile || read_buffer || (eap != NULL && eap->read_edit); linenr_T read_buf_lnum = 1; /* next line to read from curbuf */ @@ -471,7 +471,7 @@ readfile ( curbuf->b_p_ro = FALSE; if (newfile && !read_stdin && !read_buffer && !read_fifo) { - /* Remember time of file. */ + // Remember time of file. FileInfo file_info; if (os_fileinfo((char *)fname, &file_info)) { buf_store_file_info(curbuf, &file_info); diff --git a/src/nvim/fileio.h b/src/nvim/fileio.h index 05dd0fa2c3..8db4b89806 100644 --- a/src/nvim/fileio.h +++ b/src/nvim/fileio.h @@ -4,14 +4,14 @@ #include "nvim/buffer_defs.h" #include "nvim/os/os.h" -/* Values for readfile() flags */ -#define READ_NEW 0x01 /* read a file into a new buffer */ -#define READ_FILTER 0x02 /* read filter output */ -#define READ_STDIN 0x04 /* read from stdin */ -#define READ_BUFFER 0x08 /* read from curbuf (converting stdin) */ -#define READ_DUMMY 0x10 /* reading into a dummy buffer */ -#define READ_KEEP_UNDO 0x20 /* keep undo info */ -#define READ_FIFO 0x40 /* read from fifo or socket */ +// Values for readfile() flags +#define READ_NEW 0x01 // read a file into a new buffer +#define READ_FILTER 0x02 // read filter output +#define READ_STDIN 0x04 // read from stdin +#define READ_BUFFER 0x08 // read from curbuf (converting stdin) +#define READ_DUMMY 0x10 // reading into a dummy buffer +#define READ_KEEP_UNDO 0x20 // keep undo info +#define READ_FIFO 0x40 // read from fifo or socket #define READ_STRING(x, y) (char_u *)read_string((x), (size_t)(y)) -- cgit From c805f2cf54aa4ab066bb9e7f3d5b7cc40d04004e Mon Sep 17 00:00:00 2001 From: ckelsel Date: Mon, 10 Jul 2017 08:55:54 +0800 Subject: vim-patch:7.4.2250 Problem: Some error message cannot be translated. Solution: Enclose them in _() and N_(). (Dominique Pelle) https://github.com/vim/vim/commit/5b30291785e6b9be1a607504c14bd03c601b59a6 --- src/nvim/eval.c | 4 ++-- src/nvim/ex_cmds.c | 4 ++-- src/nvim/spell.c | 2 +- src/nvim/version.c | 2 +- src/nvim/window.c | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 7e9c006f33..e5bb7f1b38 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -12451,7 +12451,7 @@ static void f_matchadd(typval_T *argvars, typval_T *rettv, FunPtr fptr) return; } if (id >= 1 && id <= 3) { - EMSGN("E798: ID is reserved for \":match\": %" PRId64, id); + EMSGN(_("E798: ID is reserved for \":match\": %" PRId64), id); return; } @@ -12508,7 +12508,7 @@ static void f_matchaddpos(typval_T *argvars, typval_T *rettv, FunPtr fptr) // id == 3 is ok because matchaddpos() is supposed to substitute :3match if (id == 1 || id == 2) { - EMSGN("E798: ID is reserved for \"match\": %" PRId64, id); + EMSGN(_("E798: ID is reserved for \"match\": %" PRId64), id); return; } diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index b550e9a9c6..a534a476df 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5024,7 +5024,7 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *tagfname, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { if (!got_int) - EMSG2("E151: No match: %s", NameBuff); + EMSG2(_("E151: No match: %s"), NameBuff); return; } @@ -5223,7 +5223,7 @@ static void do_helptags(char_u *dirname, bool add_help_tags) if (gen_expand_wildcards(1, buff_list, &filecount, &files, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { - EMSG2("E151: No match: %s", NameBuff); + EMSG2(_("E151: No match: %s"), NameBuff); xfree(dirname); return; } diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 715228cb4b..42c9bcc0ee 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -2068,7 +2068,7 @@ char_u *did_set_spelllang(win_T *wp) // destroying the buffer we are using... if (!bufref_valid(&bufref)) { ret_msg = - (char_u *)"E797: SpellFileMissing autocommand deleted buffer"; + (char_u *)N_("E797: SpellFileMissing autocommand deleted buffer"); goto theend; } } diff --git a/src/nvim/version.c b/src/nvim/version.c index 0713684303..a1a06f0e7c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -194,7 +194,7 @@ static const int included_patches[] = { // 2253 NA // 2252 NA 2251, - // 2250, + 2250, 2249, 2248, // 2247 NA diff --git a/src/nvim/window.c b/src/nvim/window.c index 43af2e5e4f..079e0647e1 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -5532,8 +5532,8 @@ int match_add(win_T *wp, const char *const grp, const char *const pat, return -1; } if (id < -1 || id == 0) { - EMSGN("E799: Invalid ID: %" PRId64 - " (must be greater than or equal to 1)", + EMSGN(_("E799: Invalid ID: %" PRId64 + " (must be greater than or equal to 1)"), id); return -1; } @@ -5541,7 +5541,7 @@ int match_add(win_T *wp, const char *const grp, const char *const pat, cur = wp->w_match_head; while (cur != NULL) { if (cur->id == id) { - EMSGN("E801: ID already taken: %" PRId64, id); + EMSGN(_("E801: ID already taken: %" PRId64), id); return -1; } cur = cur->next; @@ -5706,8 +5706,8 @@ int match_delete(win_T *wp, int id, int perr) if (id < 1) { if (perr == TRUE) - EMSGN("E802: Invalid ID: %" PRId64 - " (must be greater than or equal to 1)", + EMSGN(_("E802: Invalid ID: %" PRId64 + " (must be greater than or equal to 1)"), id); return -1; } @@ -5717,7 +5717,7 @@ int match_delete(win_T *wp, int id, int perr) } if (cur == NULL) { if (perr == TRUE) - EMSGN("E803: ID not found: %" PRId64, id); + EMSGN(_("E803: ID not found: %" PRId64), id); return -1; } if (cur == prev) -- cgit From 06f4b963222efd2a986e79b7390b50d6e42941be Mon Sep 17 00:00:00 2001 From: ckelsel Date: Tue, 11 Jul 2017 08:27:05 +0800 Subject: lint --- src/nvim/ex_cmds.c | 3 ++- src/nvim/window.c | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index a534a476df..0987cb3915 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5023,8 +5023,9 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *tagfname, if (gen_expand_wildcards(1, buff_list, &filecount, &files, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { - if (!got_int) + if (!got_int) { EMSG2(_("E151: No match: %s"), NameBuff); + } return; } diff --git a/src/nvim/window.c b/src/nvim/window.c index 079e0647e1..29f5412ba0 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -5533,7 +5533,7 @@ int match_add(win_T *wp, const char *const grp, const char *const pat, } if (id < -1 || id == 0) { EMSGN(_("E799: Invalid ID: %" PRId64 - " (must be greater than or equal to 1)"), + " (must be greater than or equal to 1)"), id); return -1; } @@ -5705,10 +5705,11 @@ int match_delete(win_T *wp, int id, int perr) int rtype = SOME_VALID; if (id < 1) { - if (perr == TRUE) + if (perr) { EMSGN(_("E802: Invalid ID: %" PRId64 - " (must be greater than or equal to 1)"), + " (must be greater than or equal to 1)"), id); + } return -1; } while (cur != NULL && cur->id != id) { @@ -5716,8 +5717,9 @@ int match_delete(win_T *wp, int id, int perr) cur = cur->next; } if (cur == NULL) { - if (perr == TRUE) + if (perr) { EMSGN(_("E803: ID not found: %" PRId64), id); + } return -1; } if (cur == prev) -- cgit From 06ec15121a4da439684cfa1909d920c3f22f2894 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 8 Apr 2017 22:50:50 -0400 Subject: Bump Vim version to 8.0 and applied patches --- src/nvim/version.c | 2860 +++++++++++----------------------------------------- src/nvim/version.h | 8 +- 2 files changed, 576 insertions(+), 2292 deletions(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index 5f83dd1fd0..75b09bcee7 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -77,2372 +77,656 @@ static char *features[] = { // clang-format off static const int included_patches[] = { - // 2367,NA - // 2366 NA - // 2365 NA - // 2364,NA - // 2363 NA - 2362, - // 2361 NA - 2360, - 2359, - // 2358 NA - 2357, - 2356, - 2355, - 2354, - 2353, - // 2352 NA - // 2351 NA - // 2350, - 2349, - 2348, - 2347, - 2346, - // 2345 NA - // 2344 NA - 2343, - // 2342 NA - 2341, - // 2340 NA - 2339, - // 2338 NA - 2337, - 2336, - 2335, - 2334, - 2333, - 2332, - 2331, - 2330, - 2329, - 2328, - // 2327 NA - 2326, - // 2325 NA - 2324, - 2323, - 2322, - 2321, - 2320, - // 2319 NA - 2318, - 2317, - // 2316 NA - 2315, - 2314, - 2313, - 2312, - // 2311 NA - // 2310 NA - 2309, - // 2308 NA - 2307, - 2306, - 2305, - 2304, - 2303, - // 2302 NA - // 2301 NA - 2300, - 2299, - // 2298 NA - // 2297 NA - 2296, - 2295, - 2294, - 2293, - 2292, - 2291, - // 2290 NA - // 2289 NA - // 2288 NA - // 2287 NA - // 2286 NA - // 2285 NA - 2284, - 2283, - // 2282 NA - 2281, - 2280, - 2279, - // 2278 NA - 2277, - 2276, - 2275, - 2274, - 2273, - 2272, - // 2271 NA - // 2270 NA - 2269, - 2268, - // 2267 NA - 2266, - 2265, - 2264, - 2263, - // 2262 NA - // 2261 NA - // 2260 NA - 2259, - // 2258 NA - // 2257 NA - 2256, - 2255, - // 2254 NA - // 2253 NA - // 2252 NA - 2251, - 2250, - 2249, - 2248, - // 2247 NA - 2246, - 2245, - 2244, - // 2243 NA - 2242, - 2241, - 2240, - 2239, - // 2238 NA - 2237, - 2236, - 2235, - // 2234 NA - 2233, - // 2232 NA - 2231, - 2230, - 2229, - 2228, - 2227, - 2226, - 2225, - 2224, - 2223, - 2222, - 2221, - 2220, - 2219, - // 2218 NA - 2217, - // 2216 NA - 2215, - // 2214 NA - 2213, - 2212, - // 2211 NA - // 2210 NA - 2209, - 2208, - // 2207 NA - // 2206 NA - 2205, - 2204, - // 2203 NA - // 2202 NA - 2201, - 2200, - // 2199 NA - // 2198 NA - 2197, - 2196, - // 2195 NA - 2194, - // 2193 NA - // 2192 NA - // 2191 NA - 2190, - 2189, - 2188, - 2187, - // 2186 NA - 2185, - 2184, - 2183, - // 2182 NA - // 2181 NA - 2180, - 2179, - 2178, - 2177, - // 2176 NA - 2175, - 2174, - 2173, - 2172, - // 2171 NA - 2170, - 2169, - // 2168 NA - // 2167 NA - // 2166 NA - 2165, - 2164, - 2163, - 2162, - 2161, - 2160, - 2159, - 2158, - // 2157 NA - // 2156 NA - // 2155 NA - // 2154 NA - // 2153 NA - 2152, - 2151, - // 2150 NA - 2149, - 2148, - 2147, - 2146, - // 2145 NA - 2144, - 2143, - 2142, - 2141, - // 2140 NA - 2139, - // 2138 NA - 2137, - 2136, - 2135, - 2134, - // 2133 NA - // 2132 NA - // 2131 NA - // 2130 NA - // 2129 NA - 2128, - 2127, - 2126, - // 2125 NA - 2124, - 2123, - // 2122 NA - 2121, - 2120, - 2119, - // 2118 NA - 2117, - // 2116 NA - // 2115 NA - // 2114 NA - 2113, - 2112, - // 2111 NA - 2110, - 2109, - // 2108 NA - 2107, - 2106, - // 2105 NA - 2104, - 2103, - // 2102 NA - 2101, - 2100, - 2099, - 2098, - 2097, - 2096, - 2095, - // 2094 NA - // 2093 NA - // 2092 NA - // 2091 NA - 2090, - // 2089 NA - 2088, - 2087, - 2086, - 2085, - 2084, - // 2083 NA - 2082, - 2081, - // 2080 NA - // 2079 NA - // 2078 NA - 2077, - 2076, - 2075, - 2074, - // 2073 NA - 2072, - 2071, - // 2070 NA - 2069, - 2068, - 2067, - 2066, - 2065, - 2064, - // 2063 NA - 2062, - 2061, - // 2060 NA - // 2059 NA - // 2058 NA - // 2057 NA - // 2056 NA - // 2055 NA - // 2054 NA - // 2053 NA - // 2052 NA - 2051, - 2050, - 2049, - // 2048 NA - 2047, - 2046, - // 2045 NA - 2044, - 2043, - // 2042 NA - // 2041 NA - // 2040 NA - // 2039 NA - // 2038 NA - // 2037 NA - 2036, - // 2035 NA - // 2034 NA - 2033, - // 2032 NA - 2031, - // 2030 NA - 2029, - 2028, - // 2027 NA - // 2026 NA - // 2025 NA - 2024, - 2023, - 2022, - 2021, - // 2020 NA - 2019, - 2018, - 2017, - // 2016 NA - 2015, - 2014, - 2013, - 2012, - 2011, - 2010, - 2009, - 2008, - 2007, - 2006, - 2005, - // 2004 NA - // 2003 NA - 2002, - // 2001 NA - 2000, - 1999, - // 1998 NA - 1997, - 1996, - // 1995 NA - 1994, - 1993, - 1992, - 1991, - 1990, - 1989, - // 1988 NA - // 1987 NA - 1986, - // 1985 NA - 1984, - // 1983 NA - // 1982 NA - 1981, - 1980, - 1979, - 1978, - 1977, - 1976, - 1975, - // 1974 NA - 1973, - // 1972 NA - 1971, - 1970, - // 1969 NA - 1968, - 1967, - 1966, - // 1965 NA - 1964, - // 1963 NA - 1962, - 1961, - 1960, - // 1959 NA - // 1958 NA - // 1957 NA - 1956, - // 1955 NA - 1954, - 1953, - 1952, - // 1951 NA - 1950, - 1949, - 1948, - // 1947 NA - // 1946 NA - // 1945 NA - // 1944 NA - // 1943 NA - // 1942 NA - 1941, - 1940, - // 1939 NA - // 1938 NA - 1937, - // 1936 NA - // 1935 NA - // 1934 NA - // 1933 NA - // 1932 NA - // 1931 NA - // 1930 NA - // 1929 NA - 1928, - // 1927 NA - // 1926 NA - 1925, - // 1924 NA - 1923, - // 1922 NA - // 1921 NA - // 1920 NA - // 1919 NA - // 1918 NA - // 1917 NA - // 1916 NA - // 1915 NA - // 1914 NA - 1913, - 1912, - // 1911 NA - 1910, - 1909, - // 1908 NA - // 1907 NA - // 1906 NA - // 1905 NA - // 1904 NA - // 1903 NA - // 1902 NA - // 1901 NA - 1900, - // 1899 NA - 1898, - 1897, - 1896, - 1895, - 1894, - 1893, - 1892, - // 1891 NA - // 1890 NA - 1889, - // 1888 NA - // 1887 NA - // 1886 NA - // 1885 NA - 1884, - // 1883 NA - 1882, - 1881, - // 1880 NA - // 1879 NA - // 1878 NA - // 1877 NA - 1876, - 1875, - // 1874 NA - // 1873 NA - // 1872 NA - 1871, - // 1870 NA - // 1869 NA - 1868, - 1867, - 1866, - // 1865 NA - // 1864 NA - // 1863 NA - // 1862 NA - 1861, - 1860, - // 1859 NA - // 1858 NA - // 1857 NA - // 1856 NA - // 1855 NA - // 1854 NA - // 1853 NA - // 1852 NA - 1851, - // 1850 NA - // 1849 NA - // 1848 NA - 1847, - // 1846 NA - // 1845 NA - // 1844 NA - // 1843 NA - 1842, - 1841, - 1840, - 1839, - 1838, - 1837, - 1836, - 1835, - 1834, - 1833, - 1832, - 1831, - // 1830 NA - // 1829 NA - // 1828 NA - // 1827 NA - // 1826 NA - // 1825 NA - // 1824 NA - 1823, - // 1822 NA - 1821, - 1820, - // 1819 NA - 1818, - // 1817 NA - 1816, - 1815, - // 1814 NA - 1813, - // 1812 NA - // 1811 NA - // 1810 NA - 1809, - 1808, - // 1807 NA - 1806, - // 1805 NA - // 1804 NA - // 1803 NA - 1802, - // 1801 NA - // 1800 NA - 1799, - // 1798 NA - // 1797 NA - // 1796 NA - // 1795 NA - // 1794 NA - 1793, - // 1792 NA - // 1791 NA - // 1790 NA - // 1789 NA - // 1789 NA - // 1788 NA - // 1787 NA - // 1786 NA - 1785, - // 1784 NA - 1783, - 1782, - 1781, - 1780, - 1779, - // 1778 NA - // 1777 NA - // 1776 NA - // 1775 NA - // 1774 NA - // 1773 NA - // 1772 NA - // 1771 NA - // 1770 NA - // 1769 NA - 1768, - // 1767 NA - // 1766 NA - 1765, - // 1764 NA - 1763, - // 1762 NA - // 1761 NA - // 1760 NA - 1759, - 1758, - 1757, - // 1756 NA - 1755, - 1754, - 1753, - 1752, - 1751, - // 1750 NA - // 1749 NA - 1748, - // 1747 NA - // 1746 NA - // 1745 NA - // 1744 NA - // 1743 NA - 1742, - 1741, - 1740, - 1739, - 1738, - // 1737 NA - // 1736 NA - 1735, - 1734, - // 1733 NA - 1732, - // 1731 NA - 1730, - // 1729 NA - 1728, - 1727, - // 1726 NA - // 1725 NA - // 1724 NA - 1723, - // 1722 NA - // 1721 NA - // 1720 NA - 1719, - 1718, - // 1717 NA - 1716, - 1715, - 1714, - // 1713 NA - 1712, - 1711, - // 1710 NA - // 1709 NA - 1708, - 1707, - // 1706 NA - // 1705 NA - 1704, - 1703, - 1702, - 1701, - 1700, - 1699, - // 1698 NA - 1697, - 1696, - 1695, - // 1694 NA - // 1693 NA - 1692, - 1691, - // 1690 NA - // 1689 NA - // 1688 NA - // 1687 NA - 1686, - 1685, - // 1684 NA - // 1683 NA - 1682, - 1681, - // 1680 NA - 1679, - // 1678 NA - // 1677 NA - 1676, - 1675, - // 1674 NA - 1673, - // 1672 NA - 1671, - 1670, - // 1669 NA - // 1668 NA - // 1667 NA - // 1666 NA - // 1665 NA - 1664, - 1663, - // 1662 NA - // 1661 NA - 1660, - // 1659 NA - 1658, - // 1657 NA - 1656, - // 1655 NA - 1654, - // 1653 NA - 1652, - // 1651 NA - 1650, - 1649, - 1648, - 1647, - // 1646 NA - 1645, - // 1644 NA - 1643, - 1642, - 1641, - 1640, - 1639, - 1638, - // 1637 NA - // 1636 NA - // 1635 NA - 1634, - // 1633 NA - // 1632 NA - // 1631 NA - 1630, - 1629, - // 1628 NA - // 1627 NA - // 1626 NA - // 1625 NA - // 1624 NA - // 1623 NA - // 1622 NA - // 1621 NA - 1620, - 1619, - // 1618 NA - // 1617 NA - // 1616 NA - // 1615 NA - 1614, - // 1613 NA - // 1612 NA - // 1611 NA - // 1610 NA - // 1609 NA - 1608, - 1607, - 1606, - 1605, - 1604, - 1603, - // 1602 NA - // 1601 NA - // 1600 NA - // 1599 NA - // 1598 NA - // 1597 NA - 1596, - // 1595 NA - // 1594 NA - // 1593 NA - 1592, - 1591, - 1590, - 1589, - 1588, - // 1587 NA - 1586, - 1585, - // 1584 NA - // 1583 NA - 1582, - 1581, - 1580, - // 1579 NA - 1578, - 1577, - 1576, - // 1575 NA - 1574, - // 1573 NA - // 1572 NA - 1571, - 1570, - 1569, - 1568, - 1567, - // 1566 NA - 1565, - 1564, - 1563, - // 1562 NA - // 1561 NA - // 1560 NA - 1559, - 1558, - 1557, - // 1556 NA - // 1555 NA - 1554, - 1553, - 1552, - 1551, - 1550, - 1549, - 1548, - 1547, - 1546, - // 1545 NA - // 1544 NA - // 1543 NA - // 1542 NA - // 1541 NA - // 1540 NA - // 1539 NA - // 1538 NA - // 1537 NA - // 1536 NA - 1535, - // 1534 NA - 1533, - // 1532 NA - // 1531 NA - // 1530 NA - // 1529 NA - 1528, - // 1527 NA - // 1526 NA - // 1525 NA - // 1524 NA - // 1523 NA - // 1522 NA - 1521, - // 1520 NA - // 1519 NA - // 1518 NA - // 1517 NA - 1516, - // 1515 NA - // 1514 NA - 1513, - // 1512 NA - 1511, - // 1510 NA - // 1509 NA - // 1508 NA - // 1507 NA - // 1506 NA - // 1505 NA - // 1504 NA - // 1503 NA - // 1502 NA - // 1501 NA - 1500, - 1499, - // 1498 NA - // 1497 NA - // 1496 NA - // 1495 NA - 1494, - // 1493 NA - 1492, - 1491, - // 1490 NA - // 1489 NA - // 1488 NA - // 1487 NA - 1486, - // 1485 NA - // 1484 NA - // 1483 NA - // 1482 NA - // 1481 NA - 1480, - 1479, - 1478, - 1477, - // 1476 NA - // 1475 NA - // 1474 NA - // 1473 NA - // 1472 NA - // 1471 NA - // 1470 NA - // 1469 NA - 1468, - // 1467 NA - // 1466 NA - // 1465 NA - 1464, - // 1463 NA - // 1462 NA - // 1461 NA - // 1460 NA - // 1459 NA - // 1458 NA - // 1457 NA - // 1456 NA - // 1455 NA - // 1454 NA - // 1453 NA - // 1452 NA - // 1451 NA - // 1450 NA - // 1449 NA - // 1448 NA - // 1447 NA - // 1446 NA - // 1445 NA - // 1444 NA - // 1443 NA - // 1442 NA - // 1441 NA - // 1440 NA - // 1439 NA - // 1438 NA - // 1437 NA - // 1436 NA - // 1435 NA - // 1434 NA - // 1433 NA - // 1432 NA - // 1431 NA - // 1430 NA - // 1429 NA - // 1428 NA - // 1427 NA - // 1426 NA - 1425, - // 1424 NA - // 1423 NA - // 1422 NA - // 1421 NA - // 1420 NA - // 1419 NA - // 1418 NA - // 1417 NA - // 1416 NA - // 1415 NA - // 1414 NA - // 1413 NA - // 1412 NA - // 1411 NA - 1410, - // 1409 NA - // 1408 NA - // 1407 NA - 1406, - 1405, - // 1404 NA - // 1403 NA - // 1402 NA - 1401, - // 1400 NA - // 1399 NA - // 1398 NA - 1397, - 1396, - // 1395 NA - 1394, - // 1393 NA - // 1392 NA - // 1391 NA - // 1390 NA - // 1389 NA - 1388, - // 1387 NA - // 1386 NA - // 1385 NA - 1384, - // 1383 NA - // 1382 NA - // 1381 NA - // 1380 NA - // 1379 NA - // 1378 NA - // 1377 NA - // 1376 NA - // 1375 NA - // 1374 NA - // 1373 NA - // 1372 NA - // 1371 NA - // 1370 NA - // 1369 NA - // 1368 NA - // 1367 NA - 1366, - 1365, - // 1364 NA - // 1363 NA - // 1362 NA - // 1361 NA - // 1360 NA - // 1359 NA - // 1358 NA - // 1357 NA - // 1356 NA - // 1355 NA - // 1354 NA - // 1353 NA - 1352, - // 1351 NA - // 1350 NA - // 1349 NA - // 1348 NA - 1347, - 1346, - // 1345 NA - // 1344 NA - // 1343 NA - // 1342 NA - // 1341 NA - // 1340 NA - // 1339 NA - // 1338 NA - // 1337 NA - // 1336 NA - // 1335 NA - // 1334 NA - // 1333 NA - // 1332 NA - // 1331 NA - // 1330 NA - // 1329 NA - // 1328 NA - // 1327 NA - // 1326 NA - // 1325 NA - // 1324 NA - // 1323 NA - // 1322 NA - // 1321 NA - // 1320 NA - // 1319 NA - // 1318 NA - // 1317 NA - // 1316 NA - // 1315 NA - // 1314 NA - // 1313 NA - // 1312 NA - // 1311 NA - // 1310 NA - 1309, - // 1308 NA - // 1307 NA - // 1306 NA - 1305, - 1304, - // 1303 NA - // 1302 NA - // 1301 NA - // 1300 NA - // 1299 NA - // 1298 NA - // 1297 NA - 1296, - // 1295 NA - // 1294 NA - // 1293 NA - 1292, - // 1291 NA - // 1290 NA - // 1289 NA - // 1288 NA - // 1287 NA - // 1286 NA - 1285, - 1284, - // 1283 NA - 1282, - 1281, - // 1280 NA - // 1279 NA - // 1278 NA - // 1277 NA - 1276, - // 1275 NA - // 1274 NA - // 1273 NA - // 1272 NA - 1271, - // 1270 NA - 1269, - // 1268 NA - 1267, - 1266, - // 1265 NA - // 1264 NA - // 1263 NA - // 1262 NA - // 1261 NA - // 1260 NA - 1259, - // 1258 NA - // 1257 NA - // 1256 NA - // 1255 NA - // 1254 NA - // 1253 NA - // 1252 NA - // 1251 NA - // 1250 NA - // 1249 NA - // 1248 NA - // 1247 NA - // 1246 NA - // 1245 NA - // 1244 NA - // 1243 NA - // 1242 NA - // 1241 NA - // 1240 NA - // 1239 NA - // 1238 NA - 1237, - 1236, - // 1235 NA - // 1234 NA - // 1233 NA - // 1232 NA - // 1231 NA - // 1230 NA - // 1229 NA - 1228, - // 1227 NA - // 1226 NA - // 1225 NA - // 1224 NA - 1223, - // 1222 NA - // 1221 NA - // 1220 NA - // 1219 NA - // 1218 NA - // 1217 NA - // 1216 NA - // 1215 NA - // 1214 NA - // 1213 NA - // 1212 NA - // 1211 NA - // 1210 NA - // 1209 NA - // 1208 NA - // 1207 NA - // 1206 NA - // 1205 NA - // 1204 NA - // 1203 NA - // 1202 NA - // 1201 NA - // 1200 NA - // 1199 NA - // 1198 NA - // 1197 NA - // 1196 NA - // 1195 NA - // 1194 NA - // 1193 NA - // 1192 NA - // 1191 NA - // 1190 NA - // 1189 NA - // 1188 NA - // 1187 NA - // 1186 NA - // 1185 NA - // 1184 NA - // 1183 NA - // 1182 NA - 1181, - 1180, - 1179, - 1178, - // 1177 NA - // 1176 NA - // 1175 NA - // 1174 NA - 1173, - // 1172 NA - // 1171 NA - // 1170 NA - // 1169 NA - 1168, - 1167, - 1166, - // 1165 NA - 1164, - 1163, - // 1162 NA - 1161, - 1160, - // 1159 NA - // 1158 NA - 1157, - // 1156 NA - // 1155 NA - // 1154 NA - 1153, - // 1152 NA - 1151, - 1150, - 1149, - // 1148 NA - 1147, - // 1146 NA - // 1145 NA - 1144, - 1143, - 1142, - 1141, - 1140, - // 1139 NA - // 1138 NA - 1137, - 1136, - // 1135 NA - // 1134 NA - // 1133 NA - 1132, - // 1131 NA - // 1130 NA - // 1129 NA - // 1128 NA - // 1127 NA - 1126, - // 1125 NA - // 1124 NA - 1123, - // 1122 NA - 1121, - 1120, - 1119, - 1118, - 1117, - 1116, - // 1115 NA - 1114, - 1113, - 1112, - 1111, - 1110, - // 1109 NA - 1108, - 1107, - // 1106 NA - 1105, - // 1104 NA - // 1103 NA - 1102, - 1101, - // 1100 NA - // 1099 NA - // 1098 NA - // 1097 NA - 1096, - // 1095 NA - 1094, - 1093, - 1092, - 1091, - 1090, - 1089, - 1088, - 1087, - 1086, - 1085, - 1084, - // 1083 NA - // 1082 NA - 1081, - // 1080 NA - // 1079 NA - // 1078 NA - // 1077 NA - 1076, - 1075, - // 1074 NA - // 1073 NA - 1072, - 1071, - // 1070 NA - // 1069 NA - 1068, - // 1067 NA - // 1066 NA - 1065, - 1064, - // 1063 NA - // 1062 NA - 1061, - // 1060 NA - 1059, - // 1058 NA - 1057, - 1056, - 1055, - 1054, - 1053, - 1052, - 1051, - 1050, - 1049, - 1048, - 1047, - 1046, - // 1045 NA - // 1044 NA - // 1043 NA - 1042, - 1041, - // 1040 NA - // 1039 NA - // 1038 NA - 1037, - 1036, - 1035, - 1034, - // 1033 NA - 1032, - // 1031 NA - 1030, - 1029, - // 1028 NA - 1027, - // 1026 NA - // 1025 NA - // 1024 NA - // 1023 NA - // 1022 NA - // 1021 NA - // 1020 NA - // 1019 NA - 1018, - 1017, - // 1016 NA - 1015, - // 1014 NA - 1013, - // 1012 NA - // 1011 NA - // 1010 NA - // 1009 NA - // 1008 NA - 1007, - 1006, - // 1005 NA - // 1004 NA - // 1003 NA - // 1002 NA - 1001, - 1000, - // 999 NA - 998, - // 997 NA - // 996 NA - // 995 NA - // 994 NA - // 993 NA - // 992 NA - 991, - // 990 NA - 989, - // 988 NA - // 987 NA - // 986 NA - // 985 NA - 984, - // 983 NA - // 982 NA - 981, - 980, - // 979 NA - 978, - 977, - // 976 NA - 975, - 974, - 973, - 972, - // 971 NA - // 970 NA - // 969 NA - // 968 NA - // 967 NA - // 966 NA - // 965 NA - // 964 NA - 963, - // 962 NA - 961, - // 960 NA - // 959 NA - 958, - 957, - // 956 NA - 955, - // 954 NA - 953, - 952, - 951, - 950, - 949, - // 948 NA - // 947 NA - 946, - 945, - 944, - // 943 NA - 942, - 941, - // 940 NA - 939, - // 938 NA - 937, - 936, - // 935 NA - // 934 NA - 933, - 932, - // 931 NA - // 930 NA - 929, - // 928 NA - // 927 NA - 926, - 925, - // 924 NA - // 923 NA - 922, - // 921 NA - // 920 NA - // 919 NA - // 918 NA - // 917 NA - 916, - 915, - // 914 NA - // 913 NA - 912, - // 911 NA - // 910 NA - // 909 NA - // 908 NA - // 907 NA - // 906 NA - // 905 NA - 904, - 903, - // 902 NA - 901, - // 900 NA - // 899 NA - 898, - // 897 NA - 896, - 895, - // 894 NA - 893, - // 892 NA - 891, - // 890 NA - 889, - 888, - 887, - // 886 NA - 885, - // 884 NA - 883, - 882, - 881, - // 880 NA - 879, - 878, - 877, - // 876 NA - // 875 NA - // 874 NA - // 873 NA - // 872 NA - 871, - 870, - // 869 NA - 868, - // 867 NA - // 866 NA - // 865 NA - // 864 NA - // 863 NA - // 862 NA - // 861 NA - // 860 NA - 859, - 858, - 857, - 856, - // 855 NA - // 854 NA - 853, - // 852 NA - // 851 NA - // 850 NA - 849, - 848, - 847, - // 846 NA - 845, - 844, - 843, - // 842 NA - // 841 NA - // 840 NA - // 839 NA - // 838 NA - // 837 NA - 836, - 835, - 834, - 833, - 832, - 831, - 830, - // 829 NA - 828, - // 827 NA - 826, - 825, - // 824 NA - 823, - 822, - // 821 NA - 820, - 819, - 818, - 817, - 816, - 815, - 814, - 813, - // 812 NA - 811, - 810, - 809, - // 808 NA - 807, - 806, - 805, - // 804 NA - 803, - 802, - 801, - 800, - 799, - 798, - // 797 NA - // 796 NA - 795, - // 794 NA - 793, - 792, - 791, - 790, - 789, - // 788 NA - 787, - 786, - 785, - 784, - // 783 NA - 782, - 781, - 780, - 779, - 778, - // 777 NA - 776, - 775, - 774, - 773, - // 772 NA - 771, - // 770 NA - 769, - 768, - // 767 NA - // 766 NA - 765, - 764, - // 763 NA - // 762 NA - // 761 NA - 760, - // 759 NA - 758, - // 757 NA - // 756 NA - 755, - 754, - 753, - // 752 NA - // 751 NA - // 750 NA - 749, - 748, - 747, - 746, - 745, - // 744 NA - 743, - 742, - 741, - 740, - 739, - // 738 NA - 737, - 736, - // 735 NA - 734, - // 733 NA - 732, - // 731 NA - // 730 NA - 729, - // 728 NA - // 727 NA - // 726 NA - // 725 NA - // 724 NA - 723, - 722, - 721, - // 720 NA - 719, - 718, - 717, - 716, - 715, - 714, - 713, - 712, - 711, - 710, - 709, - 708, - 707, - 706, - // 705 NA - 704, - // 703 NA - 702, - // 701 NA - 700, - 699, - 698, - 697, - 696, - 695, - 694, - 693, - // 692 NA - // 691 NA - 690, - 689, - 688, - // 687 NA - 686, - 685, - // 684 NA - // 683 NA - 682, - // 681 NA - 680, - // 679 NA - // 678 NA - // 677 NA - // 676 NA - 675, - // 674 NA - 673, - 672, - 671, - 670, - // 669 NA - 668, - 667, - // 666 NA - 665, - // 664 NA - // 663 NA - 662, - // 661 NA - 660, - 659, - 658, - // 657 NA - 656, - 655, - 654, - 653, - // 652 NA - 651, - // 650 NA - 649, - // 648 NA - // 647 NA - 646, - 645, - // 644 NA - 643, - 642, - // 641 NA - 640, - 639, - // 638 NA - 637, - 636, - 635, - 634, - 633, - // 632 NA - 631, - 630, - 629, - // 628 NA - // 627 NA - // 626 NA - // 625 NA - // 624 NA - 623, - // 622 NA - // 621 NA - // 620 NA - // 619 NA - // 618 NA - 617, - 616, - 615, + 652, + // 651, + // 650, + // 649, + // 648, + // 647, + // 646, + // 645, + // 644, + // 643, + // 642, + // 641, + // 640, + // 639, + // 638, + // 637, + // 636, + // 635, + // 634, + // 633, + // 632, + // 631, + // 630, + // 629, + // 628, + // 627, + // 626, + // 625, + // 624, + // 623, + // 622, + // 621, + // 620, + // 619, + 618, + // 617, + // 616, + // 615, 614, - 613, - 612, - // 611 NA - // 610 NA - 609, - 608, - // 607 NA - 606, + // 613, + // 612, + // 611, + // 610, + // 609, + // 608, + 607, + // 606, 605, - 604, - 603, - 602, - 601, - 600, - 599, - 598, - 597, - // 596 NA - 595, - 594, - 593, - // 592 NA - // 591 NA - 590, - // 589 NA - 588, - 587, - // 586 NA - 585, - // 584 NA - // 583 NA - 582, - // 581 NA - 580, - 579, - 578, - 577, - 576, - 575, - 574, - 573, - 572, - // 571 NA - // 570 NA - 569, - 568, - 567, - 566, - 565, - // 564 NA - 563, - 562, + // 604, + // 603, + // 602, + // 601, + // 600, + // 599, + // 598, + // 597, + // 596, + // 595, + // 594, + // 593, + // 592, + // 591, + // 590, + // 589, + // 588, + // 587, + // 586, + // 585, + // 584, + // 583, + // 582, + // 581, + // 580, + // 579, + // 578, + // 577, + // 576, + // 575, + // 574, + // 573, + // 572, + 571, + // 570, + // 569, + // 568, + // 567, + // 566, + // 565, + // 564, + // 563, + // 562, 561, - // 560 NA - 559, - // 558 NA - // 557 NA - // 556 NA - // 555 NA + // 560, + // 559, + // 558, + // 557, + // 556, + 555, 554, 553, 552, - 551, + // 551, 550, - 549, - // 548 NA - 547, - 546, - 545, - // 544 NA - 543, - 542, - 541, - // 540 NA - 539, - 538, - 537, - 536, - 535, - // 534 NA - 533, - 532, - 531, - 530, - 529, - 528, - 527, - 526, - 525, - 524, - // 523 NA - // 522 NA - 521, - 520, - 519, - 518, - 517, - 516, - 515, - 514, - 513, - // 512 NA - // 511 NA - // 510 NA - // 509 NA - 508, - // 507 NA - // 506 NA - // 505 NA - // 504 NA - 503, + // 549, + // 548, + // 547, + // 546, + // 545, + // 544, + // 543, + // 542, + // 541, + // 540, + // 539, + // 538, + // 537, + // 536, + // 535, + // 534, + // 533, + // 532, + // 531, + // 530, + // 529, + // 528, + // 527, + // 526, + // 525, + // 524, + // 523, + // 522, + // 521, + // 520, + // 519, + // 518, + // 517, + // 516, + // 515, + // 514, + // 513, + // 512, + // 511, + // 510, + // 509, + // 508, + // 507, + // 506, + // 505, + // 504, + // 503, 502, - // 501 NA - 500, + // 501, + // 500, 499, - // 498 NA - 497, - // 496 NA - // 495 NA - 494, - 493, - 492, - 491, - 490, - 489, - 488, + // 498, + // 497, + // 496, + // 495, + // 494, + // 493, + // 492, + // 491, + // 490, + // 489, + // 488, 487, 486, 485, - // 484 NA + // 484, 483, - // 482 NA - // 481 NA - // 480 NA - // 479 NA + 482, + // 481, + // 480, + // 479, 478, 477, - // 476 NA - // 475 NA - 474, - 473, - 472, - // 471 NA - 470, - // 469 NA - 468, - 467, - 466, - // 465 NA - // 464 NA - 463, - 462, - // 461 NA - // 460 NA - // 459 NA - 458, + // 476, + // 475, + // 474, + // 473, + // 472, + // 471, + // 470, + // 469, + // 468, + // 467, + // 466, + 465, + // 464, + // 463, + // 462, + 461, + // 460, + 459, + // 458, 457, - 456, - 455, - 454, - // 453 NA - 452, - // 451 NA - 450, - 449, - // 448 NA - 447, - 446, - 445, - 444, - // 443 NA - 442, - 441, - 440, - 439, - 438, - 437, - 436, - 435, - 434, - 433, - // 432 NA - // 431 NA - // 430 NA - // 429 NA - // 428 NA - 427, - // 426 NA - 425, - // 424 NA - 423, - 422, - 421, - // 420 NA - 419, - 418, - 417, - 416, - 415, - 414, - // 413 NA - // 412 NA - 411, - 410, - // 409 NA + // 456, + // 455, + // 454, + 453, + // 452, + // 451, + // 450, + // 449, + // 448, + // 447, + // 446, + // 445, + // 444, + // 443, + // 442, + // 441, + // 440, + // 439, + // 438, + // 437, + // 436, + // 435, + // 434, + // 433, + // 432, + // 431, + // 430, + // 429, + // 428, + // 427, + // 426, + // 425, + // 424, + // 423, + // 422, + // 421, + // 420, + // 419, + // 418, + // 417, + // 416, + // 415, + // 414, + // 413, + // 412, + // 411, + // 410, + // 409, 408, 407, - 406, + // 406, 405, - // 404 NA - // 403 NA - // 402 NA - // 401 NA - // 400 NA - // 399 NA - // 398 NA - 397, - 396, - 395, - // 394 NA - // 393 NA - 392, - 391, + // 404, + // 403, + // 402, + // 401, + 400, + // 399, + // 398, + // 397, + // 396, + // 395, + // 394, + 393, + // 392, + // 391, 390, - 389, + // 389, 388, - 387, - 386, - // 385 NA - // 384 NA - 383, - 382, - 381, - // 380 NA - 379, + // 387, + // 386, + // 385, + // 384, + // 383, + // 382, + // 381, + // 380, + // 379, 378, 377, 376, - 375, - 374, - 373, - 372, - 371, - 370, - 369, - 368, - 367, - // 366 NA - 365, - 364, - // 363 NA - 362, - 361, + // 375, + // 374, + // 373, + // 372, + // 371, + // 370, + // 369, + // 368, + // 367, + // 366, + // 365, + // 364, + // 363, + // 362, + // 361, 360, - 359, - 358, - 357, - // 356 NA - 355, - // 354 NA + // 359, + // 358, + // 357, + // 356, + // 355, + // 354, 353, - 352, - 351, - 350, - 349, - 348, + // 352, + // 351, + // 350, + // 349, + // 348, 347, - 346, + // 346, 345, - 344, + // 344, 343, - // 342 NA + // 342, 341, - // 340 NA - 339, - 338, - 337, - 336, - 335, - 334, - // 333 NA - // 332 NA + // 340, + // 339, + // 338, + // 337, + // 336, + // 335, + // 334, + // 333, + // 332, 331, - 330, - 329, - 328, - 327, - // 326 NA - 325, - 324, - 323, - // 322 NA - // 321 NA - 320, - // 319 NA - 318, - 317, - // 316 NA - 315, - 314, - 313, - 312, - 311, - 310, - 309, - 308, - // 307 NA - 306, - 305, - // 304 NA - 303, - 302, - 301, - // 300 NA - // 299 NA - 298, + // 330, + // 329, + // 328, + // 327, + // 326, + // 325, + // 324, + // 323, + 322, + // 321, + // 320, + 319, + // 318, + // 317, + // 316, + // 315, + // 314, + // 313, + // 312, + // 311, + // 310, + // 309, + // 308, + 307, + // 306, + // 305, + // 304, + // 303, + // 302, + // 301, + // 300, + // 299, + // 298, 297, - 296, - 295, - 294, - 293, - 292, - 291, - 290, - 289, - 288, - // 287 NA - 286, - 285, - 284, - // 283 NA - 282, - 281, + // 296, + // 295, + // 294, + // 293, + // 292, + // 291, + // 290, + // 289, + // 288, + // 287, + // 286, + // 285, + // 284, + // 283, + // 282, + // 281, 280, - 279, - 278, - 277, - 276, + // 279, + // 278, + // 277, + // 276, 275, 274, - // 273 NA - 272, - // 271 NA - // 270 NA - 269, - 268, - 267, + // 273, + // 272, + // 271, + // 270, + // 269, + // 268, + // 267, 266, - 265, - 264, - // 263 NA - 262, - 261, - 260, - // 259 NA - // 258 NA - // 257 NA - 256, - // 255 NA - // 254 NA - 253, - // 252 NA - 251, - // 250 NA - 249, - 248, - 247, - // 246 NA - 245, - // 244 NA + // 265, + // 264, + // 263, + // 262, + // 261, + // 260, + 259, + // 258, + // 257, + // 256, + // 255, + // 254, + // 253, + // 252, + // 251, + 250, + // 249, + // 248, + // 247, + // 246, + // 245, + // 244, 243, - 242, - 241, - 240, - 239, - // 238 NA - 237, - 236, - 235, - 234, - 233, - 232, - 231, - 230, + // 242, + // 241, + // 240, + // 239, + // 238, + // 237, + // 236, + // 235, + // 234, + // 233, + // 232, + // 231, + // 230, 229, - // 228 NA - // 227 NA - 226, - // 225 NA - // 224 NA - // 223 NA - // 222 NA - 221, - 220, + // 228, + // 227, + // 226, + // 225, + // 224, + 223, + // 222, + // 221, + // 220, 219, - 218, - // 217 NA - // 216 NA - 215, - // 214 NA - 213, - // 212 NA - 211, - 210, - 209, - // 208 NA - 207, - // 206 NA + // 218, + // 217, + // 216, + // 215, + // 214, + // 213, + // 212, + // 211, + // 210, + // 209, + 208, + // 207, + // 206, 205, - 204, - 203, - // 202 NA - 201, - // 200 NA - 199, - // 198 NA - // 197 NA - // 196 NA - // 195 NA - // 194 NA - 193, - 192, - 191, - // 190 NA - // 189 NA - // 188 NA - 187, - 186, - // 185 NA - 184, - // 183 NA - // 182 NA - 181, - // 180 NA - // 179 NA + // 204, + // 203, + // 202, + // 201, + // 200, + // 199, + // 198, + // 197, + // 196, + 195, + // 194, + // 193, + // 192, + // 191, + 190, + // 189, + // 188, + // 187, + // 186, + // 185, + // 184, + // 183, + // 182, + // 181, + // 180, + 179, 178, - // 177 NA - // 176 NA - // 175 NA - // 174 NA - 173, + 177, + 176, + // 175, + // 174, + // 173, 172, - 171, - 170, - 169, - // 168 NA + // 171, + // 170, + // 169, + 168, 167, - 166, - 165, - // 164 NA - // 163 NA - // 162 NA - // 161 NA - 160, + // 166, + // 165, + // 164, + // 163, + // 162, + // 161, + // 160, 159, 158, - 157, + // 157, 156, - 155, - 154, - 153, - 152, - 151, + // 155, + // 154, + // 153, + // 152, + // 151, 150, - 149, - 148, - 147, - 146, - 145, - 144, - 143, - 142, - 141, - 140, - 139, - 138, - 137, + // 149, + // 148, + // 147, + // 146, + // 145, + // 144, + // 143, + // 142, + // 141, + // 140, + // 139, + // 138, + // 137, 136, 135, - 134, - 133, - 132, - 131, - 130, - 129, - 128, + // 134, + // 133, + // 132, + // 131, + // 130, + // 129, + // 128, 127, - 126, - 125, - 124, - 123, - 122, + // 126, + // 125, + // 124, + // 123, + // 122, 121, - 120, - 119, - 118, - 117, + // 120, + // 119, + // 118, + // 117, 116, - 115, - 114, - 113, - 112, - 111, + // 115, + // 114, + // 113, + // 112, + // 111, 110, - 109, - 108, - 107, - 106, + // 109, + // 108, + // 107, + // 106, 105, - 104, - 103, - 102, - 101, - 100, + // 104, + // 103, + // 102, + // 101, + // 100, 99, - 98, - 97, - 96, - 95, - 94, - 93, - 92, - 91, - 90, - 89, - 88, - 87, - 86, - 85, - 84, + // 98, + // 97, + // 96, + // 95, + // 94, + // 93, + // 92, + // 91, + // 90, + // 89, + // 88, + // 87, + // 86, + // 85, + // 84, 83, - 82, - 81, - 80, - 79, - 78, - 77, - 76, - 75, - 74, - 73, - 72, - 71, - 70, - 69, + // 82, + // 81, + // 80, + // 79, + // 78, + // 77, + // 76, + // 75, + // 74, + // 73, + // 72, + // 71, + // 70, + // 69, 68, - 67, + // 67, 66, - 65, + // 65, 64, - 63, - 62, - 61, + // 63, + // 62, + // 61, 60, - 59, + // 59, 58, 57, 56, - 55, - 54, + // 55, + // 54, 53, - 52, - 51, + // 52, + // 51, 50, 49, - 48, + // 48, 47, - 46, - 45, - 44, + // 46, + // 45, + // 44, 43, 42, 41, 40, - 39, - 38, + // 39, + // 38, 37, - 36, + // 36, 35, - 34, + // 34, 33, 32, - 31, - 30, - 29, - 28, - 27, - 26, - 25, - 24, - 23, - 22, - 21, - 20, + // 31, + // 30, + // 29, + // 28, + // 27, + // 26, + // 25, + // 24, + // 23, + // 22, + // 21, + // 20, 19, - 18, - 17, - 16, - 15, - 14, - 13, - 12, - 11, - 10, - 9, + // 18, + // 17, + // 16, + // 15, + // 14, + // 13, + // 12, + // 11, + // 10, + // 9, 8, - 7, + // 7, 6, - 5, - 4, - 3, + // 5, + // 4, + // 3, 2, 1, 0 diff --git a/src/nvim/version.h b/src/nvim/version.h index a0babfb156..c10f6fa534 100644 --- a/src/nvim/version.h +++ b/src/nvim/version.h @@ -10,14 +10,14 @@ extern char* longVersion; // // Vim version number, name, etc. Patchlevel is defined in version.c. // -#define VIM_VERSION_MAJOR 7 -#define VIM_VERSION_MINOR 4 +#define VIM_VERSION_MAJOR 8 +#define VIM_VERSION_MINOR 0 #define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR) // used for the runtime directory name -#define VIM_VERSION_NODOT "vim74" +#define VIM_VERSION_NODOT "vim80" // swap file compatibility (max. length is 6 chars) -#define VIM_VERSION_SHORT "7.4" +#define VIM_VERSION_SHORT "8.0" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "version.h.generated.h" -- cgit From 08e4b6b4f377aa3cc9f9fd10c0049783dc1f4a94 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sat, 22 Apr 2017 21:38:58 -0400 Subject: version.c: Mark NA patches - Netbeans: 0005, 0024, 0213 - Vim-specific documentation: 0007 - Vim CI/buildsystem: 0009, 0077, 0080, 0082, 0093, 0115, 0117, 0129, 0130, 0144, 0145, 0203, 0239, 0240, 0249, 0257, 0272, 0279 - +cryptv: 0010, 0014 - Channel support: 0011, 0013, 0015, 0016, 0022, 0027, 0036, 0076, 0097, 0103, 0105, 0107, 0108, 0120, 0122, 0152, 0267, 0284 - Timer implementation: 0028, 0098 - Removing legacy support: 0029, 0070, 0109, 0241, 0246 - TUI tweaks: 0030 - viminfo: 0039 - Jobs: 0045, 0048, 0050, 0051, 0054, 0071, 0087 - Style: 0055, 0114 - VMS/Sun support: 0059, 0067, 0123, 0173 - FEAT_* ifdefs: 0061, 0065, 0138, 0139, 0161, 0192, 0193, 0199, 0211, 0217, 0221, 0260, 0276, 0281 - GUI support: 0072, 0089, 0095, 0113, 0162, 0273, 0277, 0278 - win32 fixes: 0094 - Test infrastructure: 0285, 0288, 0400 - Language bindings: 0163, 0187, 0191, 0268-0271 - Unsupported options: 0232 vim-patch:20eeb612 vim-patch:17777875 vim-patch:99c5eb4f vim-patch:294740d2 vim-patch:a4ce25bd vim-patch:7034a837 vim-patch:14a612fa vim-patch:aaeabfbc --- src/nvim/version.c | 198 ++++++++++++++++++++++++++--------------------------- 1 file changed, 99 insertions(+), 99 deletions(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index 75b09bcee7..44e9d5e26c 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -324,12 +324,12 @@ static const int included_patches[] = { 408, 407, // 406, - 405, + // 405 NA // 404, // 403, // 402, // 401, - 400, + // 400 NA // 399, // 398, // 397, @@ -441,38 +441,38 @@ static const int included_patches[] = { // 291, // 290, // 289, - // 288, + // 288 NA // 287, // 286, - // 285, - // 284, + // 285 NA + // 284 NA // 283, // 282, - // 281, + // 281 NA 280, - // 279, - // 278, - // 277, - // 276, + // 279 NA + // 278 NA + // 277 NA + // 276 NA 275, 274, - // 273, - // 272, - // 271, - // 270, - // 269, - // 268, - // 267, + // 273 NA + // 272 NA + // 271 NA + // 270 NA + // 269 NA + // 268 NA + // 267 NA 266, // 265, // 264, // 263, // 262, // 261, - // 260, + // 260 NA 259, // 258, - // 257, + // 257 NA // 256, // 255, // 254, @@ -480,24 +480,24 @@ static const int included_patches[] = { // 252, // 251, 250, - // 249, + // 249 NA // 248, // 247, - // 246, + // 246 NA // 245, // 244, 243, // 242, - // 241, - // 240, - // 239, + // 241 NA + // 240 NA + // 239 NA // 238, // 237, // 236, // 235, // 234, // 233, - // 232, + // 232 NA // 231, // 230, 229, @@ -508,17 +508,17 @@ static const int included_patches[] = { // 224, 223, // 222, - // 221, + // 221 NA // 220, 219, // 218, - // 217, + // 217 NA // 216, // 215, // 214, - // 213, + // 213 NA // 212, - // 211, + // 211 NA // 210, // 209, 208, @@ -526,23 +526,23 @@ static const int included_patches[] = { // 206, 205, // 204, - // 203, + // 203 NA // 202, // 201, // 200, - // 199, + // 199 NA // 198, // 197, // 196, 195, // 194, - // 193, - // 192, - // 191, + // 193 NA + // 192 NA + // 191 NA 190, // 189, // 188, - // 187, + // 187 NA // 186, // 185, // 184, @@ -556,7 +556,7 @@ static const int included_patches[] = { 176, // 175, // 174, - // 173, + // 173 NA 172, // 171, // 170, @@ -566,9 +566,9 @@ static const int included_patches[] = { // 166, // 165, // 164, - // 163, - // 162, - // 161, + // 163 NA + // 162 NA + // 161 NA // 160, 159, 158, @@ -577,21 +577,21 @@ static const int included_patches[] = { // 155, // 154, // 153, - // 152, + // 152 NA // 151, 150, // 149, // 148, // 147, // 146, - // 145, - // 144, + // 145 NA + // 144 NA // 143, // 142, // 141, // 140, - // 139, - // 138, + // 139 NA + // 138 NA // 137, 136, 135, @@ -599,132 +599,132 @@ static const int included_patches[] = { // 133, // 132, // 131, - // 130, - // 129, + // 130 NA + // 129 NA // 128, 127, // 126, // 125, // 124, - // 123, - // 122, + // 123 NA + // 122 NA 121, - // 120, + // 120 NA // 119, // 118, - // 117, + // 117 NA 116, - // 115, - // 114, - // 113, + // 115 NA + // 114 NA + // 113 NA // 112, // 111, 110, - // 109, - // 108, - // 107, + // 109 NA + // 108 NA + // 107 NA // 106, - 105, + // 105 NA // 104, - // 103, + // 103 NA // 102, // 101, // 100, 99, - // 98, - // 97, + // 98 NA + // 97 NA // 96, - // 95, - // 94, - // 93, + // 95 NA + // 94 NA + // 93 NA // 92, // 91, // 90, - // 89, + // 89 NA // 88, - // 87, + // 87 NA // 86, // 85, // 84, 83, - // 82, + // 82 NA // 81, - // 80, + // 80 NA // 79, // 78, - // 77, - // 76, + // 77 NA + // 76 NA // 75, // 74, // 73, - // 72, - // 71, - // 70, + // 72 NA + // 71 NA + // 70 NA // 69, 68, - // 67, + // 67 NA 66, - // 65, + // 65 NA 64, // 63, // 62, - // 61, + // 61 NA 60, - // 59, + // 59 NA 58, 57, 56, - // 55, - // 54, + // 55 NA + // 54 NA 53, // 52, - // 51, - 50, + // 51 NA + // 50 NA 49, - // 48, + // 48 NA 47, // 46, - // 45, + // 45 NA // 44, 43, 42, 41, 40, - // 39, + // 39 NA // 38, 37, - // 36, + // 36 NA 35, // 34, 33, 32, // 31, - // 30, - // 29, - // 28, - // 27, + // 30 NA + // 29 NA + // 28 NA + // 27 NA // 26, // 25, - // 24, + // 24 NA // 23, - // 22, + // 22 NA // 21, // 20, 19, // 18, // 17, - // 16, - // 15, - // 14, - // 13, + // 16 NA + // 15 NA + // 14 NA + // 13 NA // 12, - // 11, - // 10, - // 9, + // 11 NA + // 10 NA + // 9 NA 8, - // 7, + // 7 NA 6, - // 5, + // 5 NA // 4, // 3, 2, -- cgit From 8898793adeb3a82fe50da4258c30940e10ebcc9d Mon Sep 17 00:00:00 2001 From: DarkDefender Date: Sat, 15 Jul 2017 16:36:45 +0200 Subject: tui: Do not override 'termguicolors' choice (#7004) * Do not guard true color support with white list * Remove ext_bool (it is unused) Closes #7003 --- src/nvim/tui/tui.c | 86 +++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 49 deletions(-) (limited to 'src') diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index c6f4eff08f..ab78a72909 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1236,18 +1236,6 @@ static int unibi_find_ext_str(unibi_term *ut, const char *name) return -1; } -static int unibi_find_ext_bool(unibi_term *ut, const char *name) -{ - size_t max = unibi_count_ext_bool(ut); - for (size_t i = 0; i < max; i++) { - const char * n = unibi_get_ext_bool_name(ut, i); - if (n && 0 == strcmp(n, name)) { - return (int)i; - } - } - return -1; -} - /// Several entries in terminfo are known to be deficient or outright wrong, /// unfortunately; and several terminal emulators falsely announce incorrect /// terminal types. So patch the terminfo records after loading from an @@ -1389,14 +1377,21 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, // No bugs in the vanilla terminfo for our purposes. } -#define XTERM_SETAF_256 \ +// At this time (2017-07-12) it seems like all terminals that support 256 +// color codes can use semicolons in the terminal code and be fine. +// However, this is not correct according to the spec. So to reward those +// terminals that also support colons, we output the code that way on these +// specific ones. + +// using colons like ISO 8613-6:1994/ITU T.416:1993 says. +#define XTERM_SETAF_256_COLON \ "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38:5:%p1%d%;m" -#define XTERM_SETAB_256 \ +#define XTERM_SETAB_256_COLON \ "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48:5:%p1%d%;m" - // "standard" means using colons like ISO 8613-6:1994/ITU T.416:1993 says. -#define XTERM_SETAF_256_NONSTANDARD \ + +#define XTERM_SETAF_256 \ "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m" -#define XTERM_SETAB_256_NONSTANDARD \ +#define XTERM_SETAB_256 \ "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m" #define XTERM_SETAF_16 \ "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e39%;m" @@ -1410,8 +1405,8 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, // more on this. if (true_xterm || iterm || iterm_pretending_xterm) { unibi_set_num(ut, unibi_max_colors, 256); - unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF_256); - unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB_256); + unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF_256_COLON); + unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB_256_COLON); } else if (konsole || xterm || gnome || rxvt || st || putty || linuxvt // Linux 4.8+ supports 256-colour SGR. || mate_pretending_xterm || gnome_pretending_xterm @@ -1420,8 +1415,8 @@ static void patch_terminfo_bugs(TUIData *data, const char *term, || (term && strstr(term, "256")) ) { unibi_set_num(ut, unibi_max_colors, 256); - unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF_256_NONSTANDARD); - unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB_256_NONSTANDARD); + unibi_set_str(ut, unibi_set_a_foreground, XTERM_SETAF_256); + unibi_set_str(ut, unibi_set_a_background, XTERM_SETAB_256); } } // Terminals where there is actually 16-colour SGR support despite what @@ -1536,26 +1531,20 @@ static void augment_terminfo(TUIData *data, const char *term, const char *colorterm, long vte_version, bool konsole, bool iterm_env) { unibi_term *ut = data->ut; - const char * xterm_version = os_getenv("XTERM_VERSION"); bool xterm = terminfo_is_term_family(term, "xterm"); bool dtterm = terminfo_is_term_family(term, "dtterm"); - bool linuxvt = terminfo_is_term_family(term, "linux"); bool rxvt = terminfo_is_term_family(term, "rxvt"); bool teraterm = terminfo_is_term_family(term, "teraterm"); bool putty = terminfo_is_term_family(term, "putty"); bool screen = terminfo_is_term_family(term, "screen"); - bool tmux = terminfo_is_term_family(term, "tmux"); - bool st = terminfo_is_term_family(term, "st"); - bool gnome = terminfo_is_term_family(term, "gnome") - || terminfo_is_term_family(term, "vte"); bool iterm = terminfo_is_term_family(term, "iterm") || terminfo_is_term_family(term, "iTerm.app"); // None of the following work over SSH; see :help TERM . bool iterm_pretending_xterm = xterm && iterm_env; - bool true_xterm = xterm && !!xterm_version; bool tmux_wrap = screen && !!os_getenv("TMUX"); - bool old_truecolor_env = colorterm - && (0 == strcmp(colorterm, "truecolor") || 0 == strcmp(colorterm, "24bit")); + + const char * xterm_version = os_getenv("XTERM_VERSION"); + bool true_xterm = xterm && !!xterm_version; // Only define this capability for terminal types that we know understand it. if (dtterm // originated this extension @@ -1576,40 +1565,37 @@ static void augment_terminfo(TUIData *data, const char *term, // them to terminal types, that do actually have such control sequences but // lack the correct definitions in terminfo, is an augmentation, not a // fixup. See https://gist.github.com/XVilka/8346728 for more about this. - int Tc = unibi_find_ext_bool(ut, "Tc"); - // "standard" means using colons like ISO 8613-6:1994/ITU T.416:1993 says. - bool has_standard_rgb = false + + // At this time (2017-07-12) it seems like all terminals that support rgb + // color codes can use semicolons in the terminal code and be fine. + // However, this is not correct according to the spec. So to reward those + // terminals that also support colons, we output the code that way on these + // specific ones. + + // can use colons like ISO 8613-6:1994/ITU T.416:1993 says. + bool has_colon_rgb = false // per GNOME bug #685759 and bug #704449 - || ((gnome || xterm) && (vte_version >= 3600)) + || (vte_version >= 3600) || iterm || iterm_pretending_xterm // per analysis of VT100Terminal.m // per http://invisible-island.net/xterm/xterm.log.html#xterm_282 || true_xterm; - bool has_non_standard_rgb = -1 != Tc - // terminfo is definitive if it says something. - ? unibi_get_ext_bool(ut, (size_t)Tc) - : linuxvt // Linux 4.8+ supports true-colour SGR. - || konsole // per commentary in VT102Emulation.cpp - // per http://lists.schmorp.de/pipermail/rxvt-unicode/2016q2/002261.html - || rxvt - || tmux // per experimentation - || st // per experimentation - || old_truecolor_env; + data->unibi_ext.set_rgb_foreground = unibi_find_ext_str(ut, "setrgbf"); if (-1 == data->unibi_ext.set_rgb_foreground) { - if (has_standard_rgb) { + if (has_colon_rgb) { data->unibi_ext.set_rgb_foreground = (int)unibi_add_ext_str(ut, "setrgbf", "\x1b[38:2:%p1%d:%p2%d:%p3%dm"); - } else if (has_non_standard_rgb) { + } else { data->unibi_ext.set_rgb_foreground = (int)unibi_add_ext_str(ut, "setrgbf", "\x1b[38;2;%p1%d;%p2%d;%p3%dm"); } } data->unibi_ext.set_rgb_background = unibi_find_ext_str(ut, "setrgbb"); if (-1 == data->unibi_ext.set_rgb_background) { - if (has_standard_rgb) { + if (has_colon_rgb) { data->unibi_ext.set_rgb_background = (int)unibi_add_ext_str(ut, "setrgbb", "\x1b[48:2:%p1%d:%p2%d:%p3%dm"); - } else if (has_non_standard_rgb) { + } else { data->unibi_ext.set_rgb_background = (int)unibi_add_ext_str(ut, "setrgbb", "\x1b[48;2;%p1%d;%p2%d;%p3%dm"); } @@ -1621,7 +1607,9 @@ static void augment_terminfo(TUIData *data, const char *term, // would use a tmux control sequence and an extra if(screen) test. data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str( ut, NULL, TMUX_WRAP(tmux_wrap, "\033]Pl%p1%06x\033\\")); - } else if (xterm) { + } else if (xterm || (vte_version != 0) || rxvt) { + // This seems to be supported for a long time in VTE + // urxvt also supports this data->unibi_ext.set_cursor_color = (int)unibi_add_ext_str( ut, NULL, "\033]12;#%p1%06x\007"); } -- cgit From d8fe63199f10c944312e802010bec13b5950120a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 15 Jul 2017 18:13:49 +0200 Subject: intro: change byline to "by al." (#6984) Several people have suggested that the "by Bram" byline is misleading, it implies that Bram is actively involved with the project. Up to now we left it as an homage. Bram agreed that it is misleading, and suggested a mention somewhere other than the intro. --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index 44e9d5e26c..c7b8220776 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -993,7 +993,7 @@ void intro_message(int colon) static char *(lines[]) = { N_(NVIM_VERSION_LONG), "", - N_("by Bram Moolenaar et al."), + N_("by al."), N_("Nvim is open source and freely distributable"), N_("https://neovim.io/community"), "", -- cgit