Re: [mpg123-devel] Please test new network code in/out of mpg123 (now with HTTPS support)!
Brought to you by:
sobukus
From: Dave Y. <dav...@gm...> - 2022-05-16 17:47:07
|
On 05/16/22 01:26 AM, Thomas Orgis wrote: > [END OF QUOTE] That's a copy and paste from the official documentation > > I am not sure where Unicode comes in here. But maybe we should be able > to ignore that when only caring about ASCII. Yes, as long as we don't need characters above 127, it'll be fine. > > > This looks like the little test program could skip all terminal > setup/term_fd stuff and do this: > #define INCL_KBD #define INCL_DOSPROCESS #include <os2.h> > int get_key(int do_delay, char *val) > { > KBDKEYINFO key; > key.chChar = 0; > key.chScan = 0; > // optionally: sleep for a tiny bit DosSleep(5); > if(!KbdCharIn(&key,IO_NOWAIT,0) && key.chChar) > { > *val = key.chChar; > return 1; > } > return 0; > } > > > Could that work? > Almost, H:\tmp>test.exe terminal fd: 0 got key: Î got key: a got key: s got key: f got key: d got key: q Keep getting that Î on program start before pressing a key. Leaving it running without the DosSleep(5) does block things badly, stupid SIQ (single input queue). Dave ps Term is set to os2 pps, network stuff is now fine. |