/* $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"$Header: alarm.h 1.4 89/10/10 $@(#)head:alarm.h	1.3"

#ifndef	_ALARM_H_
/*	3.0 SID #	1.1	*/
/*
 * Hardware bits
 */
#define DTR   00002	/* Data Terminal Ready (primary alarm) */
#define R2S   00004	/* Request to Send (clear signal) */
#define RCT   00010	/* Secondary Transmit Data (auxiliary alarm) */
#define RCR   02000	/* Secondary Received Data (primary alarm status) */
#define C2S  020000	/* Clear to Send (auxiliary alarm status) */
#define RCHAR   063	/* The "reset character" */

/*
 * Function codes
 */
#define ALPRI   002000  /* Primary set, and test mask */
#define ALAUX   020000  /* Auxiliary set, and test mask */
#define ALTIME  000377  /* Timeout delay value mask */
#define ALSET   001000  /* Set timer delay */
#define ALRESET 004000  /* Restart watchdog timer */
#define ALCLEAR 010000  /* Clear all alarms */

struct sgtty alsgtty;

#define alrmopn(name)	(alfildes = open(name,2))
#define alrmclo()	close(alfildes)
#define alrm(cmd) \
	(&alsgtty->sg_flags = cmd, stty(alfildes, &alsgtty), &alsgtty->sg_flags)

#define	_ALARM_H_
#endif	/* _ALARM_H_ */
