--- orig.Access.C 2003-09-19 17:08:01.000000000 +0100 +++ Access.C 2010-10-03 12:29:36.000000000 +0100 @@ -19,6 +19,7 @@ */ #include +#include #include #include "Access.h" @@ -62,43 +63,43 @@ void Access::ShowDiagnostics() { - cout << "AccessX Timeout: " << onoroff(GetAccessXTOState()) << endl; - cout << "AccessX Timeout Value: " << GetAccessXDelay() << endl; + std::cout << "AccessX Timeout: " << onoroff(GetAccessXTOState()) << std::endl; + std::cout << "AccessX Timeout Value: " << GetAccessXDelay() << std::endl; - cout << endl; + std::cout << std::endl; - cout << "MouseKeys: " << onoroff(GetMouseKeysState()) << endl; - cout << " - Delay: " << GetMouseKeysDelay() << endl; - cout << " - Interval: " << GetMouseKeysInterval() << endl; - cout << " - T to Max: " << GetMouseKeysTimeToMax() << endl; - cout << " - Max Speed: " << GetMouseKeysMaxSpeed() << endl; - cout << " - Curve: " << GetMouseKeysCurve() << endl; + std::cout << "MouseKeys: " << onoroff(GetMouseKeysState()) << std::endl; + std::cout << " - Delay: " << GetMouseKeysDelay() << std::endl; + std::cout << " - Interval: " << GetMouseKeysInterval() << std::endl; + std::cout << " - T to Max: " << GetMouseKeysTimeToMax() << std::endl; + std::cout << " - Max Speed: " << GetMouseKeysMaxSpeed() << std::endl; + std::cout << " - Curve: " << GetMouseKeysCurve() << std::endl; - cout << endl; + std::cout << std::endl; - cout << "SlowKeys: " << onoroff(GetSlowKeysState()) << endl; - cout << " - Delay: " << GetSlowKeysDelay() << endl; + std::cout << "SlowKeys: " << onoroff(GetSlowKeysState()) << std::endl; + std::cout << " - Delay: " << GetSlowKeysDelay() << std::endl; - cout << endl; + std::cout << std::endl; - cout << "StickyKeys: " << onoroff(GetStickyKeysState()) << endl; - cout << " - Latch/Lock: " << onoroff(GetStickyKeysLatchToLockState()) - << endl; - cout << " - 2 Key Dis: " << - onoroff(GetStickyKeysTwoKeyDisableState()) << endl; + std::cout << "StickyKeys: " << onoroff(GetStickyKeysState()) << std::endl; + std::cout << " - Latch/Lock: " << onoroff(GetStickyKeysLatchToLockState()) + << std::endl; + std::cout << " - 2 Key Dis: " << + onoroff(GetStickyKeysTwoKeyDisableState()) << std::endl; - cout << endl; + std::cout << std::endl; - cout << "BounceKeys: " << onoroff(GetBounceKeysState()) << endl; - cout << " - Delay: " << GetBounceKeysDelay() << endl; + std::cout << "BounceKeys: " << onoroff(GetBounceKeysState()) << std::endl; + std::cout << " - Delay: " << GetBounceKeysDelay() << std::endl; - cout << endl; + std::cout << std::endl; - cout << "RepeatKeys: " << onoroff(GetRepeatKeysState()) << endl; - cout << " - Delay: " << GetRepeatKeysDelay() << endl; - cout << " - Interval: " << GetRepeatKeysInterval() << endl; + std::cout << "RepeatKeys: " << onoroff(GetRepeatKeysState()) << std::endl; + std::cout << " - Delay: " << GetRepeatKeysDelay() << std::endl; + std::cout << " - Interval: " << GetRepeatKeysInterval() << std::endl; - cout << endl; + std::cout << std::endl; } // --- orig.Access.h 2003-09-19 17:00:42.000000000 +0100 +++ Access.h 2010-10-03 12:24:20.000000000 +0100 @@ -21,7 +21,7 @@ * */ -#include +#include #include inline char* onoroff(int val) --- orig.ax.C 2003-09-19 17:09:31.000000000 +0100 +++ ax.C 2010-10-03 12:31:00.000000000 +0100 @@ -62,45 +62,45 @@ void showHelp(void) { - cout << "Usage: accessx [options & option/value pairs]" - << endl << endl; - cout << "status: Show status of AccessX Features" << endl - << "help: Show this help text" << endl - << "loadconfig: Load the ~/AccessX config file" << endl - << endl - << "+timeout: Enable AccessX Timeout" << endl - << "-timeout: Disable AccessX Timeout" << endl - << "timeout : Set AccessX Timeout" << endl - << endl - << "+mousekeys: Enable MouseKeys" << endl - << "-mousekeys: Disable MouseKeys" << endl - << "mousedelay : Set MouseKeys Delay" << endl - << "mouseinterval : Set MouseKeys Interval" << endl - << "mousetimetomax : Set MouseKeys time to max speed" << endl - << "mousemaxspeed : Set MouseKeys max speed" << endl - << "mousecurve : Set MouseKeys acceleration curve" << endl - << endl - << "+slowkeys: Enable SlowKeys" << endl - << "-slowkeys: Disable SlowKeys" << endl - << "slowdelay : Set SlowKeys Delay" << endl - << endl - << "+stickykeys: Enable StickyKeys" << endl - << "-stickykeys: Disable StickyKeys" << endl - << "+stickylatchtolock: Enable S.K. Latch To Lock" << endl - << "-stickylatchtolock: Disbale S.K. Latch To Lock" << endl - << "+stickytwokeydisable: Enable S.K. Two Key Disable" << endl - << "-stickytwokeydisable: Disable S.K. Two Key Disable" << endl - << endl - << "+bouncekeys: Enable BounceKeys" << endl - << "-bouncekeys: Disable BounceKeys" << endl - << "bouncedelay : Set Debounce Delay" << endl - << endl - << "+repeatkeys: Enable RepeatKeys" << endl - << "-repeatkeys: Disable RepeatKeys" << endl - << "repeatdelay : Set RepeatKeys Delay" << endl - << "repeatinterval : Set RepeatKeys Interval" << endl << endl - << "With no options, loads config file." << endl - << endl; + std::cout << "Usage: accessx [options & option/value pairs]" + << std::endl << std::endl; + std::cout << "status: Show status of AccessX Features" << std::endl + << "help: Show this help text" << std::endl + << "loadconfig: Load the ~/AccessX config file" << std::endl + << std::endl + << "+timeout: Enable AccessX Timeout" << std::endl + << "-timeout: Disable AccessX Timeout" << std::endl + << "timeout : Set AccessX Timeout" << std::endl + << std::endl + << "+mousekeys: Enable MouseKeys" << std::endl + << "-mousekeys: Disable MouseKeys" << std::endl + << "mousedelay : Set MouseKeys Delay" << std::endl + << "mouseinterval : Set MouseKeys Interval" << std::endl + << "mousetimetomax : Set MouseKeys time to max speed" << std::endl + << "mousemaxspeed : Set MouseKeys max speed" << std::endl + << "mousecurve : Set MouseKeys acceleration curve" << std::endl + << std::endl + << "+slowkeys: Enable SlowKeys" << std::endl + << "-slowkeys: Disable SlowKeys" << std::endl + << "slowdelay : Set SlowKeys Delay" << std::endl + << std::endl + << "+stickykeys: Enable StickyKeys" << std::endl + << "-stickykeys: Disable StickyKeys" << std::endl + << "+stickylatchtolock: Enable S.K. Latch To Lock" << std::endl + << "-stickylatchtolock: Disbale S.K. Latch To Lock" << std::endl + << "+stickytwokeydisable: Enable S.K. Two Key Disable" << std::endl + << "-stickytwokeydisable: Disable S.K. Two Key Disable" << std::endl + << std::endl + << "+bouncekeys: Enable BounceKeys" << std::endl + << "-bouncekeys: Disable BounceKeys" << std::endl + << "bouncedelay : Set Debounce Delay" << std::endl + << std::endl + << "+repeatkeys: Enable RepeatKeys" << std::endl + << "-repeatkeys: Disable RepeatKeys" << std::endl + << "repeatdelay : Set RepeatKeys Delay" << std::endl + << "repeatinterval : Set RepeatKeys Interval" << std::endl << std::endl + << "With no options, loads config file." << std::endl + << std::endl; } @@ -115,26 +115,26 @@ void showRawStatus(Access* ax) { - cout << ax->GetAccessXTOState() << endl; - cout << (int)ceil(ax->GetAccessXDelay() / 60.0) << endl; - cout << ax->GetMouseKeysState() << endl; - cout << (int)ceil(ax->GetMouseKeysTimeToMax() / 1000.0) << endl; - cout << ax->GetMouseKeysMaxSpeed() << endl; - cout << ax->GetSlowKeysState() << endl; - cout << (float)(ax->GetSlowKeysDelay() / 1000.0) << endl; - cout << ax->GetStickyKeysState() << endl; - cout << ax->GetStickyKeysLatchToLockState() << endl; - cout << ax->GetStickyKeysTwoKeyDisableState() << endl; - cout << ax->GetBounceKeysState() << endl; - cout << (float)(ax->GetBounceKeysDelay() / 1000.0) << endl; - cout << ax->GetRepeatKeysState() << endl; - cout << (float)(ax->GetRepeatKeysDelay() / 1000.0) << endl; - cout << (float)(1000.0 / ax->GetRepeatKeysInterval()) << endl; - cout << ToggleKeysToggleSet << endl; - cout << SoundOnOffToggleSet << endl; - cout << SlowKeysOnAcceptToggleSet << endl; - cout << SlowKeysOnPressToggleSet << endl; - cout << EnableAccessXToggleSet << endl; + std::cout << ax->GetAccessXTOState() << std::endl; + std::cout << (int)ceil(ax->GetAccessXDelay() / 60.0) << std::endl; + std::cout << ax->GetMouseKeysState() << std::endl; + std::cout << (int)ceil(ax->GetMouseKeysTimeToMax() / 1000.0) << std::endl; + std::cout << ax->GetMouseKeysMaxSpeed() << std::endl; + std::cout << ax->GetSlowKeysState() << std::endl; + std::cout << (float)(ax->GetSlowKeysDelay() / 1000.0) << std::endl; + std::cout << ax->GetStickyKeysState() << std::endl; + std::cout << ax->GetStickyKeysLatchToLockState() << std::endl; + std::cout << ax->GetStickyKeysTwoKeyDisableState() << std::endl; + std::cout << ax->GetBounceKeysState() << std::endl; + std::cout << (float)(ax->GetBounceKeysDelay() / 1000.0) << std::endl; + std::cout << ax->GetRepeatKeysState() << std::endl; + std::cout << (float)(ax->GetRepeatKeysDelay() / 1000.0) << std::endl; + std::cout << (float)(1000.0 / ax->GetRepeatKeysInterval()) << std::endl; + std::cout << ToggleKeysToggleSet << std::endl; + std::cout << SoundOnOffToggleSet << std::endl; + std::cout << SlowKeysOnAcceptToggleSet << std::endl; + std::cout << SlowKeysOnPressToggleSet << std::endl; + std::cout << EnableAccessXToggleSet << std::endl; } /////////////////////////////////////////////////////////////////////////////// @@ -183,7 +183,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetAccessXDelay(value); @@ -201,7 +201,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetMouseKeysDelay(value); @@ -210,7 +210,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetMouseKeysInterval(value); @@ -219,7 +219,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetMouseKeysTimeToMax(value); @@ -228,7 +228,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetMouseKeysMaxSpeed(value); @@ -237,7 +237,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetMouseKeysCurve(value); @@ -255,7 +255,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetSlowKeysDelay(value); @@ -294,7 +294,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetBounceKeysDelay(value); @@ -312,7 +312,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetRepeatKeysDelay(value); @@ -321,7 +321,7 @@ index++; rc = getValue(argv[index], &value); if(rc) { - cout << "Invalid Option." << endl; + std::cout << "Invalid Option." << std::endl; exit(2); } ax->SetRepeatKeysInterval(value); @@ -330,7 +330,7 @@ // AccessX Unknown Features --------------------------------------------- else { - cout << "Unknown Option!" << endl; + std::cout << "Unknown Option!" << std::endl; exit(1); } @@ -490,14 +490,14 @@ else if(!strcmp(param, "*TimeOutScale.value:")) { rc = getValue(value, &TimeOutScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } else if(!strcmp(param, "*TimeOutScale.decimalPoints:")) { rc = getValue(value, &TimeOutScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -505,7 +505,7 @@ else if(!strcmp(param, "*KRGSlowKeysDelayScale.value:")) { rc = getValue(value, &KRGSlowKeysDelayScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -513,7 +513,7 @@ else if(!strcmp(param, "*KRGSlowKeysDelayScale.decimalPoints:")) { rc = getValue(value, &KRGSlowKeysDelayScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -521,7 +521,7 @@ else if(!strcmp(param, "*MouseMaxSpeedScale.value:")) { rc = getValue(value, &MouseMaxSpeedScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -529,7 +529,7 @@ else if(!strcmp(param, "*MouseMaxSpeedScale.decimalPoints:")) { rc = getValue(value, &MouseMaxSpeedScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -537,7 +537,7 @@ else if(!strcmp(param, "*KRGDebounceScale.value:")) { rc = getValue(value, &KRGDebounceScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -545,7 +545,7 @@ else if(!strcmp(param, "*KRGDebounceScale.decimalPoints:")) { rc = getValue(value, &KRGDebounceScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -553,7 +553,7 @@ else if(!strcmp(param, "*KRGRepeatDelayScale.value:")) { rc = getValue(value, &KRGRepeatDelayScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -561,7 +561,7 @@ else if(!strcmp(param, "*KRGRepeatDelayScale.decimalPoints:")) { rc = getValue(value, &KRGRepeatDelayScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -569,7 +569,7 @@ else if(!strcmp(param, "*KRGRepeatRateScale.value:")) { rc = getValue(value, &KRGRepeatRateScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -577,7 +577,7 @@ else if(!strcmp(param, "*KRGRepeatRateScale.decimalPoints:")) { rc = getValue(value, &KRGRepeatRateScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -585,7 +585,7 @@ else if(!strcmp(param, "*MouseTimeToMaxScale.value:")) { rc = getValue(value, &MouseTimeToMaxScaleValue); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } @@ -593,13 +593,13 @@ else if(!strcmp(param, "*MouseTimeToMaxScale.decimalPoints:")) { rc = getValue(value, &MouseTimeToMaxScaleDecimalPoints); if(rc) { - cout << "Invalid Config File Option." << endl; + std::cout << "Invalid Config File Option." << std::endl; exit(10); } } else { - cout << "Invalid Config File Parameter." << endl; + std::cout << "Invalid Config File Parameter." << std::endl; exit(10); } } @@ -621,7 +621,7 @@ SlowKeysDelayValue /= 10; if(SlowKeysDelayValue == 0) { - cout << "Config File: Slow Keys Delay Cannot Be Zero." << endl; + std::cout << "Config File: Slow Keys Delay Cannot Be Zero." << std::endl; exit(10); } @@ -629,7 +629,7 @@ TimeOutValue /= 10; if(TimeOutValue == 0) { - cout << "Config File: Timeout Value Cannot Be Zero." << endl; + std::cout << "Config File: Timeout Value Cannot Be Zero." << std::endl; exit(10); } @@ -637,7 +637,7 @@ MouseMaxSpeedValue /= 10; if(MouseMaxSpeedValue == 0) { - cout << "Config File: Mouse Keys Max Speed Cannot Be Zero." << endl; + std::cout << "Config File: Mouse Keys Max Speed Cannot Be Zero." << std::endl; exit(10); } @@ -645,7 +645,7 @@ MouseTimeToMaxValue /= 10; if(MouseTimeToMaxValue == 0) { - cout << "Config File: Mouse Keys Time To Max Cannot Be Zero." << endl; + std::cout << "Config File: Mouse Keys Time To Max Cannot Be Zero." << std::endl; exit(10); } @@ -653,7 +653,7 @@ DebounceValue /= 10; if(DebounceValue == 0) { - cout << "Config File: Debounce Delay Cannot Be Zero." << endl; + std::cout << "Config File: Debounce Delay Cannot Be Zero." << std::endl; exit(10); } @@ -661,7 +661,7 @@ RepeatDelayValue /= 10; if(RepeatDelayValue == 0) { - cout << "Config File: Repeat Keys Delay Cannot Be Zero." << endl; + std::cout << "Config File: Repeat Keys Delay Cannot Be Zero." << std::endl; exit(10); } @@ -669,7 +669,7 @@ RepeatRateValue /= 10; if(RepeatRateValue == 0) { - cout << "Config File: Repeat Keys Rate Cannot Be Zero." << endl; + std::cout << "Config File: Repeat Keys Rate Cannot Be Zero." << std::endl; exit(10); } @@ -695,14 +695,14 @@ ax->SetRepeatKeysInterval((int)floor(1000.0/RepeatRateValue)); if(!quiet) { - cout << "Config file ~/AccessX loaded." << endl - << "\"ax help\" for help." << endl; + std::cout << "Config file ~/AccessX loaded." << std::endl + << "\"ax help\" for help." << std::endl; } } else { if(!quiet) { - cout << "Config File ~/AccessX not found!" << endl - << "\"ax help\" for help." << endl; + std::cout << "Config File ~/AccessX not found!" << std::endl + << "\"ax help\" for help." << std::endl; } } } --- orig.ax.h 2003-09-19 17:06:56.000000000 +0100 +++ ax.h 2010-10-03 12:24:42.000000000 +0100 @@ -24,7 +24,7 @@ // Include Files -#include +#include #include #include #include