From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM" 23-JUN-1993 13:06:28.19
To:	EVERHART
CC:	
Subj:	Re: Disable Ctrl-C and Ctrl-Y on VMS 5.5 ?

Date: Tue, 22 Jun 1993 18:20:53 +0100
From: Arne Vajhøj <ARNE@kopc.hhs.dk>
Subject: Re: Disable Ctrl-C and Ctrl-Y on VMS 5.5 ?
To: theodore@knosos.cc.uch.gr, INFO-VAX@SRI.COM
Message-id: <01GZOSK1EBF69GVHAT@kopc.hhs.dk>
X-VMS-To: IN%"theodore@knosos.cc.uch.gr"
X-VMS-Cc: IN::"INFO-VAX@SRI.COM"
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-transfer-encoding: 8BIT

> I would like some more details about calling LIB$DISABLE_CTRL inside the 
> application. We are developing our application in Ingres DBMS. We have the 
> capability to use system calls or calls to C procedures. Any examples about 
> how we could do that ?

I do not know anything about Ingres, but here is a small C example:

#include <stdio.h>
#include <lib$routines.h>
#include <libclidef.h>

void disablectrly()
{
   int val = LIB$M_CLI_CTRLY;
   lib$disable_ctrl(&val);
}

void enablectrly()
{
   int val = LIB$M_CLI_CTRLY;
   lib$enable_ctrl(&val);
}

main()
{
   char c;
   disablectrly();
   printf("You can not use CTRL/Y now\nPress return to continue ");
   c = getchar();
   printf("We continues\n");
   enablectrly();
   printf("You can use CTRL/Y now\nPress return to continue ");
   c = getchar();
   printf("We continues\n");
};

Hope it helps !

                                                          Arne

Arne Vajhøj                             local DECNET:  KO::ARNE
Computer Department                     PSI:           PSI%238310013040::ARNE
Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK


