/* voc 2.1.0 [2025/05/18] for gcc LP64 on slackware xtspaF */

#ifndef oocTextRider__h
#define oocTextRider__h

#include "SYSTEM.h"
#include "oocChannel.h"
#include "oocMsg.h"

typedef
	struct oocTextRider_ErrorContextDesc *oocTextRider_ErrorContext;

typedef
	struct oocTextRider_ErrorContextDesc { /* oocMsg_ContextDesc */
		oocMsg_StringPtr id;
	} oocTextRider_ErrorContextDesc;

import void oocTextRider_ErrorContext_GetTemplate (oocTextRider_ErrorContext context, oocMsg_Msg msg, CHAR *templ, ADDRESS templ__len);

typedef
	struct oocTextRider_ReaderDesc *oocTextRider_Reader;

typedef
	struct oocTextRider_ReaderDesc {
		oocMsg_Msg res;
		UINT32 opt;
		oocChannel_Reader byteReader;
		oocChannel_Channel base;
		CHAR eol[2];
		INT16 eolLen;
		char _prvt0[22];
	} oocTextRider_ReaderDesc;

import INT32 oocTextRider_Reader_Available (oocTextRider_Reader r);
import void oocTextRider_Reader_ClearError (oocTextRider_Reader r);
import BOOLEAN oocTextRider_Reader_Eol (oocTextRider_Reader r);
import INT32 oocTextRider_Reader_Pos (oocTextRider_Reader r);
import void oocTextRider_Reader_ReadBool (oocTextRider_Reader r, BOOLEAN *bool);
import void oocTextRider_Reader_ReadChar (oocTextRider_Reader r, CHAR *ch);
import void oocTextRider_Reader_ReadHex (oocTextRider_Reader r, INT32 *lint);
import void oocTextRider_Reader_ReadIdentifier (oocTextRider_Reader r, CHAR *s, ADDRESS s__len);
import void oocTextRider_Reader_ReadInt (oocTextRider_Reader r, INT16 *int_);
import void oocTextRider_Reader_ReadLInt (oocTextRider_Reader r, INT32 *lint);
import void oocTextRider_Reader_ReadLReal (oocTextRider_Reader r, LONGREAL *lreal);
import void oocTextRider_Reader_ReadLine (oocTextRider_Reader r, CHAR *s, ADDRESS s__len);
import void oocTextRider_Reader_ReadLn (oocTextRider_Reader r);
import void oocTextRider_Reader_ReadReal (oocTextRider_Reader r, REAL *real);
import void oocTextRider_Reader_ReadSInt (oocTextRider_Reader r, INT8 *sint);
import void oocTextRider_Reader_ReadSet (oocTextRider_Reader r, UINT32 *s);
import void oocTextRider_Reader_ReadString (oocTextRider_Reader r, CHAR *s, ADDRESS s__len);
import void oocTextRider_Reader_SetEol (oocTextRider_Reader r, CHAR *marker, ADDRESS marker__len, INT16 markerLen);
import void oocTextRider_Reader_SetOpts (oocTextRider_Reader r, UINT32 opts);
import void oocTextRider_Reader_SetPos (oocTextRider_Reader r, INT32 newPos);
#define __oocTextRider_Reader_Available(r) __SEND(__TYPEOF(r), 0, INT32(*)(oocTextRider_Reader), (r))
#define __oocTextRider_Reader_ClearError(r) __SEND(__TYPEOF(r), 1, void(*)(oocTextRider_Reader), (r))
#define __oocTextRider_Reader_Eol(r) __SEND(__TYPEOF(r), 2, BOOLEAN(*)(oocTextRider_Reader), (r))
#define __oocTextRider_Reader_Pos(r) __SEND(__TYPEOF(r), 3, INT32(*)(oocTextRider_Reader), (r))
#define __oocTextRider_Reader_ReadBool(r, bool) __SEND(__TYPEOF(r), 4, void(*)(oocTextRider_Reader, BOOLEAN*), (r, bool))
#define __oocTextRider_Reader_ReadChar(r, ch) __SEND(__TYPEOF(r), 5, void(*)(oocTextRider_Reader, CHAR*), (r, ch))
#define __oocTextRider_Reader_ReadHex(r, lint) __SEND(__TYPEOF(r), 6, void(*)(oocTextRider_Reader, INT32*), (r, lint))
#define __oocTextRider_Reader_ReadIdentifier(r, s, s__len) __SEND(__TYPEOF(r), 7, void(*)(oocTextRider_Reader, CHAR*, ADDRESS ), (r, s, s__len))
#define __oocTextRider_Reader_ReadInt(r, int) __SEND(__TYPEOF(r), 8, void(*)(oocTextRider_Reader, INT16*), (r, int))
#define __oocTextRider_Reader_ReadLInt(r, lint) __SEND(__TYPEOF(r), 9, void(*)(oocTextRider_Reader, INT32*), (r, lint))
#define __oocTextRider_Reader_ReadLReal(r, lreal) __SEND(__TYPEOF(r), 10, void(*)(oocTextRider_Reader, LONGREAL*), (r, lreal))
#define __oocTextRider_Reader_ReadLine(r, s, s__len) __SEND(__TYPEOF(r), 11, void(*)(oocTextRider_Reader, CHAR*, ADDRESS ), (r, s, s__len))
#define __oocTextRider_Reader_ReadLn(r) __SEND(__TYPEOF(r), 12, void(*)(oocTextRider_Reader), (r))
#define __oocTextRider_Reader_ReadReal(r, real) __SEND(__TYPEOF(r), 13, void(*)(oocTextRider_Reader, REAL*), (r, real))
#define __oocTextRider_Reader_ReadSInt(r, sint) __SEND(__TYPEOF(r), 14, void(*)(oocTextRider_Reader, INT8*), (r, sint))
#define __oocTextRider_Reader_ReadSet(r, s) __SEND(__TYPEOF(r), 15, void(*)(oocTextRider_Reader, UINT32*), (r, s))
#define __oocTextRider_Reader_ReadString(r, s, s__len) __SEND(__TYPEOF(r), 16, void(*)(oocTextRider_Reader, CHAR*, ADDRESS ), (r, s, s__len))
#define __oocTextRider_Reader_SetEol(r, marker, marker__len, markerLen) __SEND(__TYPEOF(r), 17, void(*)(oocTextRider_Reader, CHAR*, ADDRESS , INT16), (r, marker, marker__len, markerLen))
#define __oocTextRider_Reader_SetOpts(r, opts) __SEND(__TYPEOF(r), 18, void(*)(oocTextRider_Reader, UINT32), (r, opts))
#define __oocTextRider_Reader_SetPos(r, newPos) __SEND(__TYPEOF(r), 19, void(*)(oocTextRider_Reader, INT32), (r, newPos))

