aboutsummaryrefslogtreecommitdiff
path: root/src/nio.h
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-28 07:26:46 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-28 07:26:46 -0400
commit87b234ba73e9abb4ecb8966ef631a0d7b8f5915a (patch)
tree8435c18071937d092e3265bb4c708caab24b9135 /src/nio.h
parent898cfeb8a558245fc48bbba948c16205509e6a11 (diff)
downloadfujinet-chat-87b234ba73e9abb4ecb8966ef631a0d7b8f5915a.tar.gz
Save some more bytes (strip down nio.c API).
Diffstat (limited to 'src/nio.h')
-rw-r--r--src/nio.h51
1 files changed, 6 insertions, 45 deletions
diff --git a/src/nio.h b/src/nio.h
index bc63da8..63b4997 100644
--- a/src/nio.h
+++ b/src/nio.h
@@ -22,51 +22,12 @@
#define DVSTAT_PROTOCOL 2
#define DVSTAT_EXTENDED_ERROR 3
-/**
- * Open N: device with devicespec
- * @param devicespec - an N: device spec, e.g. N:TCP://FOO.COM:1234/
- * @param translation mode, 0=none, 1=cr, 2=lf, 3=cr/lf
- * @return error code, or 1 if successful.
- */
-unsigned char nopen(char* devicespec, unsigned char trans);
-
-/**
- * Close N: device with devicespec
- * @param devicespec - an N: device spec to close (the unit number is extracted)
- * @return error code, or 1 if successful.
- */
-unsigned char nclose(char* devicespec);
-
-/**
- * Get status of specific N: device
- * @param devicespec - an N: device spec to status (the unit number is extracted)
- * @return error code, or 1 if successful, DVSTAT is also filled with status info.
- *
- * Format of DVSTAT:
- * OS.dcb.dvstat[0] = # of bytes waiting LO
- * OS.dcb.dvstat[1] = # of bytes waiting HI
- * OS.dcb.dvstat[2] = reserved
- * OS.dcb.dvstat[3] = Error code of last I/O operation. !1 = error.
- */
-unsigned char nstatus(char* devicespec);
-
-/**
- * Read # of bytes from specific N: device.
- * @param devicespec - an N: device spec to read bytes from.
- * @param buf - The buffer to read into, must be at least as big as len.
- * @param len - The # of bytes to read (up to 65535)
- * @return error code, or 1 if successful, buf is filled with data.
- */
-unsigned char nread(char* devicespec, unsigned char* buf, unsigned short len);
-
-/**
- * Write # of bytes to specific N: device.
- * @param devicespec - an N: device spec to write to.
- * @param buf - The buffer to write to device, should be at least as big as len.
- * @param len - The # of bytes to write (up to 65535)
- * @return error code, or 1 if successful, buf is filled with data.
- */
-unsigned char nwrite(char* devicespec, unsigned char* buf, unsigned short len);
+char nopen(void);
+char nclose(void);
+char nstatus(void);
+char nread(char *buf, unsigned short len);
+char nwrite(char *buf, unsigned short len);
+char nreset(void);
/**
* Send username and password credentials