From a067bd488fb1ad0ce4818c6601031554397c1d80 Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 21 Jun 2011 17:12:21 +0200 Subject: automatic commit for pwgen-2.03 --- pw_phonemes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pw_phonemes.c') 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 +#include #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; } -- cgit v1.2.3