typedef
	struct oocTextRider_ScannerDesc *oocTextRider_Scanner;

typedef
	CHAR oocTextRider_String[256];

typedef
	struct oocTextRider_ScannerDesc {
		oocMsg_Msg res;
		oocTextRider_Reader r;
		oocChannel_Channel base;
		UINT32 opt;
		INT16 type;
		INT32 pos, lines, int_;
		LONGREAL real;
		CHAR char_;
		oocTextRider_String string;
		UINT32 set;
		BOOLEAN bool;
	} oocTextRider_ScannerDesc;

import INT32 oocTextRider_Scanner_Available (oocTextRider_Scanner s);
import void oocTextRider_Scanner_ClearError (oocTextRider_Scanner s);
import INT32 oocTextRider_Scanner_Pos (oocTextRider_Scanner s);
import void oocTextRider_Scanner_Scan (oocTextRider_Scanner s);
import void oocTextRider_Scanner_SetEol (oocTextRider_Scanner s, CHAR *marker, ADDRESS marker__len, INT16 markerLen);
import void oocTextRider_Scanner_SetOpts (oocTextRider_Scanner s, UINT32 opts);
import void oocTextRider_Scanner_SetPos (oocTextRider_Scanner s, INT32 pos);
#define __oocTextRider_Scanner_Available(s) __SEND(__TYPEOF(s), 0, INT32(*)(oocTextRider_Scanner), (s))
#define __oocTextRider_Scanner_ClearError(s) __SEND(__TYPEOF(s), 1, void(*)(oocTextRider_Scanner), (s))
#define __oocTextRider_Scanner_Pos(s) __SEND(__TYPEOF(s), 2, INT32(*)(oocTextRider_Scanner), (s))
#define __oocTextRider_Scanner_Scan(s) __SEND(__TYPEOF(s), 3, void(*)(oocTextRider_Scanner), (s))
#define __oocTextRider_Scanner_SetEol(s, marker, marker__len, markerLen) __SEND(__TYPEOF(s), 4, void(*)(oocTextRider_Scanner, CHAR*, ADDRESS , INT16), (s, marker, marker__len, markerLen))
#define __oocTextRider_Scanner_SetOpts(s, opts) __SEND(__TYPEOF(s), 5, void(*)(oocTextRider_Scanner, UINT32), (s, opts))
#define __oocTextRider_Scanner_SetPos(s, pos) __SEND(__TYPEOF(s), 6, void(*)(oocTextRider_Scanner, INT32), (s, pos))

