head 1.8; access; symbols pkgsrc-2026Q1:1.8.0.106 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.8.0.104 pkgsrc-2025Q4-base:1.8 pkgsrc-2025Q3:1.8.0.102 pkgsrc-2025Q3-base:1.8 pkgsrc-2025Q2:1.8.0.100 pkgsrc-2025Q2-base:1.8 pkgsrc-2025Q1:1.8.0.98 pkgsrc-2025Q1-base:1.8 pkgsrc-2024Q4:1.8.0.96 pkgsrc-2024Q4-base:1.8 pkgsrc-2024Q3:1.8.0.94 pkgsrc-2024Q3-base:1.8 pkgsrc-2024Q2:1.8.0.92 pkgsrc-2024Q2-base:1.8 pkgsrc-2024Q1:1.8.0.90 pkgsrc-2024Q1-base:1.8 pkgsrc-2023Q4:1.8.0.88 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.86 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.84 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.82 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.80 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.78 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.76 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.74 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.72 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.70 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.68 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.66 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.64 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.62 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.58 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.38 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.60 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.56 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.54 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.52 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.50 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.48 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.46 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.44 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.42 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.40 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.36 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.34 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.32 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.30 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.8.0.28 pkgsrc-2016Q2-base:1.8 pkgsrc-2016Q1:1.8.0.26 pkgsrc-2016Q1-base:1.8 pkgsrc-2015Q4:1.8.0.24 pkgsrc-2015Q4-base:1.8 pkgsrc-2015Q3:1.8.0.22 pkgsrc-2015Q3-base:1.8 pkgsrc-2015Q2:1.8.0.20 pkgsrc-2015Q2-base:1.8 pkgsrc-2015Q1:1.8.0.18 pkgsrc-2015Q1-base:1.8 pkgsrc-2014Q4:1.8.0.16 pkgsrc-2014Q4-base:1.8 pkgsrc-2014Q3:1.8.0.14 pkgsrc-2014Q3-base:1.8 pkgsrc-2014Q2:1.8.0.12 pkgsrc-2014Q2-base:1.8 pkgsrc-2014Q1:1.8.0.10 pkgsrc-2014Q1-base:1.8 pkgsrc-2013Q4:1.8.0.8 pkgsrc-2013Q4-base:1.8 pkgsrc-2013Q3:1.8.0.6 pkgsrc-2013Q3-base:1.8 pkgsrc-2013Q2:1.8.0.4 pkgsrc-2013Q2-base:1.8 pkgsrc-2013Q1:1.8.0.2 pkgsrc-2013Q1-base:1.8 pkgsrc-2012Q4:1.7.0.48 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.46 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.44 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.42 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.40 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.38 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.7.0.36 pkgsrc-2011Q2-base:1.7 pkgsrc-2011Q1:1.7.0.34 pkgsrc-2011Q1-base:1.7 pkgsrc-2010Q4:1.7.0.32 pkgsrc-2010Q4-base:1.7 pkgsrc-2010Q3:1.7.0.30 pkgsrc-2010Q3-base:1.7 pkgsrc-2010Q2:1.7.0.28 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.26 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.7.0.24 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.22 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.20 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.18 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.7.0.16 pkgsrc-2008Q4-base:1.7 pkgsrc-2008Q3:1.7.0.14 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.12 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.10 pkgsrc-2008Q2-base:1.7 cwrapper:1.7.0.8 pkgsrc-2008Q1:1.7.0.6 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.7.0.4 pkgsrc-2007Q4-base:1.7 pkgsrc-2007Q3:1.7.0.2 pkgsrc-2007Q3-base:1.7 pkgsrc-2007Q2:1.5.0.12 pkgsrc-2007Q2-base:1.5 pkgsrc-2007Q1:1.5.0.10 pkgsrc-2007Q1-base:1.5 pkgsrc-2006Q4:1.5.0.8 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.6 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.5.0.4 pkgsrc-2006Q2-base:1.5 pkgsrc-2006Q1:1.5.0.2 pkgsrc-2006Q1-base:1.5 pkgsrc-2005Q4:1.4.0.18 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 buildlink2-base:1.3 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.8 date 2013.01.06.00.59.47; author ryoon; state Exp; branches; next 1.7; 1.7 date 2007.09.16.09.25.03; author joerg; state Exp; branches; next 1.6; 1.6 date 2007.07.12.19.48.41; author drochner; state dead; branches; next 1.5; 1.5 date 2006.03.28.23.05.05; author joerg; state Exp; branches; next 1.4; 1.4 date 2003.09.22.12.27.29; author xtraeme; state Exp; branches; next 1.3; 1.3 date 2000.10.15.18.01.11; author rh; state dead; branches; next 1.2; 1.2 date 2000.08.04.02.00.47; author jlam; state Exp; branches; next 1.1; 1.1 date 2000.02.19.22.32.45; author rh; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.02.19.22.32.45; author rh; state Exp; branches; next ; desc @@ 1.8 log @Fix build on OpenBSD/amd64 5.2. The patches are taken from OpenBSD ports repository. * Disable joystick on OpenBSD/!i386 * Use sndio on OpenBSD @ text @$NetBSD: patch-ab,v 1.7 2007/09/16 09:25:03 joerg Exp $ --- src/sl/slDSP.cxx.orig Tue Mar 11 02:06:24 2008 +++ src/sl/slDSP.cxx @@@@ -413,7 +413,7 @@@@ void slDSP::stop () /* NetBSD/OpenBSD 2.3 this should be very close to SUN Audio */ /* ------------------------------------------------------------ */ -#elif (defined(UL_BSD) && !defined(__FreeBSD__)) || defined(UL_SOLARIS) +#elif (defined(UL_BSD) && !defined(SL_USING_SNDIO) && !defined(__FreeBSD__) && !defined(__DragonFly__)) || defined(UL_SOLARIS) void slDSP::open ( const char *device, int _rate, int _stereo, int _bps ) { @@@@ -1082,4 +1082,138 @@@@ float slDSP::secondsUsed () #endif +#if defined(SL_USING_SNDIO) +#include + +static long long realpos, playpos; + +void +movecb(void *v, int delta) +{ + realpos += delta; +} + +void +slDSP::open(const char *device, int _rate, int _stereo, int _bps ) +{ + error = SL_FALSE; + + if (!strncmp(device, "default", FILENAME_MAX)) + hdl = sio_open(NULL, SIO_PLAY, 0); + else + hdl = sio_open(device, SIO_PLAY, 0); + if (hdl == NULL) { + error = SL_TRUE; + fprintf(stderr, "slDSP: open\n"); + return; + } + + sio_initpar(&par); + par.pchan = _stereo ? 2 : 1; + par.bits = _bps; + par.rate = _rate; + par.appbufsz = 4096; + + realpos = playpos = 0; + sio_onmove(hdl, movecb, NULL); + + if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par) || + !sio_start(hdl)) { + fprintf(stderr, "slDSP: sndio params\n"); + error = SL_TRUE; + return; + } + + bps = par.bits; + rate = par.rate; + stereo = par.pchan == 2 ? SL_TRUE : SL_FALSE; +} + +void +slDSP::close() +{ + if (hdl != NULL) + sio_close(hdl); + hdl = NULL; +} + +int +slDSP::getDriverBufferSize() +{ + if (error) + return 0; + + return par.round * par.bps * par.pchan; +} + +void +slDSP::getBufferInfo() +{ + struct pollfd pfd; + nfds_t nfd; + + if (error) + return; + + /* updates counters */ + nfd = sio_pollfd(hdl, &pfd, POLLOUT); + poll(&pfd, nfd, 0); + sio_revents(hdl, &pfd); +} + +void +slDSP::write(void *buffer, size_t length) +{ + int ret, todo, pos; + + if (error || (int)length <= 0) + return; + + pos = 0; + todo = length; + while (todo > 0) { + ret = sio_write(hdl, (char *)buffer + pos, todo); + pos += ret; + todo -= ret; + } + playpos += length / par.bps / par.pchan; +} + +float +slDSP::secondsRemaining() +{ + if (error) + return 0.0f; + + getBufferInfo(); + + /* wtf? tuxkart won't play sounds if less ??? */ + return 0.1f; + return((float)(par.appbufsz - (playpos - realpos)) / par.rate); +} + +float +slDSP::secondsUsed() +{ + if (error) + return 0.0f ; + + getBufferInfo(); + + if (realpos > playpos) + return 0.0f; + + return((float)(playpos - realpos) / par.rate); +} + +void +slDSP::sync() +{ +} + +void slDSP::stop() +{ +} + +#endif @ 1.7 log @Fix DragonFly support. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- src/sl/slDSP.cxx.orig 2007-09-16 08:55:07.000000000 +0000 d10 1 a10 1 +#elif (defined(UL_BSD) && !defined(__FreeBSD__) &&!defined(__DragonFly__)) || defined(UL_SOLARIS) d14 139 @ 1.6 log @update to 1.8.4 too many changes to list here (1.6.0 was in 2002), see the bundled ChangeLog file @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.5 2006/03/28 23:05:05 joerg Exp $ d3 10 a12 5 --- src/js/js.h.orig Mon Sep 22 06:05:53 2003 +++ src/js/js.h Mon Sep 22 06:06:47 2003 @@@@ -62,8 +62,12 @@@@ # include # include a13 67 -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) +# if defined(__FreeBSD__) && __FreeBSD_version >= 500000 +# include +# else # include +# endif # define JS_DATA_TYPE joystick # define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # elif defined(__linux__) @@@@ -111,7 +115,7 @@@@ #elif defined (macintosh) # define _JS_MAX_AXES 9 #else -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) # define _JS_MAX_AXES 2 # else # define _JS_MAX_AXES 9 @@@@ -132,9 +136,9 @@@@ class jsJoystick -/*#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) int id ; -#endif*/ +#endif #ifdef WIN32 JOYINFOEX js ; UINT js_id ; @@@@ -312,7 +316,7 @@@@ class jsJoystick } #else -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) FILE *joyfile; char joyfname[1024]; int noargs, in_no_axes; @@@@ -338,7 +342,7 @@@@ class jsJoystick if ( error ) return ; -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) /* FIXME: get joystick name for BSD @@@@ -494,7 +498,7 @@@@ public: #else -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) //id = ident; sprintf ( fname, "/dev/joy%d", ident ) ; # elif defined(__linux__) @@@@ -725,7 +729,7 @@@@ public: } if ( buttons ) -# if defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) *buttons = ( js.b1 ? 1 : 0 ) | ( js.b2 ? 2 : 0 ) ; # else *buttons = js.buttons ; @ 1.5 log @Add DragonFly support. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2003/09/22 12:27:29 xtraeme Exp $ @ 1.4 log @Updated to 1.6.0. Closes PR pkg/19015 and pkg/22612. Changes: PLIB v1.6.0 (Sept 2nd 2002) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Significant improvements and cleanup throughout PLIB, especially in PUI. * ssgAux library added - includes handy classes for more sophisticated effects layered on top of SSG. + Standard shapes like cubes, spheres, cylinders and teapots. + Water waves. + Fire. + Particle Systems + Lens Flare. * More example programs. * P-Guide GUI builder for PUI. * JS promoted to a full library. PLIB v1.5.1 (July 21st 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Added ssgTween and ssgTweenController * Added puFileSelector - henceforth puFilePicker is deprecated. * Added ulList * Added VRML loader (this one works!) * Numerous bug fixes in other loaders. * Added TopHat support to JS * Added support for >3 simultaneous sounds in SL. (You have to explicitly enable that though - it's not the default) * Fixed bugs in util's directory handling. * puInput and puListBox now cope better with text that is too big for the widget * puListBox (and hence puFileSelector and puFilePicker) works with both large and small font sizes. * puDial changed to be derived from puSlider - many consequences of that change will be visible in the application. (eg output range is 0..1 and not 0..360) * PUI widgets are now 'sticky' so that if you are dragging a slider along a puSlider and your mouse slips off the edge of it, it'll still have "focus". * Added sgLerpAnglesVec3 to linearly interpolate angles allowing for the nasty wrap-around-360 problem. * Added sgLineSegment3ToLine3, sgDistSquaredToLineVec3 sgDistSquaredToLineSegmentVec3, sgDistToLineVec3 and sgDistToLineSegmentVec3. Also sgLine3 and sgLineSegment3 structures. * Added a 'Gallery' page to the documentation to show potential developers the range of applications that use PLIB - and also to promote things our developers have done. To save download time and CVS space, the actual images are not in the PLIB tarball. PLIB v1.4.2 (July 21st 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Changes in NET to allow compilation under RedHat 7.1 * Fixed a small bug in ssgaSphere * Fixes a small bug in puFilePicker PLIB v1.4.1 (June 25th 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Converted MSVC project files to 'BINARY' in the CVS archive because some versions of MSVC don't line UNIX-style line endings. * Many improvements and bug fixes to puFileSelector and puListBox. * Minor fix to NET to accomodate Solaris users. * Fixed puMenuBar so it highlights as you drag the mouse across it. * Fixed ulOpenDir so it returns NULL on error on non-MSVC systems * Changed colour of text on buttons in documentation to make them easier to read by colour-blind users. PLIB v1.5.0 (June 20th 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Just a 'place holder' - actually identical to 1.4.0. PLIB v1.4.0 (June 20th 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Fixed example programs so they don't use the obsolete _SSG_TYPE tags. * Removed multiplie tags on web pages. * Updated 'AUTHORS' file. * Added 'demos' to the CVS repository. PLIB v1.3.3 (June 18th 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Various warnings cleaned up under MSVC. * Fixed function prototypes for the Quaternion functions in SG * Fixed bug in sgEulerToQuat where the angles were not being converted from degrees to radians. * Changed PUI to make sliders and dial widgets grab a hold of the mouse focus and not release it until the button is released. This is a subtle but important behavioural change. * puDial's are now derived from puSlider's - one side-effect of that is that they now return 0..1 rather than 0..360 and no longer support the maximum and minimum range functions. PLIB v1.3.2 (June 13th 2001) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * This CHANGES file has regrettably not been well maintained, hence there a numerous changes not listed here. * File loaders now require app to pass 'ssgLoaderOptions' rather than other ad-hoc callback function hooks. * Added Active Widget Implementation (pui) * Added puFilePicker * Added Ref Counting to ssgState * Added puBiSlider and puTriSlider * Added some missing 'AUTHORS' entries. * puDial widget (was actually in 1.3.1 but got missed in the 'CHANGES' file) * Fixed a problem in the configure.in that prevented ssgAux from building. * Moved the 'name' and 'user_data' (with associated set/get member functions) from ssgEntity down into ssgBase so that these functions will work with ssgState and ssgTexture objects. This is needed for PrettyPoly. PLIB v1.3.1 (Sept 15th 2000) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * PLIB examples' data files consolidated into a single 'examples/data' directory. * Added 'SSGAUX' library - include and link to /usr/lib/libplibssgaux.a * Aux library has 'ssga' classes to add high level shapes such as cylinders, cubes and spheres (two different kinds). * Lots of new example programs. + New PUI 'complex' uses multiple windows. + Cute 'waving flag' demo + Working Quaternions versus Eulers demo + Model viewer (this is actually a useful program - as well as a demo). PLIB v1.3.0 (July 1st 2000) ~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Unstable version of 1.2.0, no significant code changes. @ text @d1 1 a1 1 $NetBSD$ d5 2 a6 1 @@@@ -63,7 +63,11 @@@@ d9 3 a11 2 # if defined(__FreeBSD__) || defined(__NetBSD__) +# if __FreeBSD_version >= 500000 d19 10 a28 1 @@@@ -132,9 +136,9 @@@@ d33 1 a33 1 +#if defined(__FreeBSD__) || defined(__NetBSD__) d40 36 @ 1.3 log @Update plib to 1.2.0. Changes are too numerous to list here. The author incorporated all NetBSD patches into this version, so none are required anymore. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.2 2000/08/04 02:00:47 jlam Exp $ d3 3 a5 4 --- src/js/js.h.orig Sat Oct 16 17:08:01 1999 +++ src/js/js.h Thu Aug 3 21:42:03 2000 @@@@ -29,7 +29,8 @@@@ # include d8 4 a11 3 -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) d13 1 d16 4 a19 11 @@@@ -76,7 +77,8 @@@@ #ifdef WIN32 # define _JS_MAX_AXES 6 #else -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) # define _JS_MAX_AXES 2 # else # define _JS_MAX_AXES 6 @@@@ -85,7 +87,8 @@@@ d21 2 a22 5 class jsJoystick { -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) d24 2 a25 1 #endif d27 2 a28 40 @@@@ -153,7 +156,8 @@@@ } #else -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) FILE *joyfile; char joyfname[1024]; int noargs, in_no_axes; @@@@ -178,7 +182,8 @@@@ if ( error ) return ; -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) float axes[_JS_MAX_AXES]; int buttons[_JS_MAX_AXES]; @@@@ -316,7 +321,8 @@@@ default : num_axes = 0 ; setError () ; break ; } #else -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) id = ident; sprintf ( fname, "/dev/joy%d", ident ) ; # else @@@@ -467,7 +473,8 @@@@ } if ( buttons ) -# ifdef __FreeBSD__ +# if defined(__FreeBSD__) || \ + (defined(__NetBSD__) && defined(MACHINE_JOYSTICK_IS_PRESENT)) *buttons = ( js.b1 ? 1 : 0 ) | ( js.b2 ? 2 : 0 ) ; # else *buttons = js.buttons ; @ 1.2 log @Make use of the MACHINE_JOYSTICK_IS_PRESENT definition so that this has a chance of compiling on platforms without , i.e. everything except i386 and arm32. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d3 3 a5 3 --- src/js/js.h.orig Sat Oct 16 23:08:01 1999 +++ src/js/js.h Sat Feb 19 22:26:37 2000 @@@@ -29,7 +29,7 @@@@ d10 2 a11 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) d15 1 a15 1 @@@@ -76,7 +76,7 @@@@ d20 2 a21 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) d25 1 a25 1 @@@@ -85,7 +85,7 @@@@ d30 2 a31 1 +#if defined(__FreeBSD__) || defined(__NetBSD__) d35 1 a35 1 @@@@ -153,7 +153,7 @@@@ d40 2 a41 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) d45 1 a45 1 @@@@ -178,7 +178,7 @@@@ d50 2 a51 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) d55 1 a55 1 @@@@ -316,7 +316,7 @@@@ d60 2 a61 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) d65 1 a65 1 @@@@ -467,7 +467,7 @@@@ d70 2 a71 1 +# if defined(__FreeBSD__) || defined(__NetBSD__) @ 1.1.1.1 log @Initial import of plib-1.0.20, a set of OpenSource (LGPL) libraries that will permit programmers to write games and other realtime interactive applications that are 100% portable across a wide range of hardware and operating systems. @ text @@