[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnet/engine Makefile.am, 1.66, 1.67 lib_stdio.c, 1
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnet/engine Makefile.am, 1.66, 1.67 lib_stdio.c, 1.7, 1.8 process.c, 1.57, 1.58 |
Date: |
Mon, 03 Nov 2003 05:18:23 +0000 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv3790/engine
Modified Files:
Makefile.am lib_stdio.c process.c
Log Message:
Check in the new console implementation.
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/Makefile.am,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** Makefile.am 13 Oct 2003 05:07:20 -0000 1.66
--- Makefile.am 3 Nov 2003 05:18:21 -0000 1.67
***************
*** 66,75 ****
ilrun_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
--- 66,75 ----
ilrun_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(TERMCAPLIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(TERMCAPLIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
***************
*** 84,93 ****
ilrun_LDADD = libILEngine.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
--- 84,93 ----
ilrun_LDADD = libILEngine.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(TERMCAPLIBS)
ilverify_SOURCES = ilverify.c
ilverify_LDADD = libILEngine.a \
../image/libILImage.a ../support/libILSupport.a \
! $(PACKAGE_LIBS) $(TERMCAPLIBS)
## We need "-fno-gcse" to stop gcc being overeager when it compiles
Index: process.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/process.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** process.c 10 Oct 2003 00:42:42 -0000 1.57
--- process.c 3 Nov 2003 05:18:21 -0000 1.58
***************
*** 23,26 ****
--- 23,27 ----
#include "engine.h"
#include "lib_defs.h"
+ #include "il_console.h"
#ifdef __cplusplus
***************
*** 454,457 ****
--- 455,461 ----
/* Free the process block itself */
ILGCFreePersistent(process);
+
+ /* Reset the console to the "normal" mode */
+ ILConsoleSetMode(IL_CONSOLE_NORMAL);
}
Index: lib_stdio.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_stdio.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** lib_stdio.c 2 Nov 2003 02:48:47 -0000 1.7
--- lib_stdio.c 3 Nov 2003 05:18:21 -0000 1.8
***************
*** 35,38 ****
--- 35,39 ----
#include "lib_defs.h"
#include "il_utils.h"
+ #include "il_console.h"
#ifdef __cplusplus
***************
*** 72,76 ****
switch(fd)
{
! case 1: putc((value & 0xFF), stdout); break;
case 2: putc((value & 0xFF), stderr); break;
}
--- 73,90 ----
switch(fd)
{
! case 1:
! {
! if(ILConsoleGetMode() == IL_CONSOLE_NORMAL)
! {
! putc((value & 0xFF), stdout);
! }
! else
! {
! ILConsoleWriteChar(value);
! fflush(stdout);
! }
! }
! break;
!
case 2: putc((value & 0xFF), stderr); break;
}
***************
*** 88,96 ****
if(fd == 1)
{
! while(length > 0)
{
! putc((*buf & 0xFF), stdout);
! ++buf;
! --length;
}
}
--- 102,123 ----
if(fd == 1)
{
! if(ILConsoleGetMode() == IL_CONSOLE_NORMAL)
{
! while(length > 0)
! {
! putc((*buf & 0xFF), stdout);
! ++buf;
! --length;
! }
! }
! else
! {
! while(length > 0)
! {
! ILConsoleWriteChar(*buf);
! ++buf;
! --length;
! }
! fflush(stdout);
}
}
***************
*** 134,138 ****
if(fd == 1)
{
! fwrite(((ILUInt8 *)ArrayToBuffer(value)) + index, 1, count,
stdout);
}
else if(fd == 2)
--- 161,179 ----
if(fd == 1)
{
! if(ILConsoleGetMode() == IL_CONSOLE_NORMAL)
! {
! fwrite(((ILUInt8 *)ArrayToBuffer(value)) + index, 1,
count, stdout);
! }
! else
! {
! ILUInt8 *buf = ((ILUInt8 *)ArrayToBuffer(value)) +
index;
! while(count > 0)
! {
! ILConsoleWriteChar(*buf);
! ++buf;
! --count;
! }
! fflush(stdout);
! }
}
else if(fd == 2)
***************
*** 171,179 ****
ILInt32 _IL_Stdio_StdRead_i(ILExecThread *thread, ILInt32 fd)
{
if(fd == 0)
{
! return (ILInt32)ILInputGetChar();
}
else
{
return -1;
--- 212,222 ----
ILInt32 _IL_Stdio_StdRead_i(ILExecThread *thread, ILInt32 fd)
{
+ #ifndef REDUCED_STDIO
if(fd == 0)
{
! return (ILInt32)(getc(stdin));
}
else
+ #endif
{
return -1;
***************
*** 188,191 ****
--- 231,235 ----
ILInt32 count)
{
+ #ifndef REDUCED_STDIO
ILUInt16 *buf = ((ILUInt16 *)(ArrayToBuffer(value))) + index;
ILInt32 result = 0;
***************
*** 197,201 ****
while(count > 0)
{
! ch = ILInputGetChar();
if(ch == -1)
{
--- 241,245 ----
while(count > 0)
{
! ch = getc(stdin);
if(ch == -1)
{
***************
*** 207,210 ****
--- 251,257 ----
}
return result;
+ #else
+ return -1;
+ #endif
}
***************
*** 216,225 ****
ILInt32 count)
{
if(fd != 0)
{
return -1;
}
! return (ILInt32)ILInputRead
! (((ILUInt8 *)ArrayToBuffer(value)) + index, (int)count);
}
--- 263,276 ----
ILInt32 count)
{
+ #ifndef REDUCED_STDIO
if(fd != 0)
{
return -1;
}
! return (ILInt32)(int)fread
! (((ILUInt8 *)ArrayToBuffer(value)) + index, 1, (int)count,
stdin);
! #else
! return -1;
! #endif
}
***************
*** 229,242 ****
ILInt32 _IL_Stdio_StdPeek(ILExecThread *thread, ILInt32 fd)
{
if(fd == 0)
{
! int ch = ILInputGetChar();
if(ch != -1)
{
! ILInputUngetChar(ch);
}
return (ILInt32)ch;
}
else
{
return -1;
--- 280,295 ----
ILInt32 _IL_Stdio_StdPeek(ILExecThread *thread, ILInt32 fd)
{
+ #ifndef REDUCED_STDIO
if(fd == 0)
{
! int ch = getc(stdin);
if(ch != -1)
{
! ungetc(ch, stdin);
}
return (ILInt32)ch;
}
else
+ #endif
{
return -1;
***************
*** 249,253 ****
void _IL_Stdio_SetConsoleMode(ILExecThread *_thread, ILInt32 mode)
{
! /* TODO */
}
--- 302,306 ----
void _IL_Stdio_SetConsoleMode(ILExecThread *_thread, ILInt32 mode)
{
! ILConsoleSetMode(mode);
}
***************
*** 257,260 ****
--- 310,314 ----
void _IL_Stdio_Beep(ILExecThread *_thread)
{
+ ILConsoleBeep();
}
***************
*** 264,267 ****
--- 318,322 ----
void _IL_Stdio_Clear(ILExecThread *_thread)
{
+ ILConsoleClear();
}
***************
*** 272,279 ****
ILInt32 *key, ILInt32 *modifiers)
{
! /* TODO */
! *ch = 0;
! *key = 0;
! *modifiers = 0;
}
--- 327,331 ----
ILInt32 *key, ILInt32 *modifiers)
{
! ILConsoleReadKey(ch, key, modifiers);
}
***************
*** 283,287 ****
void _IL_Stdio_SetCursorPosition(ILExecThread *_thread, ILInt32 x, ILInt32 y)
{
! /* TODO */
}
--- 335,339 ----
void _IL_Stdio_SetCursorPosition(ILExecThread *_thread, ILInt32 x, ILInt32 y)
{
! ILConsoleSetPosition(x, y);
}
***************
*** 291,295 ****
void _IL_Stdio_SetTextAttributes(ILExecThread *_thread, ILInt32 attrs)
{
! /* TODO */
}
--- 343,347 ----
void _IL_Stdio_SetTextAttributes(ILExecThread *_thread, ILInt32 attrs)
{
! ILConsoleSetAttributes(attrs);
}
***************
*** 300,306 ****
ILInt32 *height)
{
! /* TODO */
! *width = 80;
! *height = 24;
}
--- 352,356 ----
ILInt32 *height)
{
! ILConsoleGetBufferSize(width, height);
}
***************
*** 311,317 ****
ILInt32 *y)
{
! /* TODO */
! *x = 0;
! *y = 0;
}
--- 361,365 ----
ILInt32 *y)
{
! ILConsoleGetPosition(x, y);
}
***************
*** 321,326 ****
ILBool _IL_Stdio_KeyAvailable(ILExecThread *_thread)
{
! /* TODO */
! return 0;
}
--- 369,373 ----
ILBool _IL_Stdio_KeyAvailable(ILExecThread *_thread)
{
! return ILConsoleKeyAvailable();
}
***************
*** 330,334 ****
void _IL_Stdio_SetConsoleTitle(ILExecThread *_thread, ILString *title)
{
! /* TODO */
}
--- 377,385 ----
void _IL_Stdio_SetConsoleTitle(ILExecThread *_thread, ILString *title)
{
! char *str = ILStringToAnsi(_thread, title);
! if(str)
! {
! ILConsoleSetTitle(str);
! }
}
***************
*** 341,349 ****
ILInt32 *width,
ILInt32 *height)
{
! /* TODO */
! *left = 0;
! *top = 0;
! *width = 80;
! *height = 24;
}
--- 392,396 ----
ILInt32 *width,
ILInt32 *height)
{
! ILConsoleGetWindowSize(left, top, width, height);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnet/engine Makefile.am, 1.66, 1.67 lib_stdio.c, 1.7, 1.8 process.c, 1.57, 1.58,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1429,1.1430
- Next by Date:
[Dotgnu-pnet-commits] pnet ChangeLog, 1.2734, 1.2735 configure.in, 1.148, 1.149
- Previous by thread:
[Dotgnu-pnet-commits] pnetlib ChangeLog,1.1429,1.1430
- Next by thread:
[Dotgnu-pnet-commits] pnet ChangeLog, 1.2734, 1.2735 configure.in, 1.148, 1.149
- Index(es):