INSTALLvms.txt: Parameter name : GUI Description : GUI or terminal mode executable Options: : YES - GUI executable Uncommented - char only Default : GUI = YES Apparently not: ITS $ mmk /descrip=Make_vms.mms copy/nolog os_vms_conf.h [.auto]config.h cc [...] ITS $ exec vim -R -g main.c E25: GUI cannot be used: Not enabled at compile time %NONAME-E-NOMSG, Message number 00000002 ITS $ mmk /descrip=Make_vms.mms /MAC = (GUI=YES) copy/nolog os_vms_conf.h [.auto]config.h using DECW/Motif environment. creating OS_VMS_MOTIF.OPT file. cc [...] Disable annoying -/R option notation (unless C macro SLOP is defined): ITS $ gdiff -u src/main.c_orig src/main.c --- src/main.c_orig 2013-07-03 05:36:49 -0500 +++ src/main.c 2017-10-11 19:54:53 -0500 @@ -1804,7 +1804,7 @@ { want_argument = FALSE; c = argv[0][argv_idx++]; -#ifdef VMS +#if defined( VMS) && defined( SLOP) /* * VMS only uses upper case command lines. Interpret "-X" as "-x" * and "-/X" as "-X". @@ -1816,7 +1816,7 @@ } else c = TOLOWER_ASC(c); -#endif +#endif /* defined( VMS) && defined( SLOP) */ switch (c) { case NUL: /* "vim -" read from stdin */ Enable DECC$ARGV_PARSE_STYLE, DECC$EFS_CASE_PRESERVE, and DECC$EFS_CHARSET, where possible: ITS $ pipe gdiff -u src/os_vms.c_orig src/os_vms.c --- src/os_vms.c_orig 2010-06-25 23:03:31 -0500 +++ src/os_vms.c 2017-10-11 20:02:15 -0500 @@ -669,3 +669,150 @@ } return ; } + + +/* + 2005-04-29 SMS. New. +*/ + +#if !defined( __VAX) && (__CRTL_VER >= 70301000) + +#include +#include + +/* Structure to hold a DECC$* feature name and its desired value. */ + +typedef struct + { + char *name; + int value; + } decc_feat_t; + +int vms_init_done = -1; + +decc_feat_t decc_feat_array[] = { + + /* Preserve command-line case with SET PROCESS/PARSE_STYLE=EXTENDED. */ + { "DECC$ARGV_PARSE_STYLE", 1 }, + + /* Preserve case for file names on ODS5 disks. */ + { "DECC$EFS_CASE_PRESERVE", 1 }, + + /* Enable multiple dots (and most characters) in ODS5 file names, + while preserving VMS-ness of ";version". */ + { "DECC$EFS_CHARSET", 1 }, + + /* List terminator. */ + { (char *)NULL, 0 } }; + + +/* + LIB$INITIALIZE initialization. + + On sufficiently recent non-VAX systems, set a collection of C RTL + features without using the DECC$* logical name method. + + + Note: Old VAX VMS versions may suffer from a linker complaint like + this: + + %LINK-W-MULPSC, conflicting attributes for psect LIB$INITIALIZE + in module LIB$INITIALIZE file SYS$COMMON:[SYSLIB]STARLET.OLB;1 + + Using a LINK options file which includes a line like this one should + stop this complaint: + + PSECT_ATTR=LIB$INITIALIZE,NOPIC +*/ + +/*--------------------------------------------------------------------*/ + +/* vms_init() + + Uses LIB$INITIALIZE to set a collection of C RTL features without + requiring the user to define the corresponding logical names. +*/ + +/* LIB$INITIALIZE initialization function. */ + +static void vms_init( void) +{ +/* Set the global flag to indicate that LIB$INITIALIZE worked. */ + +vms_init_done = 1; + +int feat_index; +int feat_value; +int feat_value_max; +int feat_value_min; +int i; +int sts; + +/* Loop through all items in the decc_feat_array[]. */ + +for (i = 0; decc_feat_array[ i].name != NULL; i++) + { + /* Get the feature index. */ + feat_index = decc$feature_get_index( decc_feat_array[ i].name); + if (feat_index >= 0) + { + /* Valid item. Collect its properties. */ + feat_value = decc$feature_get_value( feat_index, 1); + feat_value_min = decc$feature_get_value( feat_index, 2); + feat_value_max = decc$feature_get_value( feat_index, 3); + + if ((decc_feat_array[ i].value >= feat_value_min) && + (decc_feat_array[ i].value <= feat_value_max)) + { + /* Valid value. Set it if necessary. */ + if (feat_value != decc_feat_array[ i].value) + { + sts = decc$feature_set_value( feat_index, + 1, + decc_feat_array[ i].value); + } + } + else + { + /* Invalid DECC feature value. */ + printf( " INVALID DECC FEATURE VALUE, %d: %d <= %s <= %d.\n", + feat_value, + feat_value_min, decc_feat_array[ i].name, feat_value_max); + } + } + else + { + /* Invalid DECC feature name. */ + printf( " UNKNOWN DECC FEATURE: %s.\n", decc_feat_array[ i].name); + } + } +} + +/* Get "vms_init()" into a valid, loaded LIB$INITIALIZE PSECT. */ + +#pragma nostandard + +/* Establish the LIB$INITIALIZE PSECTs, with proper alignment and + other attributes. Note that "nopic" is significant only on VAX. +*/ +#pragma extern_model save + +#pragma extern_model strict_refdef "LIB$INITIALIZE" 2, nopic, nowrt +void (*const x_vms_init)() = vms_init; + +#pragma extern_model strict_refdef "LIB$INITIALIZ" 2, nopic, nowrt +const int spare[ 8] = { 0 }; + +#pragma extern_model restore + +/* Fake reference to ensure loading the LIB$INITIALIZE PSECT. */ + +#pragma extern_model save +int LIB$INITIALIZE(void); +#pragma extern_model strict_refdef +int dmy_lib$initialize = (int) LIB$INITIALIZE; +#pragma extern_model restore + +#pragma standard + +#endif /* !defined( __VAX) && (__CRTL_VER >= 70301000) */ Clear %CC-W-LONGEXTERN complaint about may_req_ambiguous_character_width in src/main.c and src/term.c: ITS $ pipe gdiff -u src/os_vms_conf.h_orig src/os_vms_conf.h --- src/os_vms_conf.h_orig 2010-07-28 12:07:48 -0500 +++ src/os_vms_conf.h 2017-10-11 22:21:26 -0500 @@ -189,3 +189,9 @@ #define USE_FONTSET #undef X_LOCALE #endif + + +/* 2017-10-11 SMS. + * %CC-W-LONGEXTERN + */ +#define may_req_ambiguous_character_width may_req_ambiguous_char_width