aboutsummaryrefslogtreecommitdiff
path: root/pw_phonemes.c
diff options
context:
space:
mode:
authorPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
committerPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:21 +0200
commita067bd488fb1ad0ce4818c6601031554397c1d80 (patch)
tree7abf7fae76c0e77e17abaa83a2ca01030824661b /pw_phonemes.c
parent468a1f0c5bd165b6d0647b184885eb2040d7ddf4 (diff)
downloadpwgen-a067bd488fb1ad0ce4818c6601031554397c1d80.zip
automatic commit for pwgen-2.03
Diffstat (limited to 'pw_phonemes.c')
-rw-r--r--pw_phonemes.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pw_phonemes.c b/pw_phonemes.c
index 1eaa311..cb14ff5 100644
--- a/pw_phonemes.c
+++ b/pw_phonemes.c
@@ -8,6 +8,7 @@
*/
#include <ctype.h>
+#include <string.h>
#include "pwgen.h"
struct pw_element elements[] = {
@@ -68,7 +69,7 @@ try_again:
should_be = 0;
first = 1;
- should_be = pw_random_number(1) ? VOWEL : CONSONANT;
+ should_be = pw_random_number(2) ? VOWEL : CONSONANT;
while (c < size) {
i = pw_random_number(NUM_ELEMENTS);
@@ -114,13 +115,13 @@ try_again:
*/
if (feature_flags & PW_ONE_NUMBER) {
if (!first && (pw_random_number(10) < 3)) {
- buf[c++] = pw_random_number(9)+'0';
+ buf[c++] = pw_random_number(10)+'0';
buf[c] = 0;
feature_flags &= ~PW_ONE_NUMBER;
first = 1;
prev = 0;
- should_be = pw_random_number(1) ?
+ should_be = pw_random_number(2) ?
VOWEL : CONSONANT;
continue;
}