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

#ifndef Platform__h
#define Platform__h

#include "SYSTEM.h"

typedef
	struct Platform_FileIdentity {
		INT64 _prvt0;
		char _prvt1[16];
	} Platform_FileIdentity;

typedef
	void (*Platform_SignalHandler)(INT32);


import BOOLEAN Platform_LittleEndian;
import INT32 Platform_PID;
import CHAR Platform_CWD[256];
import INT32 Platform_SeekSet, Platform_SeekCur, Platform_SeekEnd;
import CHAR Platform_NL[3];

import ADDRESS *Platform_FileIdentity__typ;

import BOOLEAN Platform_Absent (INT32 e);
import INT32 Platform_Chdir (CHAR *n, ADDRESS n__len);
import INT32 Platform_Close (INT64 h);
import BOOLEAN Platform_ConnectionFailed (INT32 e);
import void Platform_Delay (INT64 ms);
import BOOLEAN Platform_DifferentFilesystems (INT32 e);
import INT32 Platform_Error (void);
import void Platform_Exit (INT64 code);
import void Platform_GetClock (INT64 *t, INT64 *d);
import void Platform_GetEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len);
import void Platform_GetTimeOfDay (INT64 *sec, INT64 *usec);
import INT32 Platform_Identify (INT64 h, Platform_FileIdentity *identity, ADDRESS *identity__typ);
import INT32 Platform_IdentifyByName (CHAR *n, ADDRESS n__len, Platform_FileIdentity *identity, ADDRESS *identity__typ);
import BOOLEAN Platform_Inaccessible (INT32 e);
import BOOLEAN Platform_Interrupted (INT32 e);
import BOOLEAN Platform_IsConsole (INT64 h);
import void Platform_MTimeAsClock (Platform_FileIdentity i, INT64 *t, INT64 *d);
import INT32 Platform_MaxNameLength (void);
import INT32 Platform_MaxPathLength (void);
import INT32 Platform_New (CHAR *n, ADDRESS n__len, INT64 *h);
import BOOLEAN Platform_NoSuchDirectory (INT32 e);
import INT64 Platform_OSAllocate (INT64 size);
import void Platform_OSFree (INT64 address);
import INT32 Platform_OldRO (CHAR *n, ADDRESS n__len, INT64 *h);
import INT32 Platform_OldRW (CHAR *n, ADDRESS n__len, INT64 *h);
import INT32 Platform_Read (INT64 h, INT64 p, INT64 l, INT64 *n);
import INT32 Platform_ReadBuf (INT64 h, SYSTEM_BYTE *b, ADDRESS b__len, INT64 *n);
import INT32 Platform_Rename (CHAR *o, ADDRESS o__len, CHAR *n, ADDRESS n__len);
import BOOLEAN Platform_SameFile (Platform_FileIdentity i1, Platform_FileIdentity i2);
import BOOLEAN Platform_SameFileTime (Platform_FileIdentity i1, Platform_FileIdentity i2);
import INT32 Platform_Seek (INT64 h, INT64 offset, INT32 whence);
import void Platform_SetBadInstructionHandler (Platform_SignalHandler handler);
import void Platform_SetInterruptHandler (Platform_SignalHandler handler);
import void Platform_SetMTime (Platform_FileIdentity *target, ADDRESS *target__typ, Platform_FileIdentity source);
import void Platform_SetQuitHandler (Platform_SignalHandler handler);
import INT32 Platform_Size (INT64 h, INT64 *l);
import INT32 Platform_Sync (INT64 h);
import INT32 Platform_System (CHAR *cmd, ADDRESS cmd__len);
import INT64 Platform_Time (void);
import BOOLEAN Platform_TimedOut (INT32 e);
import BOOLEAN Platform_TooManyFiles (INT32 e);
import INT32 Platform_Truncate (INT64 h, INT64 l);
import INT32 Platform_Unlink (CHAR *n, ADDRESS n__len);
import INT32 Platform_Write (INT64 h, INT64 p, INT64 l);
import BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS val__len);
import void *Platform__init(void);


#endif // Platform
