From 7f6d4b0a01954d01010b2b9c0bb354b070738ee4 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 6 Jun 2001 23:31:48 +0000 Subject: [PATCH] Irix Mips compiler tweaks. --- src/Input/fgjs.cxx | 3 --- src/Input/input.cxx | 14 +++++++++----- src/Main/fg_commands.cxx | 2 ++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index a17d71a2b..5745aa4d8 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -202,6 +202,3 @@ int main(void) { return 1; } - - - diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 2f27e938b..43cf0037c 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -570,7 +570,8 @@ FGInput::_init_joystick () // // Initialize the axes. // - for (int j = 0; j < naxes; j++) { + int j; + for (j = 0; j < naxes; j++) { const SGPropertyNode * axis_node = js_node->getChild("axis", j); if (axis_node == 0) { SG_LOG(SG_INPUT, SG_INFO, "No bindings for axis " << j); @@ -592,7 +593,7 @@ FGInput::_init_joystick () // // Initialize the buttons. // - for (int j = 0; j < nbuttons; j++) { + for (j = 0; j < nbuttons; j++) { const SGPropertyNode * button_node = js_node->getChild("button", j); if (button_node == 0) { SG_LOG(SG_INPUT, SG_INFO, "No bindings for button " << j); @@ -630,7 +631,10 @@ FGInput::_update_joystick () float js_val, diff; float axis_values[MAX_AXES]; - for (int i = 0; i < MAX_JOYSTICKS; i++) { + int i; + int j; + + for ( i = 0; i < MAX_JOYSTICKS; i++) { jsJoystick * js = _joystick_bindings[i].js; if (js == 0 || js->notWorking()) @@ -640,7 +644,7 @@ FGInput::_update_joystick () // Fire bindings for the axes. - for (int j = 0; j < _joystick_bindings[i].naxes; j++) { + for ( j = 0; j < _joystick_bindings[i].naxes; j++) { axis &a = _joystick_bindings[i].axes[j]; // Do nothing if the axis position @@ -658,7 +662,7 @@ FGInput::_update_joystick () } // Fire bindings for the buttons. - for (int j = 0; j < _joystick_bindings[i].nbuttons; j++) { + for (j = 0; j < _joystick_bindings[i].nbuttons; j++) { bool pressed = ((buttons & (1 << j)) > 0); button &b = _joystick_bindings[i].buttons[j]; diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 3d965546f..cedd772ac 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -16,8 +16,10 @@ #include "fg_commands.hxx" SG_USING_STD(string); +#if !defined(SG_HAVE_NATIVE_SGI_COMPILERS) SG_USING_STD(ifstream); SG_USING_STD(ofstream); +#endif #include "fg_props.hxx" #include "fg_io.hxx" -- 2.39.5