diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-30 03:25:35 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-30 03:25:35 -0400 |
| commit | ddfe09f3b8336630dd0f87e446306bc1e012f20b (patch) | |
| tree | ecffd52c482e987099b7a03383ec62763009e4fb /src/nio.c | |
| parent | 28c0a056ce806a357371d7102fb25d72e358ff09 (diff) | |
| download | fujinet-chat-ddfe09f3b8336630dd0f87e446306bc1e012f20b.tar.gz | |
Trim down nio API (no parameter passing), now at 4852 free.
Diffstat (limited to 'src/nio.c')
| -rw-r--r-- | src/nio.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -73,23 +73,27 @@ char nstatus(void) { return OS.dvstat[DVSTAT_EXTENDED_ERROR]; // return extended status } -char nread(char *buf, unsigned short len) { +char nread_rxbuf(void) { + extern unsigned int rxbuflen; + extern char *rx_buf; set_defaults(); OS.dcb.dcomnd = 'R'; // read OS.dcb.dstats = DREAD; - OS.dcb.dbuf = buf; - OS.dcb.dbyt = OS.dcb.daux = len; // Set the buffer size AND daux with length + OS.dcb.dbuf = rx_buf; + OS.dcb.dbyt = OS.dcb.daux = rxbuflen; // Set the buffer size AND daux with length siov(); return get_status(); } -char nwrite(char *buf, unsigned short len) { +char nwrite_txbuf(void) { + extern unsigned int txbuflen; + extern char *tx_buf; set_defaults(); OS.dcb.dcomnd = 'W'; // write OS.dcb.dstats = DWRITE; - OS.dcb.dbuf = buf; - OS.dcb.dbyt = OS.dcb.daux = len; + OS.dcb.dbuf = tx_buf; + OS.dcb.dbyt = OS.dcb.daux = txbuflen; siov(); return get_status(); |
