From: Dirk B. <db...@us...> - 2005-01-17 18:53:02
|
Update of /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17577/extsrc/w32fConsole Modified Files: Console.dsp Console.rc Term.cpp Log Message: dbu: changed TYPE to handle the BELL (ASCII 7), BS (ASCII 8), LF(ASCII 10) and CR (ASCII 13) control characters like EMIT does Index: Console.dsp =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Console.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Console.dsp 22 Dec 2004 20:25:25 -0000 1.1 --- Console.dsp 17 Jan 2005 18:52:28 -0000 1.2 *************** *** 54,58 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\w32fConsole.dll" !ELSEIF "$(CFG)" == "Console - Win32 Debug" --- 54,58 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\..\win32forth\w32fConsole.dll" !ELSEIF "$(CFG)" == "Console - Win32 Debug" *************** *** 80,84 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\w32fConsole.dll" /pdbtype:sept !ENDIF --- 80,84 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\win32forth\w32fConsole.dll" /pdbtype:sept !ENDIF *************** *** 164,167 **** --- 164,171 ---- SOURCE=..\..\res\Win32For.ico # End Source File + # Begin Source File + + SOURCE=..\..\..\win32forth\src\res\Win32For.ico + # End Source File # End Group # End Target Index: Console.rc =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Console.rc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Console.rc 22 Dec 2004 20:25:25 -0000 1.1 --- Console.rc 17 Jan 2005 18:52:29 -0000 1.2 *************** *** 55,60 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 6,9,0,15 ! PRODUCTVERSION 6,9,0,15 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 55,60 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 6,11,0,16 ! PRODUCTVERSION 6,11,0,16 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 74,78 **** VALUE "CompanyName", "Win32Forth developer team\0" VALUE "FileDescription", "Win32Forth console\0" ! VALUE "FileVersion", "6, 9, 0, 15\0" VALUE "InternalName", "CONSOLE\0" VALUE "LegalCopyright", "\0" --- 74,78 ---- VALUE "CompanyName", "Win32Forth developer team\0" VALUE "FileDescription", "Win32Forth console\0" ! VALUE "FileVersion", "6, 11, 0, 16\0" VALUE "InternalName", "CONSOLE\0" VALUE "LegalCopyright", "\0" *************** *** 81,85 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "Win32Forth\0" ! VALUE "ProductVersion", "6, 9, 0, 15\0" VALUE "SpecialBuild", "\0" END --- 81,85 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "Win32Forth\0" ! VALUE "ProductVersion", "6, 11, 0, 16\0" VALUE "SpecialBuild", "\0" END *************** *** 112,116 **** // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! ICON_FORTH ICON DISCARDABLE "..\\..\\res\\Win32For.ico" #endif // Deutsch (Deutschland) resources ///////////////////////////////////////////////////////////////////////////// --- 112,116 ---- // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! ICON_FORTH ICON DISCARDABLE "..\\..\\..\\win32forth\\src\\res\\Win32For.ico" #endif // Deutsch (Deutschland) resources ///////////////////////////////////////////////////////////////////////////// Index: Term.cpp =================================================================== RCS file: /cvsroot/win32forth/win32forth-extsrc/extsrc/w32fConsole/Term.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Term.cpp 22 Dec 2004 20:25:25 -0000 1.1 --- Term.cpp 17 Jan 2005 18:52:31 -0000 1.2 *************** *** 176,185 **** int maxcols = 128; // number of columns in the screen save buffer int charW, charH; // size of a character ! int x, y; // current cursor position ABSOLUTE FROM BUFFER TOP int theFg = -1; // forground color default to system color int theBg = -1; // background color default to system color int cursor_height = 2; // height of the cursor in lines int lmouse_down = 0; // is the left mouse button currently down? ! int rmouse_down = 0; //************************************************************************************************* --- 176,185 ---- int maxcols = 128; // number of columns in the screen save buffer int charW, charH; // size of a character ! int x = 0, y = 0; // current cursor position ABSOLUTE FROM BUFFER TOP int theFg = -1; // forground color default to system color int theBg = -1; // background color default to system color int cursor_height = 2; // height of the cursor in lines int lmouse_down = 0; // is the left mouse button currently down? ! int rmouse_down = 0; // is the right mouse button currently down? //************************************************************************************************* *************** *** 574,592 **** //************************************************************************************************* ! // emit a character to the console window //************************************************************************************************* ! int APIENTRY c_emit (char c) { ! if( !screen ) ! return 0; ! ! scrollfix(); ! ! switch (c) { case BELL: { Beep(500, 100); - return 0; } case BS: --- 574,587 ---- //************************************************************************************************* ! // Emit a character to the console window. ! // Handles BELL (ASCII 7), BS (ASCII 8), LF(ASCII 10) and CR (ASCII 13) control characters. //************************************************************************************************* ! void emit( char c ) { ! switch( c ) { case BELL: { Beep(500, 100); } case BS: *************** *** 616,632 **** default: { ! HideCaret (hWndConsole); ! SetBkColor(hdc, theBg); ! SetTextColor(hdc, theFg); ! TextOut (hdc, gx, gy, &c, 1); ! ShowCaret (hWndConsole); ! SCREEN(x,y) = c; x += 1; wrap(); } } MoveCaret(); ! return 0; } --- 611,641 ---- default: { ! TextOut( hdc, gx, gy, &c, 1 ); ! SCREEN( x, y ) = c; x += 1; wrap(); + break; } } + } + + //************************************************************************************************* + // emit a character to the console window + //************************************************************************************************* + int APIENTRY c_emit( char c ) + { + if( !screen ) + return 0; + + scrollfix(); + HideCaret( hWndConsole ); + + SetBkColor( hdc, theBg ); + SetTextColor( hdc, theFg ); + emit( c ); MoveCaret(); ! ShowCaret( hWndConsole ); ! return 1; } *************** *** 634,663 **** // type a string of characters to the console window //************************************************************************************************* ! int APIENTRY c_type (char *addr, int len) { ! int n; ! ! if( !screen ) return 0; ! scrollfix(); ! HideCaret (hWndConsole); ! SetBkColor(hdc, theBg); ! SetTextColor(hdc, theFg); ! while (len) ! { n = min (len, cols - x); ! TextOut (hdc, gx, gy, addr, n); ! memmove(&SCREEN(x,y), addr, n); ! x += n; ! wrap(); ! addr += n; ! len -= n; ! } ! MoveCaret(); ! ShowCaret (hWndConsole); ! return 0; } --- 643,663 ---- // type a string of characters to the console window //************************************************************************************************* ! int APIENTRY c_type( char *addr, int len ) { ! if( !screen || !addr || !len ) return 0; ! scrollfix(); ! HideCaret( hWndConsole ); ! SetBkColor( hdc, theBg ); ! SetTextColor( hdc, theFg ); ! for( int act = 0; act < len; act++ ) ! emit( addr[act] ); ! MoveCaret(); ! ShowCaret( hWndConsole ); ! return 0; } |