changes to build with VSI C compiler

The changes from past OpenVMS compilers are #ifdef'd VMS9
This commit is contained in:
nhmall
2023-05-22 14:43:10 -04:00
parent 2dfe4c2a27
commit 68b8e84aa3
10 changed files with 145 additions and 9 deletions

View File

@@ -9,6 +9,13 @@
#include "wintty.h"
#include "tcap.h"
#ifdef VMS9
#include <lib$routines.h>
#include <smg$routines.h>
#include <starlet.h>
#include <elfdef.h>
#endif
#include <descrip.h>
#include <iodef.h>
#ifndef __GNUC__
@@ -32,11 +39,16 @@
#include <errno.h>
#include <signal.h>
#ifndef VMS9
unsigned long lib$disable_ctrl(), lib$enable_ctrl();
unsigned long sys$assign(), sys$dassgn(), sys$qiow();
#endif
#ifndef USE_QIO_INPUT
#ifndef VMS9
unsigned long smg$create_virtual_keyboard(), smg$delete_virtual_keyboard(),
smg$read_keystroke(), smg$cancel_input();
#endif
#else
static short parse_function_key(int);
#endif
@@ -171,16 +183,16 @@ vms_getchar(void)
} else if (kb_buf == ESC || kb_buf == CSI || kb_buf == SS3) {
switch (parse_function_key((int) kb_buf)) {
case SMG$K_TRM_UP:
key = gc.Cmd.move_N;
key = gc.Cmd.dirchars[2];
break;
case SMG$K_TRM_DOWN:
key = gc.Cmd.move_S;
key = gc.Cmd.dirchars[6];
break;
case SMG$K_TRM_LEFT:
key = gc.Cmd.move_W;
key = gc.Cmd.dirchars[0];
break;
case SMG$K_TRM_RIGHT:
key = gc.Cmd.move_E;
key = gc.Cmd.dirchars[4];
break;
default:
key = ESC;
@@ -521,9 +533,11 @@ introff(void)
#ifdef TIMED_DELAY
#ifndef VMS9
extern unsigned long lib$emul(const long *, const long *, const long *,
long *);
extern unsigned long sys$schdwk(), sys$hiber();
#endif
#define VMS_UNITS_PER_SECOND 10000000L /* hundreds of nanoseconds, 1e-7 */
/* constant for conversion from milliseconds to VMS delta time (negative) */
@@ -563,7 +577,21 @@ VA_DECL(const char *, s)
VA_END();
#ifndef SAVE_ON_FATAL_ERROR
/* prevent vmsmain's exit handler byebye() from calling hangup() */
sethanguphandler((void (*)(int) )) SIG_DFL;
/* sethanguphandler((void (*)(int) )) SIG_DFL; */
sethanguphandler((SIG_RET_TYPE) SIG_DFL);
#endif
exit(EXIT_FAILURE);
}
#ifdef ENHANCED_SYMBOLS
/*
* set in tty_start_screen() and allows
* OS-specific changes that may be
* required for support of utf8.
* Currently a placeholder for VMS.
*/
void
tty_utf8graphics_fixup(void)
{
}
#endif /* ENHANCED_SYMBOLS */