diff options
author | Mike Buland <mike@xagasoft.com> | 2013-05-17 06:56:42 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2013-05-17 06:56:42 -0600 |
commit | 1b34e763de49b072a5e4377a6d13d2420f883271 (patch) | |
tree | f781788cd0a605ccbf8b129eeda93cef352ebb6d /src/options.cpp | |
parent | ca9956381009cbe2d36ea8516d51516f7c49b9d3 (diff) | |
download | clic-1b34e763de49b072a5e4377a6d13d2420f883271.tar.gz clic-1b34e763de49b072a5e4377a6d13d2420f883271.tar.bz2 clic-1b34e763de49b072a5e4377a6d13d2420f883271.tar.xz clic-1b34e763de49b072a5e4377a6d13d2420f883271.zip |
The --text-primes option supports a parameter.
You can tell it where to start now.
Diffstat (limited to '')
-rw-r--r-- | src/options.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/options.cpp b/src/options.cpp index 9ade56a..7fbd70e 100644 --- a/src/options.cpp +++ b/src/options.cpp | |||
@@ -52,7 +52,7 @@ bool hasDigits( const Bu::String &s ) | |||
52 | return false; | 52 | return false; |
53 | } | 53 | } |
54 | 54 | ||
55 | int Options::textPrimes( Bu::StringArray ) | 55 | int Options::textPrimes( Bu::StringArray aArgs ) |
56 | { | 56 | { |
57 | Number tst( 0, 36 ); | 57 | Number tst( 0, 36 ); |
58 | Number max( 0, 36 ); | 58 | Number max( 0, 36 ); |
@@ -61,8 +61,12 @@ int Options::textPrimes( Bu::StringArray ) | |||
61 | Number fact( 0, 36 ); | 61 | Number fact( 0, 36 ); |
62 | one = "1"; | 62 | one = "1"; |
63 | fact = "2"; | 63 | fact = "2"; |
64 | if( aArgs.getSize() >= 2 ) | ||
65 | tst = aArgs[1]; | ||
66 | else | ||
67 | tst = "1"; | ||
64 | 68 | ||
65 | for( tst = "1";; tst = tst + one ) | 69 | for(;; tst = tst + one ) |
66 | { | 70 | { |
67 | if( hasDigits( tst.toString() ) ) | 71 | if( hasDigits( tst.toString() ) ) |
68 | continue; | 72 | continue; |