[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnet/engine int_proto.h, 1.87, 1.88 int_table.c, 1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnet/engine int_proto.h, 1.87, 1.88 int_table.c, 1.90, 1.91 lib_stdio.c, 1.6, 1.7 |
Date: |
Sun, 02 Nov 2003 02:48:50 +0000 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv23273/engine
Modified Files:
int_proto.h int_table.c lib_stdio.c
Log Message:
Stub out new interncalls for the "Platform.Stdio" class.
Index: lib_stdio.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_stdio.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** lib_stdio.c 29 Oct 2003 20:53:33 -0000 1.6
--- lib_stdio.c 2 Nov 2003 02:48:47 -0000 1.7
***************
*** 244,247 ****
--- 244,351 ----
}
+ /*
+ * public static void SetConsoleMode(int mode);
+ */
+ void _IL_Stdio_SetConsoleMode(ILExecThread *_thread, ILInt32 mode)
+ {
+ /* TODO */
+ }
+
+ /*
+ * public static void Beep();
+ */
+ void _IL_Stdio_Beep(ILExecThread *_thread)
+ {
+ }
+
+ /*
+ * public static void Clear();
+ */
+ void _IL_Stdio_Clear(ILExecThread *_thread)
+ {
+ }
+
+ /*
+ * public static void ReadKey(out char ch, out int key, out int modifiers);
+ */
+ void _IL_Stdio_ReadKey(ILExecThread *_thread, ILUInt16 *ch,
+ ILInt32 *key, ILInt32 *modifiers)
+ {
+ /* TODO */
+ *ch = 0;
+ *key = 0;
+ *modifiers = 0;
+ }
+
+ /*
+ * public static void SetCursorPosition(int x, int y);
+ */
+ void _IL_Stdio_SetCursorPosition(ILExecThread *_thread, ILInt32 x, ILInt32 y)
+ {
+ /* TODO */
+ }
+
+ /*
+ * public static void SetTextAttributes(int attrs);
+ */
+ void _IL_Stdio_SetTextAttributes(ILExecThread *_thread, ILInt32 attrs)
+ {
+ /* TODO */
+ }
+
+ /*
+ * public static void GetBufferSize(out int width, out int height);
+ */
+ void _IL_Stdio_GetBufferSize(ILExecThread *_thread, ILInt32 *width,
+ ILInt32 *height)
+ {
+ /* TODO */
+ *width = 80;
+ *height = 24;
+ }
+
+ /*
+ * public static void GetCursorPosition(out int x, out int y);
+ */
+ void _IL_Stdio_GetCursorPosition(ILExecThread *_thread, ILInt32 *x,
+ ILInt32 *y)
+ {
+ /* TODO */
+ *x = 0;
+ *y = 0;
+ }
+
+ /*
+ * public static bool KeyAvailable();
+ */
+ ILBool _IL_Stdio_KeyAvailable(ILExecThread *_thread)
+ {
+ /* TODO */
+ return 0;
+ }
+
+ /*
+ * public static void SetConsoleTitle(String title);
+ */
+ void _IL_Stdio_SetConsoleTitle(ILExecThread *_thread, ILString *title)
+ {
+ /* TODO */
+ }
+
+ /*
+ * public static void GetWindowSize(out int left, out int top,
+ * out int
width, out int height);
+ */
+ void _IL_Stdio_GetWindowSize(ILExecThread *_thread,
+ ILInt32 *left, ILInt32
*top,
+ ILInt32 *width,
ILInt32 *height)
+ {
+ /* TODO */
+ *left = 0;
+ *top = 0;
+ *width = 80;
+ *height = 24;
+ }
+
#ifdef __cplusplus
};
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -d -r1.87 -r1.88
*** int_proto.h 7 Oct 2003 21:25:57 -0000 1.87
--- int_proto.h 2 Nov 2003 02:48:47 -0000 1.88
***************
*** 497,500 ****
--- 497,511 ----
extern ILInt32 _IL_DirMethods_Rename(ILExecThread * _thread, ILString *
old_name, ILString * new_name);
+ extern void _IL_Stdio_SetConsoleMode(ILExecThread * _thread, ILInt32 mode);
+ extern void _IL_Stdio_Beep(ILExecThread * _thread);
+ extern void _IL_Stdio_Clear(ILExecThread * _thread);
+ extern void _IL_Stdio_ReadKey(ILExecThread * _thread, ILUInt16 * ch, ILInt32
* key, ILInt32 * modifiers);
+ extern void _IL_Stdio_SetCursorPosition(ILExecThread * _thread, ILInt32 x,
ILInt32 y);
+ extern void _IL_Stdio_SetTextAttributes(ILExecThread * _thread, ILInt32
attrs);
+ extern void _IL_Stdio_GetBufferSize(ILExecThread * _thread, ILInt32 * width,
ILInt32 * height);
+ extern void _IL_Stdio_GetCursorPosition(ILExecThread * _thread, ILInt32 * x,
ILInt32 * y);
+ extern ILBool _IL_Stdio_KeyAvailable(ILExecThread * _thread);
+ extern void _IL_Stdio_SetConsoleTitle(ILExecThread * _thread, ILString *
title);
+ extern void _IL_Stdio_GetWindowSize(ILExecThread * _thread, ILInt32 * left,
ILInt32 * top, ILInt32 * width, ILInt32 * height);
extern void _IL_Stdio_StdClose(ILExecThread * _thread, ILInt32 fd);
extern ILInt32 _IL_Stdio_StdPeek(ILExecThread * _thread, ILInt32 fd);
***************
*** 533,537 ****
extern ILInt32 _IL_FileMethods_GetErrno(ILExecThread * _thread);
extern ILBool _IL_FileMethods_CanSeek(ILExecThread * _thread, ILNativeInt
handle);
- extern ILBool _IL_FileMethods_CheckHandleAccess(ILExecThread * _thread,
ILNativeInt handle, ILInt32 access);
extern ILInt64 _IL_FileMethods_Seek(ILExecThread * _thread, ILNativeInt
handle, ILInt64 offset, ILInt32 origin);
extern ILBool _IL_FileMethods_Close(ILExecThread * _thread, ILNativeInt
handle);
--- 544,547 ----
***************
*** 551,554 ****
--- 561,565 ----
extern ILInt32 _IL_FileMethods_GetLength(ILExecThread * _thread, ILString *
path, ILInt64 * length);
extern ILBool _IL_FileMethods_HasAsync(ILExecThread * _thread);
+ extern ILBool _IL_FileMethods_CheckHandleAccess(ILExecThread * _thread,
ILNativeInt handle, ILInt32 access);
extern ILInt32 _IL_FileMethods_Copy(ILExecThread * _thread, ILString * src,
ILString * dest);
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** int_table.c 7 Oct 2003 21:25:57 -0000 1.90
--- int_table.c 2 Nov 2003 02:48:47 -0000 1.91
***************
*** 2302,2305 ****
--- 2302,2323 ----
#if !defined(HAVE_LIBFFI)
+ static void marshal_vpii(void (*fn)(), void *rvalue, void **avalue)
+ {
+ (*(void (*)(void *, ILInt32, ILInt32))fn)(*((void * *)(avalue[0])),
*((ILInt32 *)(avalue[1])), *((ILInt32 *)(avalue[2])));
+ }
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
+ static void marshal_vppppp(void (*fn)(), void *rvalue, void **avalue)
+ {
+ (*(void (*)(void *, void *, void *, void *, void *))fn)(*((void *
*)(avalue[0])), *((void * *)(avalue[1])), *((void * *)(avalue[2])), *((void *
*)(avalue[3])), *((void * *)(avalue[4])));
+ }
+
+ #endif
+
+ #if !defined(HAVE_LIBFFI)
+
static void marshal_ipipii(void (*fn)(), void *rvalue, void **avalue)
{
***************
*** 2330,2333 ****
--- 2348,2362 ----
IL_METHOD_BEGIN(Stdio_Methods)
+ IL_METHOD("SetConsoleMode", "(i)V", _IL_Stdio_SetConsoleMode,
marshal_vpi)
+ IL_METHOD("Beep", "()V", _IL_Stdio_Beep, marshal_vp)
+ IL_METHOD("Clear", "()V", _IL_Stdio_Clear, marshal_vp)
+ IL_METHOD("ReadKey", "(&c&i&i)V", _IL_Stdio_ReadKey, marshal_vpppp)
+ IL_METHOD("SetCursorPosition", "(ii)V", _IL_Stdio_SetCursorPosition,
marshal_vpii)
+ IL_METHOD("SetTextAttributes", "(i)V", _IL_Stdio_SetTextAttributes,
marshal_vpi)
+ IL_METHOD("GetBufferSize", "(&i&i)V", _IL_Stdio_GetBufferSize,
marshal_vppp)
+ IL_METHOD("GetCursorPosition", "(&i&i)V", _IL_Stdio_GetCursorPosition,
marshal_vppp)
+ IL_METHOD("KeyAvailable", "()Z", _IL_Stdio_KeyAvailable, marshal_bp)
+ IL_METHOD("SetConsoleTitle", "(oSystem.String;)V",
_IL_Stdio_SetConsoleTitle, marshal_vpp)
+ IL_METHOD("GetWindowSize", "(&i&i&i&i)V", _IL_Stdio_GetWindowSize,
marshal_vppppp)
IL_METHOD("StdClose", "(i)V", _IL_Stdio_StdClose, marshal_vpi)
IL_METHOD("StdPeek", "(i)i", _IL_Stdio_StdPeek, marshal_ipi)
***************
*** 2507,2511 ****
IL_METHOD("GetErrno", "()vPlatform.Errno;", _IL_FileMethods_GetErrno,
marshal_ip)
IL_METHOD("CanSeek", "(j)Z", _IL_FileMethods_CanSeek, marshal_bpj)
- IL_METHOD("CheckHandleAccess", "(jvSystem.IO.FileAccess;)Z",
_IL_FileMethods_CheckHandleAccess, marshal_bpji)
IL_METHOD("Seek", "(jlvSystem.IO.SeekOrigin;)l", _IL_FileMethods_Seek,
marshal_lpjli)
IL_METHOD("Close", "(j)Z", _IL_FileMethods_Close, marshal_bpj)
--- 2536,2539 ----
***************
*** 2525,2528 ****
--- 2553,2557 ----
IL_METHOD("GetLength", "(oSystem.String;&l)vPlatform.Errno;",
_IL_FileMethods_GetLength, marshal_ippp)
IL_METHOD("HasAsync", "()Z", _IL_FileMethods_HasAsync, marshal_bp)
+ IL_METHOD("CheckHandleAccess", "(jvSystem.IO.FileAccess;)Z",
_IL_FileMethods_CheckHandleAccess, marshal_bpji)
IL_METHOD("Copy", "(oSystem.String;oSystem.String;)vPlatform.Errno;",
_IL_FileMethods_Copy, marshal_ippp)
IL_METHOD_END
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnet/engine int_proto.h, 1.87, 1.88 int_table.c, 1.90, 1.91 lib_stdio.c, 1.6, 1.7,
Rhys Weatherley <address@hidden> <=