Skip to content

Commit 3549534

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 2a2ff9d + 8161551 commit 3549534

17 files changed

Lines changed: 263 additions & 64 deletions

runtime/doc/digraph.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ a standard meaning:
147147
Two 2 Hook
148148
Nine 9 Horn
149149

150-
Equals = Cyrillic (= used as second char)
150+
Equals = Cyrillic (= used as second char)
151151
Asterisk * Greek
152152
Percent sign % Greek/Cyrillic special
153153
Plus + smalls: Arabic, capitals: Hebrew
@@ -926,6 +926,7 @@ char digraph hex dec official name ~
926926
† /- 2020 8224 DAGGER
927927
‡ /= 2021 8225 DOUBLE DAGGER
928928
‥ .. 2025 8229 TWO DOT LEADER
929+
… ,. 2026 8230 HORIZONTAL ELLIPSIS
929930
‰ %0 2030 8240 PER MILLE SIGN
930931
′ 1' 2032 8242 PRIME
931932
″ 2' 2033 8243 DOUBLE PRIME

src/Make_vms.mms

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Vim on OpenVMS
33
#
44
# Maintainer: Zoltan Arpadffy <[email protected]>
5-
# Last change: 2016 Jul 02
5+
# Last change: 2016 Nov 04
66
#
77
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
88
# with MMS and MMK
@@ -38,7 +38,7 @@ MODEL = HUGE
3838
# GUI or terminal mode executable.
3939
# Comment out if you want just the character terminal mode only.
4040
# GUI with Motif
41-
# GUI = YES
41+
GUI = YES
4242

4343
# GUI with GTK
4444
# If you have GTK installed you might want to enable this option.
@@ -299,22 +299,22 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
299299
ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
300300
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
301301

302-
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c, crypt_zip.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
303-
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
304-
hardcopy.c hashtab.c json.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
302+
SRC = arabic.c blowfish.c buffer.c charset.c crypt.c crypt_zip.c dict.c diff.c digraph.c edit.c eval.c evalfunc.c \
303+
ex_cmds.c ex_cmds2.c ex_docmd.c ex_eval.c ex_getln.c if_cscope.c if_xcmdsrv.c farsi.c fileio.c fold.c getchar.c \
304+
hardcopy.c hashtab.c json.c list.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
305305
misc2.c move.c normal.c ops.c option.c popupmnu.c quickfix.c regexp.c search.c sha256.c\
306-
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
306+
spell.c spellfile.c syntax.c tag.c term.c termlib.c ui.c undo.c userfunc.c version.c screen.c \
307307
window.c os_unix.c os_vms.c pathdef.c \
308308
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) \
309309
$(RUBY_SRC) $(HANGULIN_SRC) $(MZSCH_SRC)
310310

