TIP: Click on subject to list as thread! ANSI
echo: fmail_help
to: Wilfred van Velzen
from: Oli
date: 2023-02-23 11:33:00
subject: Linux / 5D

Wilfred wrote (2023-02-23):

 WvV> It seems to have to do with how the getch() function is implemented in
 WvV> the MingW compiler. The version in the old Borland Compiler seems to work
 WvV> in reactos, or so some tests I did seems to indicate.

 WvV> A few years back I made a little test program that showed this when
 WvV> compiled with different compilers:
 WvV> http://fmail.vlzn.nl/files/getchtest.zip

I've compiled it with conio.h from https://github.com/casualsnek/linuxconio on Linux and this is what I get when pressing

UP
DOWN
F1
F2
INS
DEL

$ ./getchtest-linuxconio
   27 - 0000001B - '
   91 - 0000005B - '['
   65 - 00000041 - 'A'
   27 - 0000001B - '
   91 - 0000005B - '['
   66 - 00000042 - 'B'
   27 - 0000001B - '
   79 - 0000004F - 'O'
   80 - 00000050 - 'P'
   27 - 0000001B - '
   79 - 0000004F - 'O'
   81 - 00000051 - 'Q'
   27 - 0000001B - '
   91 - 0000005B - '['
   50 - 00000032 - '2'
  126 - 0000007E - '~'
   27 - 0000001B - '
   91 - 0000005B - '['
   51 - 00000033 - '3'
  126 - 0000007E - '~'

and with wine:

$ wine getchtest-borland.exe
    0 - 00000000 - ''
   72 - 00000048 - 'H'
    0 - 00000000 - ''
   80 - 00000050 - 'P'
    0 - 00000000 - ''
   59 - 0000003B - ';'
    0 - 00000000 - ''
   60 - 0000003C - '<'
    0 - 00000000 - ''
   82 - 00000052 - 'R'
    0 - 00000000 - ''
   83 - 00000053 - 'S'

$ wine getchtest-mingw32.exe
  224 - 000000E0 - '…'
   72 - 00000048 - 'H'
  224 - 000000E0 - '…'
   80 - 00000050 - 'P'
[F1 nothing]
[F2 nothing]
  224 - 000000E0 - '…'
   82 - 00000052 - 'R'
  224 - 000000E0 - '…'
   83 - 00000053 - 'S'

I don't have 64-bit wine.

---
                                                                                            
* Origin: War is Peace. Freedom is Slavery. Ignorance is Strength. (2:280/464.47)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.