head 1.2; access; symbols; locks; strict; comment @// @; 1.2 date 2014.09.07.21.38.59; author wiz; state dead; branches; next 1.1; commitid GxF9JVsDSjLqBsPx; 1.1 date 2014.08.26.10.44.15; author wiz; state Exp; branches; next ; commitid bqfWy0RyCX0OmRNx; desc @@ 1.2 log @Update to beta7. All local patches integrated, and some bug fixes. @ text @$NetBSD: patch-openmpt123_openmpt123.hpp,v 1.1 2014/08/26 10:44:15 wiz Exp $ NetBSD defines both TIOCGSIZE and TIOCGWINSZ, but struct ttysize does not contain the referenced members. http://bugs.openmpt.org/view.php?id=580 --- openmpt123/openmpt123.hpp.orig 2014-02-01 16:52:29.000000000 +0000 +++ openmpt123/openmpt123.hpp @@@@ -336,18 +336,18 @@@@ struct commandlineflags { terminal_height = tmp; } } - #if defined(TIOCGSIZE) - struct ttysize ts; - if ( ioctl( STDERR_FILENO, TIOCGSIZE, &ts ) >= 0 ) { - terminal_width = ts.ts_cols; - terminal_height = ts.ts_rows; - } - #elif defined(TIOCGWINSZ) + #if defined(TIOCGWINSZ) struct winsize ts; if ( ioctl( STDERR_FILENO, TIOCGWINSZ, &ts ) >= 0 ) { terminal_width = ts.ws_col; terminal_height = ts.ws_row; } + #elif defined(TIOCGSIZE) + struct ttysize ts; + if ( ioctl( STDERR_FILENO, TIOCGSIZE, &ts ) >= 0 ) { + terminal_width = ts.ts_cols; + terminal_height = ts.ts_rows; + } #endif } #endif @ 1.1 log @Import libopenmpt-0.2.4115beta5 as audio/libopenmpt. OpenMPT based module player library and libopenmpt based command-line player libopenmpt is a cross-platform C++ and C library to decode tracked music files (modules) into a raw PCM audio stream. openmpt123 is a cross-platform command-line or terminal based module file player. libopenmpt is based on the player code of the Open ModPlug Tracker project (OpenMPT, http://openmpt.org/). In order to avoid code base fragmentation, libopenmpt is developed in the same source code repository as OpenMPT. @ text @d1 1 a1 1 $NetBSD$ @