Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 68K/cpm68k_pgms/snobol4/rpoem.c
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

1 line
895 B
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* -*-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++;
}
}