home *** CD-ROM | disk | FTP | other *** search
- /* wgets.c
- *
- * The Greenleaf Comm Library
- *
- * Copyright (C) 1985-1990 Greenleaf Software Inc. All Rights Reserved.
- *
- * unsigned asiwgets(port,string,length,opt,stat)
- * int port; - Port 0..MAX_PORT-1
- * char *string; - String to transfer
- * unsigned length; - Maximum number of characters to transfer.
- * int opt; - Terminating character to watch for.
- * char *stat; - Array of Char for Status, NULL for none.
- *
- * DESCRIPTION
- * a string is transferred one character at a time from the receive
- * queue to the specified user buffer. The status for each character
- * is transferred to a user buffer (unless NULL is specified). Also a
- * terminating null is appended to the user buffer.
- *
- * SIDE EFFECTS
- * none
- *
- * RETURNS
- * Always returns the number of characters transferred to the user
- * buffer NOT INCLUDING the terminating null. For example if only
- * one character was received from the receive queue a null would
- * be added to the second position of the buffer and a value of 1
- * would be returned. The global variable _aserror can be examined to
- * determine if an error was detected. _aserror == 0 if no errors were
- * detected.
- *
- * _aserror =
- *
- * Value Meaning
- * ------- --------
- * ASSUCCESS port initialized (no error)
- * ASINVPORT Requested port is out of range
- * ASNOTSETUP Requested port not setup with asifirst()
- * ASINVPAR Option parameter invalid
- * ASBUFREMPTY Buffer is empty
- * ASNOWIDERX Wide Track Receive buffer is not enabled
- *
- * MODIFICATIONS
- *
- * 11-01-85 ""
- * Modified for release 2.0
- */
- #include <stdio.h>
- #include "gf.h"
- #include "asiports.h"
-
- unsigned int GF_CONV asiwgets( int port,
- char *string,
- unsigned int length,
- int opt,
- char *stat )
- {
- return( asiwgets_timed( port, string, length, opt, stat, 0 ) );
- }