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-14 06:35:32
|
On 05/13/22 09:29 PM, Thomas Orgis wrote: > Am Fri, 13 May 2022 19:28:07 -0700 > schrieb Dave Yeo <dav...@gm...>: > >> The CFLAGS has -DOS2 in it, probably put there by configure, so it is fine > > Heh, yes. Silly me. > > AC_CHECK_HEADER([os2.h], [ADD_CPPFLAGS="$ADD_CPPFLAGS -DOS2"]) > > But we could skip that definition and instead use __OS2__? Would that > exclude anyone? As far as I know, all OS/2 compilers define __OS2__, so would be fine. ... > > So I'll just drop that part. We're not testing with EMX anymore? No, EMX is likely to outdated to compile MPG123 without a lot of work, it's lacking a lot of modern types and libtool is geared to the current state of things. > >> I think using isatty() would be fine, or using HAVE_TERMIOS as is which >> seems fine as well. > > Well, it's about the runtime check. Let's look at that snippet: > > > int term_width(int fd) > { > #ifdef __EMX__ > /* OS/2 */ > int s[2]; > _scrsize (s); > if (s[0] >= 0) > return s[0]; > #else > #ifdef HAVE_TERMIOS > /* POSIX */ > struct winsize geometry; > geometry.ws_col = 0; > if(ioctl(fd, TIOCGWINSZ, &geometry) >= 0) > return (int)geometry.ws_col; > #else > > > So you're currently running the ioctl()? Is mpg123 able to get the > terminal width that way? Does it always attempt terminal control by > default, giving you that error message about tcsetattr? Yes, it always gave that message when playing a mp3. Gone now. > > I committed a change that omits the tcsetattr() on __OS2__. Does that > make terminal control work for you (with some uglyness because input is > echoed)? Maybe I'll also just omit the error check for tcsetattr and > treat this as a fallback mode. We wouldn't have special code for OS/2 > then, as things build and might get fixed properly for runtime. Actually I hadn't used terminal control previously. Now adding -v to the command line, I get this message, Terminal control enabled, press 'h' for listing of keys and functions. but 'h' nor any other key besides CTRL-C does anything and displays on the command line after mpg123 exits. Never noticed before. Dave |