From 59fd0e8f84791958a4d748f0464ddfbd08ee182e Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Wed, 13 Dec 2000 22:27:13 +0000 Subject: [PATCH] Win32 fixes: redirection and file codepage --- docs/building.txt | 4 ++++ docs/notework.txt | 17 ++++++++++++++++- goldlib/gall/gkbdbase.cpp | 4 +++- goldlib/gall/gutlwin.cpp | 1 + goldlib/gall/gvidinit.cpp | 6 +++++- goldlib/gall/gwinpckf.cpp | 1 + 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/docs/building.txt b/docs/building.txt index 10e51e3..46c08e9 100644 --- a/docs/building.txt +++ b/docs/building.txt @@ -29,3 +29,7 @@ ls bin/ You have to get ged{short-patform-name}, gn{short-patform-name}, and rddt{short-patform-name}. If so, you did it! + +When building in DJGPP environment you may wish to patch libc with djlocale +patch which may be found on http://asa.i-connect.com/djlocale.zip. This patch +intended for those who worried about NLS support. diff --git a/docs/notework.txt b/docs/notework.txt index 6d2c8be..ea255d1 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -9,7 +9,22 @@ ______________________________________________________________________ ______________________________________________________________________ - Notes for GoldED+ 1.1.4.7, November xx 2000 + Notes for GoldED+ 1.1.5, December xx 2000 +______________________________________________________________________ + +- Fixed incorrect filenames displaying in /w32 version. + +- Fixed crash of Win32 version when output/input redirected to/from + file. + +- Fixed case sensivity in macro expansion. + +- Fixed insertion of extra space before Origin line if entry is taken + from file. + +______________________________________________________________________ + + Notes for GoldED+ 1.1.4.7, December 02 2000 ______________________________________________________________________ - It is now possible to use filepicker if there's very long filenames. diff --git a/goldlib/gall/gkbdbase.cpp b/goldlib/gall/gkbdbase.cpp index 5040dde..24f041a 100644 --- a/goldlib/gall/gkbdbase.cpp +++ b/goldlib/gall/gkbdbase.cpp @@ -132,7 +132,9 @@ void GKbd::Init() { osversion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osversion); gkbd_nt = (osversion.dwPlatformId & VER_PLATFORM_WIN32_NT) ? true : false; - gkbd_hin = GetStdHandle(STD_INPUT_HANDLE); + gkbd_hin = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + OPEN_EXISTING, 0, NULL); GetConsoleMode(gkbd_hin, &gkbd_kbdmode); if(gkbd_kbdmode & KBD_TEXTMODE) SetConsoleMode(gkbd_hin, gkbd_kbdmode & ~KBD_TEXTMODE); diff --git a/goldlib/gall/gutlwin.cpp b/goldlib/gall/gutlwin.cpp index 4ded9fe..1babf45 100644 --- a/goldlib/gall/gutlwin.cpp +++ b/goldlib/gall/gutlwin.cpp @@ -130,6 +130,7 @@ int g_init_os(int flags) { memset(&WinVer, 0, sizeof(OSVERSIONINFO)); WinVer.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); GetVersionEx(&WinVer); + SetFileApisToOEM(); GetConsoleTitle(ge_win_coldtitle, sizeof(ge_win_coldtitle)); if(WinVer.dwPlatformId == VER_PLATFORM_WIN32_NT) { for(i = 0; i < 256; i++) { diff --git a/goldlib/gall/gvidinit.cpp b/goldlib/gall/gvidinit.cpp index 352c105..3294e9e 100644 --- a/goldlib/gall/gvidinit.cpp +++ b/goldlib/gall/gvidinit.cpp @@ -393,7 +393,11 @@ int GVid::detectadapter() { #elif defined(__WIN32__) - gvid_hout = GetStdHandle(STD_OUTPUT_HANDLE); + gvid_hout = CreateFile("CONOUT$", GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, + OPEN_EXISTING, + FILE_FLAG_NO_BUFFERING|FILE_FLAG_WRITE_THROUGH, NULL); + // gvid_hout = GetStdHandle(STD_OUTPUT_HANDLE); adapter = V_VGA; diff --git a/goldlib/gall/gwinpckf.cpp b/goldlib/gall/gwinpckf.cpp index b17e9af..cba4cda 100644 --- a/goldlib/gall/gwinpckf.cpp +++ b/goldlib/gall/gwinpckf.cpp @@ -1,3 +1,4 @@ + // This may look like C code, but it is really -*- C++ -*- // ------------------------------------------------------------------