Skip to content

Commit e9d1259

Browse files
arpadffySteven M. Schweda
authored andcommitted
patch 9.1.1591: VMS support can be improved
Problem: VMS support can be improved Solution: Merge chagnes from Steven M. Schweda (Zoltan) closes: #17810 Co-authored-by: Steven M. Schweda <[email protected]> Signed-off-by: Zoltan Arpadffy <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent af9a7a0 commit e9d1259

File tree

10 files changed

+1198
-612
lines changed

10 files changed

+1198
-612
lines changed

src/Make_vms.mms

Lines changed: 713 additions & 520 deletions
Large diffs are not rendered by default.

src/globals.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,6 +1694,7 @@ extern char_u *all_lflags;
16941694
# ifdef VMS
16951695
extern char_u *compiler_version;
16961696
extern char_u *compiled_arch;
1697+
extern char_u *compiled_vers;
16971698
# endif
16981699
extern char_u *compiled_user;
16991700
extern char_u *compiled_sys;

src/main.c

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,19 @@ command_line_scan(mparm_T *parmp)
20962096
{
20972097
want_argument = FALSE;
20982098
c = argv[0][argv_idx++];
2099-
#ifdef VMS
2099+
#if defined( VMS)
2100+
/* 2025-05-13 SMS
2101+
* On sufficiently recent non-VAX systems, case preservation
2102+
* of the command line is possible/routine. And quotation
2103+
* always works, and is the expected method in such cases.
2104+
* However, leaving this slash-prefix scheme available is
2105+
* nearly harmless. But note that it doesn't help with the
2106+
* case of other command-line arguments, such as file names.
2107+
* For details, see os_vms.c:vms_init().
2108+
* On VAX and old non-VAX systems, or with SET PROC/PARSE=TRAD,
2109+
* DCL upcases the command line, and the C RTL downcases it.
2110+
* I would not say "only uses upper case command lines".
2111+
*/
21002112
/*
21012113
* VMS only uses upper case command lines. Interpret "-X" as "-x"
21022114
* and "-/X" as "-X".
@@ -2106,9 +2118,12 @@ command_line_scan(mparm_T *parmp)
21062118
c = argv[0][argv_idx++];
21072119
c = TOUPPER_ASC(c);
21082120
}
2109-
else
2110-
c = TOLOWER_ASC(c);
2111-
#endif
2121+
/* Note that although DCL might upcase things, the C RTL
2122+
* will only downcase them, so there should be no need for
2123+
* the following (additional?) downcasing (which spoils the
2124+
* preserve-case results):
2125+
*/
2126+
#endif /* defined( VMS) */
21122127
switch (c)
21132128
{
21142129
case NUL: // "vim -" read from stdin
@@ -3610,9 +3625,10 @@ usage(void)
36103625
break;
36113626
mch_msg(_("\n or:"));
36123627
}
3613-
#ifdef VMS
3614-
mch_msg(_("\nWhere case is ignored prepend / to make flag upper case"));
3615-
#endif
3628+
#if defined( VMS)
3629+
mch_msg(_("\nWhere command is down-cased, prepend / (like: -/R) to treat flag as upper-case."));
3630+
mch_msg(_("\nOr, where supported, SET PROC/PARSE=EXT, or else quote upper-case material."));
3631+
#endif /* defined( VMS) */
36163632

36173633
mch_msg(_("\n\nArguments:\n"));
36183634
main_msg(_("--\t\t\tOnly file names after this"));

0 commit comments

Comments
 (0)