home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
CPM68K
/
SNOBOL4.LBR
/
RPOEM.C
< prev
next >
Wrap
Text File
|
2000-06-30
|
896b
|
45 lines
/* -*-c,save-*- */
/*
* rpoem.c - random poetry program
* Robert Heller. Created: Sun Feb 23, 1986 13:17:54.77
* Last Mod:
*
* (c) Copyright 1986 by Robert Heller
* All Rights Reserved
*
*
*/
#include <stdio.h>
#define SYNFILE "RPOEM.SYN"
char poem_buff[8192];
main()
{
register int count;
rsent_init(SYNFILE);
srand(gettime());
for (count=0;count<30;count++) {
rsentence("<RPOEM>",poem_buff);
printf("------------------------------------------\nVerse %d\n",
count+1);
printl(poem_buff);
}
printf("------------------------------------------\n");
}
printl(buff)
register char *buff;
{
while (*buff != '\0') {
if (*buff != '\\') putchar(*buff);
else {
buff++;
if (*buff == 'n') putchar('\n');
else putchar(*buff);
}
buff++;
}
}