amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (05/18/91)
Submitted-by: RWALLACE%vax1.tcd.ie@CUNYVM.CUNY.EDU Posting-number: Volume 91, Issue 114 Archive-name: utilities/names-1.1/part01 [ includes uuencoded executable ...tad ] Program to generate random names Useful for generating names for stuff like computer games and so on when you can't be bothered thinking them up yourself. At the moment it avoids runs of more than 2 vowels or 2 consonants in a row and generates words of between 3 and 10 letters ... many of the names are unusable, select the usable ones. I decided this was easier than trying to improve the generation process. #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 1)." # Contents: names.c names.uu # Wrapped by tadguy@ab20 on Fri May 17 22:10:03 1991 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'names.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'names.c'\" else echo shar: Extracting \"'names.c'\" \(1536 characters\) sed "s/^X//" >'names.c' <<'END_OF_FILE' X/* XNames v1.1 by Russell Wallace 29 July 1989 XProgram to generate random names XUseful for generating names for stuff like computer games and so on when you Xcan't be bothered thinking them up yourself. At the moment it avoids runs of Xmore than 2 vowels or 2 consonants in a row and generates words of between X3 and 10 letters ... many of the names are unusable, select the usable ones. XI decided this was easier than trying to improve the generation process. X*/ X X#define videornd (*((unsigned *)0xdff006)) X Xlong RangeRand (); X Xchar buffer[11]; X Xmain (argc,argv) Xchar **argv; X{ X int i,j,l,NAMES=50; X char c,c1,c2; X if (argc>1) X { X if (!strcmp (argv[1],"?")) X { X printf ("Names v1.1 by Russell Wallace 29 July 1989\n\ XGenerates random names for fantasy games etc.\n\ XUsage: NAMES [number of names to generate]\n"); X return; X } X NAMES=atoi (argv[1]); X } X for (j=0;j<NAMES;j++) X { X l=rnd (7)+3; X for (i=0;i<l;i++) X { X if (i<=1) X buffer[i]=rnd (26)+'a'; X else X { X c1=buffer[i-1]; X c2=buffer[i-2]; X do X { X if (rnd (50)==0) X { X if (rnd (2)) X c='-'; X else X c='\''; X } X else X c=rnd (26)+'a'; X } X while ( X (!isvowel (c1) && !isvowel (c2) && !isvowel (c)) || X (isvowel (c1) && isvowel (c2) && isvowel (c)) X ); X buffer[i]=c; X } X } X buffer[i]=0; X printf ("%s\n",buffer); X } X} X Xint isvowel (c) Xchar c; X{ X return (c=='a' || c=='e' || c=='i' || c=='o' || c=='u'); X} X Xrnd (x) X{ X RangeRand ((long)videornd); X return RangeRand ((long)x); X} X END_OF_FILE if test 1536 -ne `wc -c <'names.c'`; then echo shar: \"'names.c'\" unpacked with wrong size! fi # end of 'names.c' fi if test -f 'names.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'names.uu'\" else echo shar: Extracting \"'names.uu'\" \(8167 characters\) sed "s/^X//" >'names.uu' <<'END_OF_FILE' Xbegin 644 names XM```#\P`````````#``````````(```3_````K@````$```/I```$_T[Z`S).G XM5?_T.WP`,O_X#&T``0`(;S9(>@&2(&T`"B\H``1.N@+@4$]*0&8.2'H!?DZZF XM!WQ83TY=3G4@;0`*+R@`!$ZZ`DY83SM`__A";?_\8``!2#\\``=.N@(25$]6E XM0#M`__I";?_^8``!!@QM``'__FX>/SP`&DZZ`?)43]!\`&$R+?_^0>R"8A&`H XM$`!@``#<,"W__E-`0>R"8AMP``#_]C`M__Y50$'L@F(;<```__4_/``R3KH!_ XMM%1/2D!F'C\\``).N@&F5$]*0&<(&WP`+?_W8`8;?``G__=@$C\\`!I.N@&(9 XM5$_0?`!A&T#_]Q`M__9(@#\`3KH!/%1/2D!F)!`M__5(@#\`3KH!*E1/2D!F4 XM$A`M__=(@#\`3KH!&%1/2D!GC!`M__9(@#\`3KH!!E1/2D!G)A`M__5(@#\`' XM3KH`]%1/2D!G%!`M__=(@#\`3KH`XE1/2D!F`/]6,"W__D'L@F(1K?_W``!2A XM;?_^,"W__K!M__IM`/[R,"W__D'L@F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""H`!``,9PIP_TS?!!!.74YU""H``@`,9S`@4I'J& XM``@X"#\$+RH`"!`J``U(@#\`3KH"@+!$4$]G$`CJ``0`#$*20JH`!'#_8,`,O XM;?__``QF$`BJ``(`#$*20JH`!'``8*A*J@`(9@@O"DZZ`)I83PQJ``$`$&8JL XM&VT`#?__/SP``4AM__\0*@`-2(`_`$ZZ`B*P?``!4$]FH#`M``Q@`/]J)*H`. XM"#`J`!!(P-"J``@E0``$".H``@`,(%)2DA`M``T0@$B`P'P`_V``_SY.50``8 XM+PI![("6)$A**@`,9QC5_````!9![().M<AE"'``)%].74YU8.)"DD*J``1"> XMJ@`((`I@ZDY5__PO"B1M``@_/`0`3KH`P"M`__Q43V88-7P``0`0($K1_```= XM``XE2``()%].74YU-7P$```0".H``0`,)6W__``($"H`#4B`/P!.N@#B2D!4C XM3V<&`"H`@``,8,Y.50``2.<`,"1L@EY@%"92("H`!%"`+P`O"DZZ!$Y03R1+L XM(`IFZ$*L@EY,WPP`3EU.=4Y5```O"D'Z_\8I2(*<0J<@+0`(4(`O`$ZZ`_PD^ XM0$J`4$]F"'``)%].74YU)*R"7B5M``@`!"E*@EX@"E"`8.9.50``<``P+0`(1 XM+P!ALEA/3EU.=4Y5``!(YP`PE\LD;()>8`X@;0`(48BQRF<2)DHD4B`*9NYP/ XM_TS?#`!.74YU(`MG!":28`0I4H)>("H`!%"`+P`O"DZZ`Z!P`%!/8-A.50``, XM+PHP+0`(P?P`!B1`U>R">DIM``AM#C`M``BP;().;`1*DF8..7P``H*@</\DY XM7TY=3G4P+0`(P?P`!B!L@GHO,`@`3KH"QDJ`6$]G!'`!8`)P`SE4``"\M* XM``A.N@*02H!83V8.3KH"FCE`@J!P_TY=3G5P`Ϥ``$CG#"`X+0`(3KH`> XM<#`$P?P`!B1`U>R">DI$;0JX;().;`1*DF80.7P``H*@</],WP0P3EU.=3`JR XM``3`?``#9@HY?``%@J!P_V#D<``P+0`.+P`O+0`*+Q).N@)F*@"PO/____]/$ XM[P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"<D[N_LX@;P`$G XM+&R"<D[N_H!,[P,```0L;(*43N[_H"!O``0L;(*43N[_IB!O``0L;(*43N[_O XMLDCG#``Z+P`..`531"`L@EC0@&(&"H`=ARM!XDQF\BE`@EA*168$2$!@`L#%A XM0D!(0$S?`#!.=2`O``30@&(&"H`=ARM!3G4```/L`````0````$```.H````L XM`````_(```/J````ES`Q,C,T-38W.#EA8F-D968````@("`@("`@("`P,#`P[ XM,"`@("`@("`@("`@("`@("`@()!`0$!`0$!`0$!`0$!`0$`,#`P,#`P,#`P,X XM0$!`0$!`0`D)"0D)"0$!`0$!`0$!`0$!`0$!`0$!`0$!0$!`0$!`"@H*"@H*& XM`@("`@("`@("`@("`@("`@("`@)`0$!`(``````````````````!``````$`* XM`````````````````````0$````!``````````````````````$"`````0``' XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM````````````````````````````````````````````````````````````` XM```````````````````````4``````````````````````/R```#ZP````$`X X#``/RU X`` Xend Xsize 5808 END_OF_FILE if test 8167 -ne `wc -c <'names.uu'`; then echo shar: \"'names.uu'\" unpacked with wrong size! fi # end of 'names.uu' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Mail submissions (sources or binaries) to <amiga@uunet.uu.net>. Mail comments to the moderator at <amiga-request@uunet.uu.net>. Post requests for sources, and general discussion to comp.sys.amiga.misc.