311-
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj, crypt_zip.obj diff.obj digraph.obj edit.obj eval.obj \
312-
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
313-
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj main.obj mark.obj \
311+
OBJ = arabic.obj blowfish.obj buffer.obj charset.obj crypt.obj crypt_zip.obj dict.obj diff.obj digraph.obj edit.obj eval.obj \
312+
evalfunc.obj ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj if_cscope.obj \
313+
if_xcmdsrv.obj farsi.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtab.obj json.obj list.obj main.obj mark.obj \
314314
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
315315
move.obj mbyte.obj normal.obj ops.obj option.obj popupmnu.obj quickfix.obj \
316-
regexp.obj search.obj sha256.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
317-
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
316+
regexp.obj search.obj sha256.obj spell.obj spellfile.obj syntax.obj tag.obj term.obj termlib.obj \
317+
ui.obj undo.obj userfunc.obj screen.obj version.obj window.obj os_unix.obj \
318318
os_vms.obj pathdef.obj if_mzsch.obj\
319319
$(GUI_OBJ) $(PERL_OBJ) $(PYTHON_OBJ) $(TCL_OBJ) \
320320
$(RUBY_OBJ) $(HANGULIN_OBJ) $(MZSCH_OBJ)
@@ -496,6 +496,18 @@ charset.obj : charset.c vim.h [.auto]config.h feature.h os_unix.h \
496496
ascii.h keymap.h term.h macros.h structs.h regexp.h \
497497
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
498498
globals.h farsi.h arabic.h
499+
crypt.obj : crypt.c vim.h [.auto]config.h feature.h os_unix.h \
500+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
501+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
502+
globals.h farsi.h arabic.h
503+
crypt_zip.obj : crypt_zip.c vim.h [.auto]config.h feature.h os_unix.h \
504+
ascii.h keymap.h term.h macros.h option.h structs.h \
505+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
506+
proto.h globals.h farsi.h arabic.h
507+
dict.obj : dict.c vim.h [.auto]config.h feature.h os_unix.h \
508+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
509+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
510+
globals.h farsi.h arabic.h
499511
diff.obj : diff.c vim.h [.auto]config.h feature.h os_unix.h \
500512
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
501513
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -512,6 +524,10 @@ eval.obj : eval.c vim.h [.auto]config.h feature.h os_unix.h \
512524
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
513525
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
514526
arabic.h version.h
527+
evalfunc.obj : evalfunc.c vim.h [.auto]config.h feature.h os_unix.h \
528+
ascii.h keymap.h term.h macros.h option.h structs.h \
529+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
530+
proto.h globals.h farsi.h arabic.h version.h
515531
ex_cmds.obj : ex_cmds.c vim.h [.auto]config.h feature.h os_unix.h \
516532
ascii.h keymap.h term.h macros.h structs.h regexp.h \
517533
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -569,6 +585,10 @@ json.obj : json.c vim.h [.auto]config.h feature.h os_unix.h \
569585
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
570586
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
571587
arabic.h version.h
588+
list.obj : list.c vim.h [.auto]config.h feature.h os_unix.h \
589+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
590+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
591+
globals.h farsi.h arabic.h
572592
main.obj : main.c vim.h [.auto]config.h feature.h os_unix.h \
573593
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
574594
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
@@ -653,10 +673,18 @@ search.obj : search.c vim.h [.auto]config.h feature.h os_unix.h \
653673
ascii.h keymap.h term.h macros.h structs.h regexp.h \
654674
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
655675
globals.h farsi.h arabic.h
676+
sha256.obj : sha256.c vim.h [.auto]config.h feature.h os_unix.h \
677+
ascii.h keymap.h term.h macros.h option.h structs.h regexp.h gui.h \
678+
gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h proto.h \
679+
globals.h farsi.h arabic.h
656680
spell.obj : spell.c vim.h [.auto]config.h feature.h os_unix.h \
657681
ascii.h keymap.h term.h macros.h structs.h regexp.h \
658682
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
659683
globals.h farsi.h arabic.h
684+
spellfile.obj : spellfile.c vim.h [.auto]config.h feature.h os_unix.h \
685+
ascii.h keymap.h term.h macros.h option.h structs.h \
686+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
687+
proto.h globals.h farsi.h arabic.h
660688
syntax.obj : syntax.c vim.h [.auto]config.h feature.h os_unix.h \
661689
ascii.h keymap.h term.h macros.h structs.h regexp.h \
662690
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
@@ -681,6 +709,10 @@ undo.obj : undo.c vim.h [.auto]config.h feature.h os_unix.h \
681709
ascii.h keymap.h term.h macros.h structs.h regexp.h gui.h gui_beval.h \
682710
[.proto]gui_beval.pro option.h ex_cmds.h proto.h globals.h farsi.h \
683711
arabic.h
712+
userfunc.obj : userfunc.c vim.h [.auto]config.h feature.h os_unix.h \
713+
ascii.h keymap.h term.h macros.h option.h structs.h \
714+
regexp.h gui.h gui_beval.h [.proto]gui_beval.pro alloc.h ex_cmds.h spell.h \
715+
proto.h globals.h farsi.h arabic.h
684716
version.obj : version.c vim.h [.auto]config.h feature.h os_unix.h \
685717
ascii.h keymap.h term.h macros.h structs.h regexp.h \
686718
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

src/digraph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ static digr_T digraphdefault[] =
13121312
{'/', '-', 0x2020},
13131313
{'/', '=', 0x2021},
13141314
{'.', '.', 0x2025},
1315+
{',', '.', 0x2026},
13151316
{'%', '0', 0x2030},
13161317
{'1', '\'', 0x2032},
13171318
{'2', '\'', 0x2033},

src/json.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616

1717
#include "vim.h"
1818

19+
#ifdef VAX
20+
# undef FEAT_FLOAT // VAX does not handle well the Infinities
21+
#endif
22+
1923
#if defined(FEAT_EVAL) || defined(PROTO)
2024

2125
static int json_encode_item(garray_T *gap, typval_T *val, int copyID, int options);

src/macros.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
178178
/* VMS does not have lstat() */
179179
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
180+
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
180181
#else
181182
# ifndef WIN32
182183
# define mch_access(n, p) access((n), (p))

