pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xracer extern inline -> static inline



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b16ae1cadaf5
branches:  trunk
changeset: 610483:b16ae1cadaf5
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Oct 26 20:22:12 2012 +0000

description:
extern inline -> static inline

diffstat:

 games/xracer/distinfo                              |    4 +-
 games/xracer/patches/patch-include_xracer-craft.h  |   15 ++
 games/xracer/patches/patch-include_xracer-player.h |  125 +++++++++++++++++++++
 3 files changed, 143 insertions(+), 1 deletions(-)

diffs (163 lines):

diff -r 0ce32deb0c6c -r b16ae1cadaf5 games/xracer/distinfo
--- a/games/xracer/distinfo     Fri Oct 26 20:21:33 2012 +0000
+++ b/games/xracer/distinfo     Fri Oct 26 20:22:12 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2006/02/28 17:45:55 wiz Exp $
+$NetBSD: distinfo,v 1.9 2012/10/26 20:22:12 joerg Exp $
 
 SHA1 (xracer-0.96.9.tar.gz) = 8c7a4f0be46ee83bbb588f6c5834340f519a3059
 RMD160 (xracer-0.96.9.tar.gz) = 1e9611dd55b1a3f0bf681a7051fcbb37bec47a6e
@@ -21,3 +21,5 @@
 SHA1 (patch-aq) = 90dd0c5a669439b47ca489117b9efa19c656f40a
 SHA1 (patch-ar) = be958b29fdf3fdb82df9b0cc6f1c152371c7a858
 SHA1 (patch-as) = 5f22c78bec9b9fab9feb2cae73afc251f4367066
+SHA1 (patch-include_xracer-craft.h) = b53a6f89f29263451ea111a44a5b84eb91721c1f
+SHA1 (patch-include_xracer-player.h) = 6a7f33c926d74c1d2ee9dc21d91acbf269b57f6c
diff -r 0ce32deb0c6c -r b16ae1cadaf5 games/xracer/patches/patch-include_xracer-craft.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xracer/patches/patch-include_xracer-craft.h Fri Oct 26 20:22:12 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-include_xracer-craft.h,v 1.1 2012/10/26 20:22:12 joerg Exp $
+
+--- include/xracer-craft.h.orig        2012-10-26 13:35:24.000000000 +0000
++++ include/xracer-craft.h
+@@ -68,9 +68,7 @@ extern const struct xrCraft *xrCraftGetD
+ extern const struct xrCraft *xrCraftGetNext (const struct xrCraft *);
+ 
+ /* Call display function for craft. */
+-extern void xrCraftDisplay (const struct xrCraft *craft);
+-
+-extern inline void
++static inline void
+ xrCraftDisplay (const struct xrCraft *craft)
+ {
+   craft->display ();
diff -r 0ce32deb0c6c -r b16ae1cadaf5 games/xracer/patches/patch-include_xracer-player.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xracer/patches/patch-include_xracer-player.h        Fri Oct 26 20:22:12 2012 +0000
@@ -0,0 +1,125 @@
+$NetBSD: patch-include_xracer-player.h,v 1.1 2012/10/26 20:22:12 joerg Exp $
+
+--- include/xracer-player.h.orig       2012-10-26 13:35:56.000000000 +0000
++++ include/xracer-player.h
+@@ -130,79 +130,59 @@ extern void xrPlayerEndGame (void);
+ extern void xrPlayerUpdate (const struct xrGameControls *controls);
+ 
+ /* Inline structure accessors. */
+-extern int xrPlayerHasExternalShield (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerHasExternalShield (const struct xrPlayer *player)
+ {
+   return player->has_external_shield;
+ }
+ 
+-extern int xrPlayerHasAutoPilot (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerHasAutoPilot (const struct xrPlayer *player)
+ {
+   return player->has_autopilot;
+ }
+ 
+ /* This always returns the position of the midpoint of the back line. */
+-extern const GLfloat *xrPlayerGetPosition (const struct xrPlayer *player);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetPosition (const struct xrPlayer *player)
+ {
+   return player->backline_midpoint;
+ }
+ 
+-extern int xrPlayerGetSegment (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetSegment (const struct xrPlayer *player)
+ {
+   return player->seg[0];
+ }
+ 
+ /* Return the eye position, accounting for OOBE, if necessary. */
+-extern const GLfloat *xrPlayerGetCameraEye (const struct xrPlayer *player,
+-                                          int oobe);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraEye (const struct xrPlayer *player, int oobe)
+ {
+   return oobe ? player->eye_oobe : player->backline_midpoint;
+ }
+ 
+ /* Return the camera centre point, accounting for OOBE, if necessary. */
+-extern const GLfloat *xrPlayerGetCameraCentre (const struct xrPlayer *player,
+-                                             int oobe);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraCentre (const struct xrPlayer *player, int oobe)
+ {
+   return oobe ? player->centre_oobe : player->posn[0];
+ }
+ 
+ /* Return the camera up vector (this is unaffected by OOBE). */
+-extern const GLfloat *xrPlayerGetCameraUp (const struct xrPlayer *player);
+-
+-extern inline const GLfloat *
++static inline const GLfloat *
+ xrPlayerGetCameraUp (const struct xrPlayer *player)
+ {
+   return player->up;
+ }
+ 
+-extern int xrPlayerGetSpeed (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetSpeed (const struct xrPlayer *player)
+ {
+   return xrMagnitude (player->momentum[0]) * 500.;
+ }
+ 
+-extern int xrPlayerGetPowerup (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetPowerup (const struct xrPlayer *player)
+ {
+   return player->powerup;
+@@ -211,18 +191,14 @@ xrPlayerGetPowerup (const struct xrPlaye
+ /* Return the player's current lap, counting from 1. After the player has
+  * completed the game, this can return NR_LAPS + 1, so beware.
+  */
+-extern int xrPlayerGetCurrentLap (const struct xrPlayer *player);
+-
+-extern inline int
++static inline int
+ xrPlayerGetCurrentLap (const struct xrPlayer *player)
+ {
+   return player->displayed_current_lap + 1;
+ }
+ 
+ /* Return the player's current lap time. */
+-extern double xrPlayerGetCurrentLapTime (const struct xrPlayer *player);
+-
+-extern inline double
++static inline double
+ xrPlayerGetCurrentLapTime (const struct xrPlayer *player)
+ {
+   return xrCurrentTime - player->start_of_lap_time;
+@@ -232,9 +208,7 @@ xrPlayerGetCurrentLapTime (const struct 
+  * Note: the LAP argument starts counting from 1, and must be <= NR_LAPS.
+  * This function does not return the current lap time.
+  */
+-extern double xrPlayerGetLapTime (const struct xrPlayer *player, int lap);
+-
+-extern inline double
++static inline double
+ xrPlayerGetLapTime (const struct xrPlayer *player, int lap)
+ {
+   lap--;



Home | Main Index | Thread Index | Old Index