Hello out there,
first thanks to Dave Boddie [email removed] for his Vargr and
Zhodani word generators. I got the sources yesterday and they run (after
some slight problems 8-).
I made some changes to get them started. Both sources are similar. The
problems and changes I've made are the same in both sources:
Problem 1:
> char *string[6], *wordstring;
In this line the declaration should be
char *string[7], *wordstring;
because you nead string[6] to create a pointer on a char variable which
contains the NULL delimiter if using 6 syllables.
Problem 2:
You had to complete the following line:
> string[i] = '\0';
by:
string[i] = malloc(sizeof(char));
*string[i] = '\0';
That's the only component of string[i] which needs memory seperatly. In the
loop above this line, the pointers of the variable "string" are set to the
entries of the tables "alt" and "basic". So no allocation of memory is needed.
Problem 3:
I had some trouble with the random generator used. I have compiled the program
with Borland TurboC Version 2.0. The random generator included there
generates random numbers ranged 0..max-1 if you call random(max).
The random generator in the sources generates numbers ranged 1..max.
Make sure your random generator works in the correct range. The tables
of vowels and consonants need ranges of 0..5. The functions GetICons etc.
need ranges of 1..6. The variable "syllables" should also assume values
from 1 to 6.
The results produced by the original were unusable and can't be spelled.
If someone has better ideas for correcting the source, please send me
a notice.
Juergen
P.S.: By the way, can somebody tell me if MTJ#2 is out in USA. If so I had
to contact my local dealer.
Juergen Kirsch
Institut fuer Informatik der Universitaet Bonn
Bonn, Germany
[email removed]