src/normal.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5747,9 +5747,13 @@ nv_ident(cmdarg_T *cap)
57475747
*/
57485748
if (cmdchar == 'K' && !kp_help)
57495749
{
5750-
/* Escape the argument properly for a shell command */
57515750
ptr = vim_strnsave(ptr, n);
5752-
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
5751+
if (kp_ex)
5752+
/* Escape the argument properly for an Ex command */
5753+
p = vim_strsave_fnameescape(ptr, FALSE);
5754+
else
5755+
/* Escape the argument properly for a shell command */
5756+
p = vim_strsave_shellescape(ptr, TRUE, TRUE);
57535757
vim_free(ptr);
57545758
if (p == NULL)
57555759
{

src/option.c

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5907,6 +5907,21 @@ set_string_option(
59075907
return r;
59085908
}
59095909

5910+
/*
5911+
* Return TRUE if "val" is a valid 'filetype' name.
5912+
* Also used for 'syntax' and 'keymap'.
5913+
*/
5914+
static int
5915+
valid_filetype(char_u *val)
5916+
{
5917+
char_u *s;
5918+
5919+
for (s = val; *s != NUL; ++s)
5920+
if (!ASCII_ISALNUM(*s) && vim_strchr((char_u *)".-_", *s) == NULL)
5921+
return FALSE;
5922+
return TRUE;
5923+
}
5924+
59105925
/*
59115926
* Handle string options that need some action to perform when changed.
59125927
* Returns NULL for success, or an error message for an error.
@@ -6324,8 +6339,11 @@ did_set_string_option(
63246339
#ifdef FEAT_KEYMAP
63256340
else if (varp == &curbuf->b_p_keymap)
63266341
{
6327-
/* load or unload key mapping tables */
6328-
errmsg = keymap_init();
6342+
if (!valid_filetype(*varp))
6343+
errmsg = e_invarg;
6344+
else
6345+
/* load or unload key mapping tables */
6346+
errmsg = keymap_init();
63296347

63306348
if (errmsg == NULL)
63316349
{
@@ -7322,6 +7340,22 @@ did_set_string_option(
73227340
}
73237341
#endif
73247342

7343+
#ifdef FEAT_AUTOCMD
7344+
else if (gvarp == &p_ft)
7345+
{
7346+
if (!valid_filetype(*varp))
7347+
errmsg = e_invarg;
7348+
}
7349+
#endif
7350+
7351+
#ifdef FEAT_SYN_HL
7352+
else if (gvarp == &p_syn)
7353+
{
7354+
if (!valid_filetype(*varp))
7355+
errmsg = e_invarg;
7356+
}
7357+
#endif
7358+
73257359
/* Options that are a list of flags. */
73267360
else
73277361
{

src/os_unix.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ mch_inchar(
501501
/* no character available */
502502
#if !(defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H))
503503
/* estimate the elapsed time */
504-
elapsed += wait_time;
504+
elapsed_time += wait_time;
505505
#endif
506506

507507
if (do_resize /* interrupted by SIGWINCH signal */
@@ -2646,7 +2646,7 @@ fname_case(
26462646
DIR *dirp;
26472647
struct dirent *dp;
26482648

2649-
if (lstat((char *)name, &st) >= 0)
2649+
if (mch_lstat((char *)name, &st) >= 0)
26502650
{
26512651
/* Open the directory where the file is located. */
26522652
slash = vim_strrchr(name, '/');
@@ -2679,7 +2679,7 @@ fname_case(
26792679
vim_strncpy(newname, name, MAXPATHL);
26802680
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name,
26812681
MAXPATHL - (tail - name));
2682-
if (lstat((char *)newname, &st2) >= 0
2682+
if (mch_lstat((char *)newname, &st2) >= 0
26832683
&& st.st_ino == st2.st_ino
26842684
&& st.st_dev == st2.st_dev)
26852685
{
@@ -3042,7 +3042,7 @@ mch_isrealdir(char_u *name)
30423042

30433043
if (*name == NUL) /* Some stat()s don't flag "" as an error. */
30443044
return FALSE;
3045-
if (lstat((char *)name, &statb))
3045+
if (mch_lstat((char *)name, &statb))
30463046
return FALSE;
30473047
#ifdef _POSIX_SOURCE
30483048
return (S_ISDIR(statb.st_mode) ? TRUE : FALSE);
@@ -4104,6 +4104,7 @@ mch_call_shell(
41044104
int tmode = cur_tmode;
41054105
#ifdef USE_SYSTEM /* use system() to start the shell: simple but slow */
41064106
char_u *newcmd; /* only needed for unix */
4107+
int x;
41074108

41084109
out_flush();
41094110
#ifdef FEAT_GUI_MACVIM

src/os_unix.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
# ifdef VMS
7676
# define mch_remove(x) delete((char *)(x))
7777
# define vim_mkdir(x, y) mkdir((char *)(x), y)
78-
# ifdef VAX
79-
# else
80-
# define mch_rmdir(x) rmdir((char *)(x))
81-
# endif
8278
# else
8379
# define vim_mkdir(x, y) mkdir((char *)(x), y)
8480
# define mch_rmdir(x) rmdir((char *)(x))

src/os_vms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,8 @@ struct typeahead_st {
726726
RealWaitForChar(
727727
int fd UNUSED, /* always read from iochan */
728728
long msec,
729-
int *check_for_gpm UNUSED)
729+
int *check_for_gpm UNUSED,
730+
int *interrupted)
730731
{
731732
int status;
732733
struct _generic_64 time_curr;

0 commit comments

Comments
 (0)