typedef
	struct oocTextRider_WriterDesc *oocTextRider_Writer;

typedef
	struct oocTextRider_WriterDesc {
		oocMsg_Msg res;
		UINT32 opt;
		oocChannel_Writer byteWriter;
		oocChannel_Channel base;
		char _prvt0[4];
	} oocTextRider_WriterDesc;

import void oocTextRider_Writer_ClearError (oocTextRider_Writer w);
import INT32 oocTextRider_Writer_Pos (oocTextRider_Writer w);
import void oocTextRider_Writer_SetEol (oocTextRider_Writer w, CHAR *marker, ADDRESS marker__len, INT16 markerLen);
import void oocTextRider_Writer_SetOpts (oocTextRider_Writer w, UINT32 opts);
import void oocTextRider_Writer_SetPos (oocTextRider_Writer w, INT32 newPos);
import void oocTextRider_Writer_WriteBool (oocTextRider_Writer w, BOOLEAN bool);
import void oocTextRider_Writer_WriteChar (oocTextRider_Writer w, CHAR ch);
import void oocTextRider_Writer_WriteHex (oocTextRider_Writer w, INT32 lint, INT32 d);
import void oocTextRider_Writer_WriteInt (oocTextRider_Writer w, INT16 int_, INT32 n);
import void oocTextRider_Writer_WriteLInt (oocTextRider_Writer w, INT32 lint, INT32 n);
import void oocTextRider_Writer_WriteLReal (oocTextRider_Writer w, LONGREAL lreal, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteLRealEng (oocTextRider_Writer w, LONGREAL *lreal, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteLRealFix (oocTextRider_Writer w, LONGREAL *lreal, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteLn (oocTextRider_Writer w);
import void oocTextRider_Writer_WriteReal (oocTextRider_Writer w, REAL real, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteRealEng (oocTextRider_Writer w, REAL real, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteRealFix (oocTextRider_Writer w, REAL real, INT32 n, INT32 k);
import void oocTextRider_Writer_WriteSInt (oocTextRider_Writer w, INT8 sint, INT32 n);
import void oocTextRider_Writer_WriteSet (oocTextRider_Writer w, UINT32 s);
import void oocTextRider_Writer_WriteString (oocTextRider_Writer w, CHAR *s, ADDRESS s__len);
#define __oocTextRider_Writer_ClearError(w) __SEND(__TYPEOF(w), 0, void(*)(oocTextRider_Writer), (w))
#define __oocTextRider_Writer_Pos(w) __SEND(__TYPEOF(w), 1, INT32(*)(oocTextRider_Writer), (w))
#define __oocTextRider_Writer_SetEol(w, marker, marker__len, markerLen) __SEND(__TYPEOF(w), 2, void(*)(oocTextRider_Writer, CHAR*, ADDRESS , INT16), (w, marker, marker__len, markerLen))
#define __oocTextRider_Writer_SetOpts(w, opts) __SEND(__TYPEOF(w), 3, void(*)(oocTextRider_Writer, UINT32), (w, opts))
#define __oocTextRider_Writer_SetPos(w, newPos) __SEND(__TYPEOF(w), 4, void(*)(oocTextRider_Writer, INT32), (w, newPos))
#define __oocTextRider_Writer_WriteBool(w, bool) __SEND(__TYPEOF(w), 5, void(*)(oocTextRider_Writer, BOOLEAN), (w, bool))
#define __oocTextRider_Writer_WriteChar(w, ch) __SEND(__TYPEOF(w), 6, void(*)(oocTextRider_Writer, CHAR), (w, ch))
#define __oocTextRider_Writer_WriteHex(w, lint, d) __SEND(__TYPEOF(w), 7, void(*)(oocTextRider_Writer, INT32, INT32), (w, lint, d))
#define __oocTextRider_Writer_WriteInt(w, int, n) __SEND(__TYPEOF(w), 8, void(*)(oocTextRider_Writer, INT16, INT32), (w, int, n))
#define __oocTextRider_Writer_WriteLInt(w, lint, n) __SEND(__TYPEOF(w), 9, void(*)(oocTextRider_Writer, INT32, INT32), (w, lint, n))
#define __oocTextRider_Writer_WriteLReal(w, lreal, n, k) __SEND(__TYPEOF(w), 10, void(*)(oocTextRider_Writer, LONGREAL, INT32, INT32), (w, lreal, n, k))
#define __oocTextRider_Writer_WriteLRealEng(w, lreal, n, k) __SEND(__TYPEOF(w), 11, void(*)(oocTextRider_Writer, LONGREAL*, INT32, INT32), (w, lreal, n, k))
#define __oocTextRider_Writer_WriteLRealFix(w, lreal, n, k) __SEND(__TYPEOF(w), 12, void(*)(oocTextRider_Writer, LONGREAL*, INT32, INT32), (w, lreal, n, k))
#define __oocTextRider_Writer_WriteLn(w) __SEND(__TYPEOF(w), 13, void(*)(oocTextRider_Writer), (w))
#define __oocTextRider_Writer_WriteReal(w, real, n, k) __SEND(__TYPEOF(w), 14, void(*)(oocTextRider_Writer, REAL, INT32, INT32), (w, real, n, k))
#define __oocTextRider_Writer_WriteRealEng(w, real, n, k) __SEND(__TYPEOF(w), 15, void(*)(oocTextRider_Writer, REAL, INT32, INT32), (w, real, n, k))
#define __oocTextRider_Writer_WriteRealFix(w, real, n, k) __SEND(__TYPEOF(w), 16, void(*)(oocTextRider_Writer, REAL, INT32, INT32), (w, real, n, k))
#define __oocTextRider_Writer_WriteSInt(w, sint, n) __SEND(__TYPEOF(w), 17, void(*)(oocTextRider_Writer, INT8, INT32), (w, sint, n))
#define __oocTextRider_Writer_WriteSet(w, s) __SEND(__TYPEOF(w), 18, void(*)(oocTextRider_Writer, UINT32), (w, s))
#define __oocTextRider_Writer_WriteString(w, s, s__len) __SEND(__TYPEOF(w), 19, void(*)(oocTextRider_Writer, CHAR*, ADDRESS ), (w, s, s__len))



import ADDRESS *oocTextRider_ReaderDesc__typ;
import ADDRESS *oocTextRider_WriterDesc__typ;
import ADDRESS *oocTextRider_ScannerDesc__typ;
import ADDRESS *oocTextRider_ErrorContextDesc__typ;

import oocTextRider_Reader oocTextRider_ConnectReader (oocChannel_Channel ch);
import oocTextRider_Scanner oocTextRider_ConnectScanner (oocChannel_Channel ch);
import oocTextRider_Writer oocTextRider_ConnectWriter (oocChannel_Channel ch);
import void oocTextRider_InitReader (oocTextRider_Reader r, oocChannel_Channel ch);
import void oocTextRider_InitScanner (oocTextRider_Scanner s, oocChannel_Channel ch);
import void oocTextRider_InitWriter (oocTextRider_Writer w, oocChannel_Channel ch);
import void *oocTextRider__init(void);


#endif // oocTextRider
