mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 07:32:24 +00:00
Update bootstrap C source files.
This commit is contained in:
parent
ee01f97392
commit
b1b4d6b602
20 changed files with 110 additions and 9 deletions
|
|
@ -48,6 +48,7 @@ typedef
|
|||
} Files_Rider;
|
||||
|
||||
|
||||
export INT16 Files_MaxPathLength, Files_MaxNameLength;
|
||||
static Files_FileDesc *Files_files;
|
||||
static INT16 Files_tempno;
|
||||
static CHAR Files_HOME[1024];
|
||||
|
|
@ -1082,5 +1083,7 @@ export void *Files__init(void)
|
|||
Heap_FileCount = 0;
|
||||
Files_HOME[0] = 0x00;
|
||||
Platform_GetEnv((CHAR*)"HOME", 5, (void*)Files_HOME, 1024);
|
||||
Files_MaxPathLength = Platform_MaxPathLength();
|
||||
Files_MaxNameLength = Platform_MaxNameLength();
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ typedef
|
|||
} Files_Rider;
|
||||
|
||||
|
||||
import INT16 Files_MaxPathLength, Files_MaxNameLength;
|
||||
|
||||
import ADDRESS *Files_FileDesc__typ;
|
||||
import ADDRESS *Files_Rider__typ;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ export BOOLEAN Platform_Inaccessible (INT16 e);
|
|||
export BOOLEAN Platform_Interrupted (INT16 e);
|
||||
export BOOLEAN Platform_IsConsole (INT32 h);
|
||||
export void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
|
||||
export INT16 Platform_MaxNameLength (void);
|
||||
export INT16 Platform_MaxPathLength (void);
|
||||
export INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
|
||||
export BOOLEAN Platform_NoSuchDirectory (INT16 e);
|
||||
export INT32 Platform_OSAllocate (INT32 size);
|
||||
|
|
@ -88,6 +90,7 @@ export BOOLEAN Platform_getEnv (CHAR *var, ADDRESS var__len, CHAR *val, ADDRESS
|
|||
#define Platform_ETIMEDOUT() WSAETIMEDOUT
|
||||
#define Platform_GetConsoleMode(h, m) GetConsoleMode((HANDLE)h, (DWORD*)m)
|
||||
#define Platform_GetTickCount() (LONGINT)(UINT32)GetTickCount()
|
||||
#define Platform_MAXPATH() MAX_PATH
|
||||
#define Platform_SetConsoleMode(h, m) SetConsoleMode((HANDLE)h, (DWORD)m)
|
||||
#define Platform_SetInterruptHandler(h) SystemSetInterruptHandler((ADDRESS)h)
|
||||
#define Platform_SetQuitHandler(h) SystemSetQuitHandler((ADDRESS)h)
|
||||
|
|
@ -191,6 +194,16 @@ BOOLEAN Platform_Interrupted (INT16 e)
|
|||
return e == Platform_EINTR();
|
||||
}
|
||||
|
||||
INT16 Platform_MaxNameLength (void)
|
||||
{
|
||||
return Platform_MAXPATH();
|
||||
}
|
||||
|
||||
INT16 Platform_MaxPathLength (void)
|
||||
{
|
||||
return Platform_MAXPATH();
|
||||
}
|
||||
|
||||
INT32 Platform_OSAllocate (INT32 size)
|
||||
{
|
||||
return Platform_allocate(size);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ import BOOLEAN Platform_Inaccessible (INT16 e);
|
|||
import BOOLEAN Platform_Interrupted (INT16 e);
|
||||
import BOOLEAN Platform_IsConsole (INT32 h);
|
||||
import void Platform_MTimeAsClock (Platform_FileIdentity i, INT32 *t, INT32 *d);
|
||||
import INT16 Platform_MaxNameLength (void);
|
||||
import INT16 Platform_MaxPathLength (void);
|
||||
import INT16 Platform_New (CHAR *n, ADDRESS n__len, INT32 *h);
|
||||
import BOOLEAN Platform_NoSuchDirectory (INT16 e);
|
||||
import INT32 Platform_OSAllocate (INT32 size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue