Lines 1-6
Link Here
|
1 |
--- Options.C.orig Tue Sep 10 18:55:27 1996 |
1 |
--- Options.C.orig Wed Sep 11 01:55:27 1996 |
2 |
+++ Options.C Sat Feb 26 17:06:11 2000 |
2 |
+++ Options.C Fri Feb 7 19:12:41 2003 |
3 |
@@ -26,6 +26,7 @@ |
3 |
@@ -19,6 +19,7 @@ |
|
|
4 |
|
5 |
extern "C" { |
6 |
#include <stdio.h> |
7 |
+#include <stdlib.h> |
8 |
} |
9 |
|
10 |
#include "Options.H" |
11 |
@@ -26,6 +27,7 @@ |
4 |
Options::Options( int argc, char* argv[] ) |
12 |
Options::Options( int argc, char* argv[] ) |
5 |
: _divider( 512 ), _interval( 5 ), _link( 0 ), _period( 60 ), _retry( 60 ), _showTx( true ), _showRx( true ), _txColor( "forestgreen" ), _rxColor( "red" ) |
13 |
: _divider( 512 ), _interval( 5 ), _link( 0 ), _period( 60 ), _retry( 60 ), _showTx( true ), _showRx( true ), _txColor( "forestgreen" ), _rxColor( "red" ) |
6 |
{ |
14 |
{ |
Lines 8-14
Link Here
|
8 |
for ( int i = 1; i < argc; i++ ) { |
16 |
for ( int i = 1; i < argc; i++ ) { |
9 |
if ( !strcmp( argv[i], "-cmd" ) ) { |
17 |
if ( !strcmp( argv[i], "-cmd" ) ) { |
10 |
_cmd = argv[++i]; |
18 |
_cmd = argv[++i]; |
11 |
@@ -33,6 +34,8 @@ |
19 |
@@ -33,6 +35,8 @@ |
12 |
sscanf( argv[++i], "%d", &_divider ); |
20 |
sscanf( argv[++i], "%d", &_divider ); |
13 |
} else if ( !strcmp( argv[i], "-i" ) ) { |
21 |
} else if ( !strcmp( argv[i], "-i" ) ) { |
14 |
sscanf( argv[++i], "%d", &_interval ); |
22 |
sscanf( argv[++i], "%d", &_interval ); |
Lines 17-23
Link Here
|
17 |
} else if ( !strcmp( argv[i], "-link" ) ) { |
25 |
} else if ( !strcmp( argv[i], "-link" ) ) { |
18 |
sscanf( argv[++i], "%d", &_link ); |
26 |
sscanf( argv[++i], "%d", &_link ); |
19 |
} else if ( !strcmp( argv[i], "-p" ) ) { |
27 |
} else if ( !strcmp( argv[i], "-p" ) ) { |
20 |
@@ -60,6 +63,7 @@ |
28 |
@@ -60,6 +64,7 @@ |
21 |
fprintf( stderr, "-d n Horizontal divider spacing in bytes per second (default: %d).\n", divider() ); |
29 |
fprintf( stderr, "-d n Horizontal divider spacing in bytes per second (default: %d).\n", divider() ); |
22 |
fprintf( stderr, "-h Print this help.\n" ); |
30 |
fprintf( stderr, "-h Print this help.\n" ); |
23 |
fprintf( stderr, "-i interval Set the polling interval to be 'interval' seconds (default: %d).\n", interval() ); |
31 |
fprintf( stderr, "-i interval Set the polling interval to be 'interval' seconds (default: %d).\n", interval() ); |
Lines 25-31
Link Here
|
25 |
fprintf( stderr, "-link link The PPP link number to monitor (default: %d).\n", link() ); |
33 |
fprintf( stderr, "-link link The PPP link number to monitor (default: %d).\n", link() ); |
26 |
fprintf( stderr, "-p period Set the load averaging period to be 'period seconds (default: %d).\n", period() ); |
34 |
fprintf( stderr, "-p period Set the load averaging period to be 'period seconds (default: %d).\n", period() ); |
27 |
fprintf( stderr, "-retry interval Time between retries when dialling PPP link (default: %d).\n", retry() ); |
35 |
fprintf( stderr, "-retry interval Time between retries when dialling PPP link (default: %d).\n", retry() ); |
28 |
@@ -74,7 +78,7 @@ |
36 |
@@ -74,7 +79,7 @@ |
29 |
fprintf( stderr, "pppload comes with ABSOLUTELY NO WARRANTY; for details see the LICENSE file.\n" ); |
37 |
fprintf( stderr, "pppload comes with ABSOLUTELY NO WARRANTY; for details see the LICENSE file.\n" ); |
30 |
fprintf( stderr, "This is free software, and you are welcome to redistribute it\n" ); |
38 |
fprintf( stderr, "This is free software, and you are welcome to redistribute it\n" ); |
31 |
fprintf( stderr, "under certain conditions; see the LICENSE file for details.\n" ); |
39 |
fprintf( stderr, "under certain conditions; see the LICENSE file for details.\n" ); |