home *** CD-ROM | disk | FTP | other *** search
- /* asimrst.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * unsigned asimrst( port )
- * int port; - Port 0..MAX_PORT-1
- *
- * DESCRIPTION
- *
- * Read and return static modem status from structure, and
- * reset static line modem byte to all 0's.
- *
- * Because it is not possible to differentiate between an error and the
- * status bits returned in the high order byte of the return value it is
- * necessary to return any errors in the global global variable _aserror.
- *
- * _aserror =
- *
- * Value Meaning
- * ------- --------
- * ASSUCCESS Successful (no error)
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- *
- * SIDE EFFECTS
- * static modem status bits all set to 0
- *
- * MODIFICATIONS
- * 11-09-85 ""
- * Modified for release 2.0
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- unsigned GF_CONV asimrst(port)
- int port;
- {
- struct PORT_TABLE *p;
- unsigned modemstatus;
-
- if((p=_aschkcnl(port))==NULL)
- return(0);
- modemstatus=p->modem_stat;
- p->modem_stat=0;
- return(modemstatus);
- }
-