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-15 17:55:53
|
On 05/15/22 09:59 AM, Thomas Orgis wrote: > So should we go for klibc so that we know what we're dealing with? Should we care about OS/2 without klibc? No, autotools, in particular libtool, will only work with GCC. Anyone going to the trouble of hand writing a makefile, config.h etc can play with the guards > > I'm torn between enforcing klibc and keeping mpg123 code rather ignorant about this and mostly relying on detected API. We can test for the screen size function, for example. But let's first settle how reading keys is supposed to work (again). Right now, we switched to ctermid() with fallback to /dev/tty ... is that a thing on OS/2? Does only reading from stdin work? I'd just stick to __OS2__ as it is obvious. ctermid() in the headers is commented out with a @todo so unsupported. Libc should map /dev/tty to CON: (likewise /dev/nul maps to NUL:) Besides stdin, there is, Headers: #include <stdlib.h> #include <sys/kbdscan.h> /* optional, for extended scan codes */ Prototype: int _read_kbd (int echo, int wait, int sig); Compatibility: emx * Description: Get a character from the keyboard. Extended codes are preceded by a null character (call _read_kbd() again!), the scan codes are defined in <sys/kbdscan.h>. If echo is non-zero, input will be echoed, if wait is non-zero, _read_kbd() will wait until a character is available, if wait is zero and no character is available, _read_kbd() will return -1, if sig is zero, Ctrl-C will be ignored. Examples (taken from <conio.h>): #define getch() _read_kbd (0, 1, 0) #define getche() _read_kbd (1, 1, 0) Please use the general terminal interface instead. It's important to call _read_kbd() again if _read_kbd() returns 0. To see what happens if you don't, type Ctrl-S F10 under DOS. Return value: See above. and conio.h consists of, #define getch() _read_kbd (0, 1, 0) #define getche() _read_kbd (1, 1, 0) Dave |