home *** CD-ROM | disk | FTP | other *** search
- /* asierst.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * unsigned asierst( port )
- * int port; - Port 0..MAX_PORT-1
- *
- * DESCRIPTION
- *
- * Reset error bits in chst_bits variable. Resets: alert bit,
- * rxovflow bit, linerr bit and modchg bit.
- *
- * The user program must check the _aserror global variable to determine
- * if an error has occurred.
- *
- * _aserror =
- *
- * Value Meaning
- * ------- --------
- * ASSUCCESS Successful (no error)
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- *
- * SIDE EFFECTS
- * Reset error bits in chst_bits variable. Resets: alert bit,
- * rxovflow bit, linerr bit and modchg bit.
- *
- * MODIFICATIONS
- * 11-09-85 ""
- * Modified for release 2.0
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- unsigned GF_CONV asierst(port)
- int port;
- {
- struct PORT_TABLE *p;
- unsigned retval;
-
- if((p=_aschkcnl(port))==NULL)
- return(0);
- retval=asibstat(port);
- _ascli();
- p->chst_bits.alert=p->chst_bits.linerr=p->chst_bits.rxovflow=
- p->chst_bits.modchg=0;
- _assti();
- return(retval);
-
- }
-