home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume22 / thought / patch01 next >
Encoding:
Text File  |  1991-08-28  |  23.3 KB  |  866 lines

  1. Newsgroups: comp.sources.misc
  2. From: David F. Skoll <dfs@doe.carleton.ca>
  3. Subject:  v22i067:  thought - A replacement for 'fortune', Patch01
  4. Message-ID: <1991Aug28.022942.18503@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 27d37770a4771a89556144e691a53712
  6. Date: Wed, 28 Aug 1991 02:29:42 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: David F. Skoll <dfs@doe.carleton.ca>
  10. Posting-number: Volume 22, Issue 67
  11. Archive-name: thought/patch01
  12. Environment: UNIX
  13. Patch-To: thought: Volume 21, Issue 23-24
  14.  
  15. This is Official Patch #1 for Thought, posted on alt.sources and
  16. comp.sources.misc.
  17.  
  18. This patch adds three new grammar files, and fixes several bugs in
  19. thought.c.  It also adds an option for producing a specified number of
  20. thoughts.
  21.  
  22. To install the patch:  Unshar this file into the directory containing
  23. THOUGHT source code.  Then type "patch < Patch01" and re-make and re-install
  24. thought.
  25.  
  26. David F. Skoll
  27.  
  28. ------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
  29. #!/bin/sh
  30. # This is Thought Patch01, a shell archive (shar 3.32)
  31. # made 08/26/1991 15:18 UTC by dfs@kmpec
  32. # Source directory /enterprise/transporter/dfs/work/.thought/v1.0.1
  33. #
  34. # existing files will NOT be overwritten
  35. #
  36. # This shar contains:
  37. # length  mode       name
  38. # ------ ---------- ------------------------------------------
  39. #  15485 -rw------- Patch01
  40. #    865 -rw------- buzzword.rc
  41. #   1826 -rw------- insult.rc
  42. #   1594 -rw------- new-user.rc
  43. #
  44. if touch 2>&1 | fgrep 'amc' > /dev/null
  45.  then TOUCH=touch
  46.  else TOUCH=true
  47. fi
  48. # ============= Patch01 ==============
  49. if test X"$1" != X"-c" -a -f 'Patch01'; then
  50.     echo "File already exists: skipping 'Patch01'"
  51. else
  52. echo "x - extracting Patch01 (Text)"
  53. sed 's/^X//' << 'SHAR_EOF' > Patch01 &&
  54. XMake the Makefile more portable, add various options.  Also correct the
  55. Xbug which incorrectly installed the grammar file in the BIN directory. :-)
  56. X*** ../v1.0.0/Makefile    Wed Jul 24 10:11:55 1991
  57. X--- ./Makefile    Mon Aug 26 10:31:50 1991
  58. X***************
  59. X*** 22,27 ****
  60. X--- 22,38 ----
  61. X  #If you want to use gcc:
  62. X  #CC= gcc
  63. X  
  64. X+ # If your C library has the random() and srandom() functions, uncomment the
  65. X+ # next line.  They are recommended over the rand() and srand() functions.  If
  66. X+ # you don't have random() or srandom(), comment out the next line.
  67. X+ HAVE_RANDOM= -DHAVE_RANDOM
  68. X+ 
  69. X+ # If you don't have the strdup() or stricmp() functions, uncomment the next
  70. X+ # lines.  Actually, even if you do have them, it's safe to leave the next lines
  71. X+ # uncommented, it's just less efficient if you use shared libraries.
  72. X+ NO_STRDUP= -DNO_STRDUP
  73. X+ NO_STRICMP= -DNO_STRICMP
  74. X+ 
  75. X  #Where do you want it installed?
  76. X  BINDIR= /usr/local/bin
  77. X  
  78. X***************
  79. X*** 47,58 ****
  80. X  
  81. X  #--------------- SHOULDN'T CHANGE STUFF BELOW HERE ---------------
  82. X  
  83. X  all: thought.c protos.h version.h
  84. X!     $(CC) -DLIBPATH=\"$(LIBDIR)\" -DFILE_DEFAULT=\"$(GRAMFILE)\" -o thought thought.c
  85. X  
  86. X  install:
  87. X      $(INSTALL) thought $(BINDIR)
  88. X!     $(INSTALL) thought $(LIBDIR)/$(GRAMFILE)
  89. X  
  90. X  install.man:
  91. X      $(INSTALL) thought.man $(MANDIR)/man$(TMANSECT)/thought.$(TMANSECT)
  92. X--- 58,74 ----
  93. X  
  94. X  #--------------- SHOULDN'T CHANGE STUFF BELOW HERE ---------------
  95. X  
  96. X+ #Version of THOUGHT
  97. X+ VERSION= 1.0.1
  98. X+ 
  99. X+ MANIFEST= Makefile README examples protos.h st.rc thought.c thought.man thought.rc thoughtfile.man version.h insult.rc new-user.rc buzzword.rc
  100. X+ 
  101. X  all: thought.c protos.h version.h
  102. X!     $(CC) $(HAVE_RANDOM) $(NO_STRDUP) $(NO_STRICMP) -DLIBPATH=\"$(LIBDIR)\" -DFILE_DEFAULT=\"$(GRAMFILE)\" -o thought thought.c
  103. X  
  104. X  install:
  105. X      $(INSTALL) thought $(BINDIR)
  106. X!     $(INSTALL) thought.rc $(LIBDIR)/$(GRAMFILE)
  107. X  
  108. X  install.man:
  109. X      $(INSTALL) thought.man $(MANDIR)/man$(TMANSECT)/thought.$(TMANSECT)
  110. X***************
  111. X*** 63,65 ****
  112. X--- 79,90 ----
  113. X  
  114. X  clobber:
  115. X      rm -f *.o core *~ thought
  116. X+ 
  117. X+ shar: FORCE
  118. X+     shar -x "-nThought $(VERSION)" -l45 -oShar $(MANIFEST)
  119. X+ 
  120. X+ tar: FORCE
  121. X+     tar -cvf thought$(VERSION)-tar $(MANIFEST)
  122. X+     compress -v thought$(VERSION)-tar
  123. X+ 
  124. X+ FORCE:
  125. X
  126. XChange the README file to reflect the new distribution.
  127. X*** ../v1.0.0/README    Wed Jul 24 10:11:56 1991
  128. X--- ./README    Mon Aug 26 10:43:49 1991
  129. X***************
  130. X*** 20,28 ****
  131. X  And you're on your way!  To create your own grammar files, read the
  132. X  man page for "thoughtfile".
  133. X  
  134. X! I have supplied two grammar files - 'thought.rc' gives generally demented
  135. X! sayings, and 'st.rc' gives demented sayings that sound like something from
  136. X! Star Trek.
  137. X  
  138. X  --
  139. X  David F. Skoll (dfs@doe.carleton.ca)
  140. X--- 20,37 ----
  141. X  And you're on your way!  To create your own grammar files, read the
  142. X  man page for "thoughtfile".
  143. X  
  144. X! I have supplied five grammar files:
  145. X! 
  146. X!     'thought.rc' produces generally demented sayings.
  147. X! 
  148. X!     'st.rc' gives demented sayings that sound like something from
  149. X!         Star Trek.
  150. X! 
  151. X!     'buzzword.rc' generates computer-age buzzwords
  152. X! 
  153. X!     'insult.rc' generates childish insults
  154. X! 
  155. X!     'new-user' generates messages designed to panic new Unix users.
  156. X  
  157. X  --
  158. X  David F. Skoll (dfs@doe.carleton.ca)
  159. X
  160. XFix the prototype header file to include stricmp and strdup
  161. X*** ../v1.0.0/protos.h    Wed Jul 24 10:11:58 1991
  162. X--- ./protos.h    Mon Aug 26 10:39:34 1991
  163. X***************
  164. X*** 65,70 ****
  165. X--- 65,76 ----
  166. X  void   GenerateThought(Sentence *sen);
  167. X  void   ReadFile (char *fname);
  168. X  void   WriteWord(Tag *tag, Word *w, char *mod, char **out, char upper);
  169. X+ #ifdef NO_STRDUP
  170. X+ char * strdup(const char *s);
  171. X+ #endif
  172. X+ #ifdef NO_STRICMP
  173. X+ int    stricmp(const char *s1, const char *s2);
  174. X+ #endif
  175. X  #else
  176. X  Tag *  FindTag();
  177. X  char * FindModifier();
  178. X***************
  179. X*** 83,86 ****
  180. X--- 89,98 ----
  181. X  void   GenerateThought();
  182. X  void   ReadFile ();
  183. X  void   WriteWord();
  184. X+ #ifdef NO_STRDUP
  185. X+ char * strdup();
  186. X+ #endif
  187. X+ #ifdef NO_STRICMP
  188. X+ int    stricmp();
  189. X+ #endif
  190. X  #endif
  191. X
  192. XFix various stuff in thought.c, most noticeably fix the token scanning bug.
  193. XAlso add the "-n" option for creating "n" thoughts.
  194. X*** ../v1.0.0/thought.c    Wed Jul 24 10:12:00 1991
  195. X--- ./thought.c    Mon Aug 26 10:44:57 1991
  196. X***************
  197. X*** 14,19 ****
  198. X--- 14,20 ----
  199. X  /*                                                             */
  200. X  /***************************************************************/
  201. X  
  202. X+ /* Both MS-DOS and UNIX */
  203. X  #include <stdio.h>
  204. X  #include <string.h>
  205. X  #include <ctype.h>
  206. X***************
  207. X*** 20,42 ****
  208. X  #include <string.h>
  209. X  
  210. X  #ifdef MSDOS
  211. X  #include <stdlib.h>
  212. X  #include <dos.h>
  213. X  #include <io.h>
  214. X  #include <malloc.h>
  215. X  #else
  216. X! #include <sys/file.h>
  217. X  #include <sys/types.h>
  218. X  #ifdef SYSV
  219. X  #include <time.h>
  220. X  #else
  221. X  #include <sys/time.h>
  222. X  #endif
  223. X  #endif
  224. X  
  225. X  #include "protos.h"
  226. X  #include "version.h"
  227. X  
  228. X  /* The next two defines are to stop my editor's bracket-matching algorithm
  229. X     from complaining later on in the program. */
  230. X  
  231. X--- 21,61 ----
  232. X  #include <string.h>
  233. X  
  234. X  #ifdef MSDOS
  235. X+ 
  236. X+ /* MS-DOS only */
  237. X  #include <stdlib.h>
  238. X  #include <dos.h>
  239. X  #include <io.h>
  240. X  #include <malloc.h>
  241. X+ #ifndef R_OK
  242. X+ #define R_OK 0
  243. X+ #endif
  244. X+ 
  245. X  #else
  246. X! 
  247. X! /* Unix only */
  248. X  #include <sys/types.h>
  249. X+ #include <sys/file.h>
  250. X+ 
  251. X  #ifdef SYSV
  252. X  #include <time.h>
  253. X  #else
  254. X  #include <sys/time.h>
  255. X  #endif
  256. X+ 
  257. X  #endif
  258. X  
  259. X  #include "protos.h"
  260. X  #include "version.h"
  261. X  
  262. X+ #ifdef HAVE_RANDOM
  263. X+ #define RAND random
  264. X+ #define SRAND srandom
  265. X+ #else
  266. X+ #define RAND rand
  267. X+ #define SRAND srand
  268. X+ #endif
  269. X+ 
  270. X  /* The next two defines are to stop my editor's bracket-matching algorithm
  271. X     from complaining later on in the program. */
  272. X  
  273. X***************
  274. X*** 98,105 ****
  275. X  char ch;
  276. X  #endif
  277. X  {
  278. X     if (fp) return ungetc(ch, fp);
  279. X!    if (!**s) return EOF;
  280. X     else *(--(*s)) = ch;
  281. X     return ch;
  282. X  }
  283. X--- 117,125 ----
  284. X  char ch;
  285. X  #endif
  286. X  {
  287. X+    if (ch == EOF) return EOF;
  288. X     if (fp) return ungetc(ch, fp);
  289. X!    if (!*(*s-1)) return EOF;
  290. X     else *(--(*s)) = ch;
  291. X     return ch;
  292. X  }
  293. X***************
  294. X*** 128,134 ****
  295. X  #endif
  296. X  {
  297. X     int ch;
  298. X-    char read = 0;
  299. X     char *s;
  300. X     while(1) {  /* Skip comments and leading space */
  301. X        do {
  302. X--- 148,153 ----
  303. X***************
  304. X*** 140,180 ****
  305. X        } else break;
  306. X     }
  307. X  
  308. X     s = Token;
  309. X  
  310. X     while (1) {
  311. X!       if (ch == EOF) {
  312. X!          if (read) break;
  313. X!      else {
  314. X!         *Token = 0;
  315. X!         return Token;
  316. X!      }
  317. X!       }
  318. X        if (ch == '#') {
  319. X           UnReadChar(fp, istream, ch);
  320. X       break;
  321. X        }
  322. X        if (strchr(sep, ch)) {
  323. X!          if (read) {
  324. X!         UnReadChar(fp, istream, ch);
  325. X!         break;
  326. X       } else {
  327. X!         *Token = ch;
  328. X!         *(Token + 1) = 0;
  329. X!         return Token;
  330. X!      }
  331. X        }
  332. X-       if (ch == '\n') ch = ' ';
  333. X        *s++ = ch;
  334. X        *s = 0;
  335. X        ch = ReadChar(fp, istream);
  336. X-       read = 1;
  337. X     }
  338. X  
  339. X  /* Strip trailing whitespace */
  340. X     s = Token + strlen(Token) - 1;
  341. X     while (s >= Token && isspace(*s)) *s-- = 0;
  342. X- 
  343. X     return Token;
  344. X  }
  345. X  
  346. X--- 159,196 ----
  347. X        } else break;
  348. X     }
  349. X  
  350. X+    if (ch == EOF) {
  351. X+       *Token = 0;
  352. X+       return Token;
  353. X+    }
  354. X+ 
  355. X     s = Token;
  356. X  
  357. X     while (1) {
  358. X!       if (ch == EOF) break;
  359. X! 
  360. X        if (ch == '#') {
  361. X           UnReadChar(fp, istream, ch);
  362. X       break;
  363. X        }
  364. X        if (strchr(sep, ch)) {
  365. X!          if (s != Token) {
  366. X!             UnReadChar(fp, istream, ch);
  367. X!             break;
  368. X       } else {
  369. X!         *s++ = ch;
  370. X!         *s = 0;
  371. X!         break;
  372. X!          }
  373. X        }
  374. X        *s++ = ch;
  375. X        *s = 0;
  376. X        ch = ReadChar(fp, istream);
  377. X     }
  378. X  
  379. X  /* Strip trailing whitespace */
  380. X     s = Token + strlen(Token) - 1;
  381. X     while (s >= Token && isspace(*s)) *s-- = 0;
  382. X     return Token;
  383. X  }
  384. X  
  385. X***************
  386. X*** 525,531 ****
  387. X        }
  388. X        tok = ReadToken(SEP1, NULL, &sd);
  389. X        if (*tok != ';' && *tok != CRIGHT) {
  390. X!          fprintf(stderr, "Illegal tag definition in %s\n", sen->def);
  391. X       exit(1);
  392. X        }
  393. X        if (*tok == ';') {
  394. X--- 541,547 ----
  395. X        }
  396. X        tok = ReadToken(SEP1, NULL, &sd);
  397. X        if (*tok != ';' && *tok != CRIGHT) {
  398. X!          fprintf(stderr, "Illegal tag usage in %s\n", sen->def);
  399. X       exit(1);
  400. X        }
  401. X        if (*tok == ';') {
  402. X***************
  403. X*** 534,540 ****
  404. X       mod = Mod;
  405. X       tok = ReadToken(SEP1, NULL, &sd);
  406. X           if (*tok != CRIGHT) {
  407. X!             fprintf(stderr, "Illegal tag definition in %s\n", sen->def);
  408. X          exit(1);
  409. X           }
  410. X        } else mod = (char *) NULL;
  411. X--- 550,556 ----
  412. X       mod = Mod;
  413. X       tok = ReadToken(SEP1, NULL, &sd);
  414. X           if (*tok != CRIGHT) {
  415. X!             fprintf(stderr, "Illegal tag usage in %s\n", sen->def);
  416. X          exit(1);
  417. X           }
  418. X        } else mod = (char *) NULL;
  419. X***************
  420. X*** 544,550 ****
  421. X           fprintf(stderr, "Tag %s has no words defined.\n", tag->def);
  422. X       exit(1);
  423. X        }
  424. X!       i = rand() % tag->numwords;
  425. X  
  426. X  /* Find the actual word - this is HIGHLY INEFFICIENT!! */
  427. X        w = tag->wordlist;
  428. X--- 560,566 ----
  429. X           fprintf(stderr, "Tag %s has no words defined.\n", tag->def);
  430. X       exit(1);
  431. X        }
  432. X!       i = (RAND() >> 4) % tag->numwords;
  433. X  
  434. X  /* Find the actual word - this is HIGHLY INEFFICIENT!! */
  435. X        w = tag->wordlist;
  436. X***************
  437. X*** 579,585 ****
  438. X  #endif
  439. X  {
  440. X     char *s;
  441. X!             char *OrigOut = *out;
  442. X     char *ModDef;
  443. X  
  444. X     if (!mod) {  /* easy case first - no modifiers */
  445. X--- 595,601 ----
  446. X  #endif
  447. X  {
  448. X     char *s;
  449. X!    char *OrigOut = *out;
  450. X     char *ModDef;
  451. X  
  452. X     if (!mod) {  /* easy case first - no modifiers */
  453. X***************
  454. X*** 588,593 ****
  455. X--- 604,610 ----
  456. X           *(*out)++ = *s++;
  457. X        }
  458. X        **out = 0;
  459. X+       if (*OrigOut == '-' || *OrigOut == '+') OrigOut++;
  460. X        if (upper) *OrigOut = UPPER(*OrigOut);
  461. X        return;
  462. X     }
  463. X***************
  464. X*** 613,618 ****
  465. X--- 630,636 ----
  466. X       **out = 0;
  467. X        }
  468. X     }
  469. X+    if (*OrigOut == '-' || *OrigOut == '+') OrigOut++;
  470. X     if (upper) *OrigOut = UPPER(*OrigOut);
  471. X  }
  472. X  
  473. X***************
  474. X*** 782,791 ****
  475. X  #endif
  476. X  {
  477. X     Banner();
  478. X!    fprintf(stderr, "Usage: thought [-dvi] [-w#] [filename]\n\n");
  479. X     fprintf(stderr, "Options: -d = Debug sentence definitions.\n");
  480. X     fprintf(stderr, "         -v = Verbose mode.\n");
  481. X     fprintf(stderr, "         -i = Interactive mode.\n");
  482. X     fprintf(stderr, "         -w# = set formatted output width to # columns.\n\n");
  483. X     fprintf(stderr, "filename is optional grammar file.  Default file is\n");
  484. X     fprintf(stderr, "'%s'.\n\n", FILE_DEFAULT);
  485. X--- 800,810 ----
  486. X  #endif
  487. X  {
  488. X     Banner();
  489. X!    fprintf(stderr, "Usage: thought [-dvi] [-#] [-w#] [filename]\n\n");
  490. X     fprintf(stderr, "Options: -d = Debug sentence definitions.\n");
  491. X     fprintf(stderr, "         -v = Verbose mode.\n");
  492. X     fprintf(stderr, "         -i = Interactive mode.\n");
  493. X+    fprintf(stderr, "         -# = emit # thoughts.  Overidden by '-i'.\n");
  494. X     fprintf(stderr, "         -w# = set formatted output width to # columns.\n\n");
  495. X     fprintf(stderr, "filename is optional grammar file.  Default file is\n");
  496. X     fprintf(stderr, "'%s'.\n\n", FILE_DEFAULT);
  497. X***************
  498. X*** 839,846 ****
  499. X     char Debug = 0;
  500. X     char Interactive = 0;
  501. X     int Width = 80;
  502. X     Sentence *sent;
  503. X-    struct timeval tv;
  504. X     int i;
  505. X  
  506. X     while (--argc) {
  507. X--- 858,865 ----
  508. X     char Debug = 0;
  509. X     char Interactive = 0;
  510. X     int Width = 80;
  511. X+    int NumToEmit = 1;
  512. X     Sentence *sent;
  513. X     int i;
  514. X  
  515. X     while (--argc) {
  516. X***************
  517. X*** 855,860 ****
  518. X--- 874,892 ----
  519. X             case 'w': Width = atoi(curarg+1);
  520. X                       while (*(curarg+1)) curarg++;
  521. X               break;
  522. X+            case '0':
  523. X+            case '1':
  524. X+            case '2':
  525. X+            case '3':
  526. X+            case '4':
  527. X+            case '5':
  528. X+            case '6':
  529. X+            case '7':
  530. X+            case '8':
  531. X+            case '9': NumToEmit = atoi(curarg);
  532. X+                      while (*(curarg+1)) curarg++;
  533. X+              break;
  534. X+ 
  535. X             default: Usage(); exit(1);
  536. X          }
  537. X       }
  538. X***************
  539. X*** 877,884 ****
  540. X        exit(1);
  541. X     }
  542. X  /* initialize the random seed */
  543. X!    srand( (int) SystemTime());
  544. X!    for (i=0; i<5; i++) (void) rand();
  545. X  
  546. X  /* If it's DEBUG, loop through all sentence definitions */
  547. X     if (Debug) {
  548. X--- 909,916 ----
  549. X        exit(1);
  550. X     }
  551. X  /* initialize the random seed */
  552. X!    SRAND( (int) SystemTime());
  553. X!    for (i=0; i<5; i++) (void) RAND();
  554. X  
  555. X  /* If it's DEBUG, loop through all sentence definitions */
  556. X     if (Debug) {
  557. X***************
  558. X*** 900,909 ****
  559. X           fprintf(stderr, "For interactive mode, stdin and stdout must be a tty.\n");
  560. X       exit(1);
  561. X        }
  562. X     }
  563. X  
  564. X     while(1) {
  565. X!       i = rand() % NumSentences;
  566. X        sent = SentenceList;
  567. X  
  568. X        while (i && sent) {
  569. X--- 932,942 ----
  570. X           fprintf(stderr, "For interactive mode, stdin and stdout must be a tty.\n");
  571. X       exit(1);
  572. X        }
  573. X+       printf("\n=== Interactive mode ===\n\nEnter 'q' or 'quit' to stop.\n\n");
  574. X     }
  575. X  
  576. X     while(1) {
  577. X!       i = (RAND() >> 4) % NumSentences;
  578. X        sent = SentenceList;
  579. X  
  580. X        while (i && sent) {
  581. X***************
  582. X*** 917,925 ****
  583. X        }
  584. X        GenerateThought(sent);
  585. X        Format(Buffer, Width);
  586. X!       if (!Interactive) exit(0);
  587. X!       gets(Buffer);
  588. X!       if (*Buffer == 'q' || *Buffer == 'Q') exit(0);
  589. X     }      
  590. X  
  591. X  }
  592. X--- 950,995 ----
  593. X        }
  594. X        GenerateThought(sent);
  595. X        Format(Buffer, Width);
  596. X!       if (!Interactive && NumToEmit <= 1) exit(0);
  597. X!       if (!Interactive) {
  598. X!          printf("\n");
  599. X!      NumToEmit--;
  600. X!       } else {
  601. X!          gets(Buffer);
  602. X!         if (*Buffer == 'q' || *Buffer == 'Q') exit(0);
  603. X!       }
  604. X     }      
  605. X  
  606. X  }
  607. X+ 
  608. X+ #ifdef NO_STRICMP
  609. X+ #ifdef __STDC__
  610. X+ int stricmp(const char *s1, const char *s2)
  611. X+ #else
  612. X+ int stricmp(s1, s2)
  613. X+ char *s1, *s2;
  614. X+ #endif
  615. X+ {
  616. X+    register int ret;
  617. X+ 
  618. X+    while ( !(ret = UPPER(*s1) - UPPER(*s2)) && *s1 && *s2) {
  619. X+       s1++;
  620. X+       s2++;
  621. X+    }
  622. X+    return ret;
  623. X+ }
  624. X+ #endif
  625. X+ 
  626. X+ #ifdef NO_STRDUP
  627. X+ #ifdef __STDC__
  628. X+ char *strdup(const char *s)
  629. X+ #else
  630. X+ char *strdup(s)
  631. X+ char *s;
  632. X+ #endif
  633. X+ {
  634. X+    char *ret = (char *) malloc(strlen(s)+1);
  635. X+    if (!ret) return ret;
  636. X+    return strcpy(ret, s);
  637. X+ }
  638. X+ #endif
  639. X
  640. XUpdate the MAN pages.
  641. X*** ../v1.0.0/thought.man    Wed Jul 24 10:12:01 1991
  642. X--- ./thought.man    Thu Jul 25 15:38:16 1991
  643. X***************
  644. X*** 4,10 ****
  645. X  thought \- a program to generate random (and demented) thoughts-for-today
  646. X  .SH SYNOPSIS
  647. X  .B thought
  648. X! [\fB\-dvi\fP] [\fB\-w\fP\fIn\fP] [\fIfilename\fP]
  649. X  .SH DESCRIPTION
  650. X  .B Thought
  651. X  reads the specified \fIfilename\fP, which must contain a grammar specification,
  652. X--- 4,10 ----
  653. X  thought \- a program to generate random (and demented) thoughts-for-today
  654. X  .SH SYNOPSIS
  655. X  .B thought
  656. X! [\fB\-dvi\fP] [\fB\-w\fP\fIn\fP] [\fB\-\fP\fIm\fP] [\fIfilename\fP]
  657. X  .SH DESCRIPTION
  658. X  .B Thought
  659. X  reads the specified \fIfilename\fP, which must contain a grammar specification,
  660. X***************
  661. X*** 32,37 ****
  662. X--- 32,41 ----
  663. X  .TP
  664. X  .B \-v
  665. X  The \fB\-v\fP causes \fBthought\fP to be slightly more verbose.
  666. X+ .TP
  667. X+ .B \-\fIm\fP
  668. X+ This number tells \fBthought\fP to emit \fIm\fP thoughts, but is
  669. X+ overridden by the \-i option.
  670. X  .TP
  671. X  .B \-w
  672. X  The \fB\-w\fP\fIn\fP option causes the output to be formatted for a terminal
  673. X*** ../v1.0.0/version.h    Wed Jul 24 10:12:04 1991
  674. X--- ./version.h    Thu Jul 25 15:44:43 1991
  675. X***************
  676. X*** 15,18 ****
  677. X  /***************************************************************/
  678. X  
  679. X  #define VERSION "1.0"
  680. X! #define PATCHLEVEL "0"
  681. X--- 15,18 ----
  682. X  /***************************************************************/
  683. X  
  684. X  #define VERSION "1.0"
  685. X! #define PATCHLEVEL "1"
  686. SHAR_EOF
  687. $TOUCH -am 0826111691 Patch01 &&
  688. chmod 0600 Patch01 ||
  689. echo "restore of Patch01 failed"
  690. set `wc -c Patch01`;Wc_c=$1
  691. if test "$Wc_c" != "15485"; then
  692.     echo original size 15485, current size $Wc_c
  693. fi
  694. fi
  695. # ============= buzzword.rc ==============
  696. if test X"$1" != X"-c" -a -f 'buzzword.rc'; then
  697.     echo "File already exists: skipping 'buzzword.rc'"
  698. else
  699. echo "x - extracting buzzword.rc (Text)"
  700. sed 's/^X//' << 'SHAR_EOF' > buzzword.rc &&
  701. X# Generate computer-age buzzwords - shamelessly ripped off from
  702. X# an article in comp.misc by Bob Weekley - weekley@oldcolo.UUCP
  703. X
  704. X{deftag adj1}
  705. X{deftag adj2}
  706. X{deftag noun}
  707. X
  708. X{defsent {Adj1} {Adj2} {Noun}}
  709. X
  710. X{adj1 integrated, synchronous, sectored, on-line, batched, relational,
  711. Xdynamic, parallel, responsive, ergonomic, alphanumeric, optical,
  712. Xfunctional, formatted, mnemonic, acknowledged, user-friendly,
  713. Xaddressable, enhanced, monitored}
  714. X
  715. X{adj2 digital, logical, memory, random, default, third-generation,
  716. Xincremental, interpretive, floppy, debugged, password, protocol, run-time,
  717. Xanalog, pixel, transitional, intelligent, virtual, buffered, vertical}
  718. X
  719. X{noun language, compatability, management, options, capability,
  720. Xnetwork, parameters, self-test, matrix, hardware, device, refresh,
  721. Xcompiler, controller, flexability, contingency, duplex, eprom,
  722. Xsubroutine, access}
  723. SHAR_EOF
  724. $TOUCH -am 0823105891 buzzword.rc &&
  725. chmod 0600 buzzword.rc ||
  726. echo "restore of buzzword.rc failed"
  727. set `wc -c buzzword.rc`;Wc_c=$1
  728. if test "$Wc_c" != "865"; then
  729.     echo original size 865, current size $Wc_c
  730. fi
  731. fi
  732. # ============= insult.rc ==============
  733. if test X"$1" != X"-c" -a -f 'insult.rc'; then
  734.     echo "File already exists: skipping 'insult.rc'"
  735. else
  736. echo "x - extracting insult.rc (Text)"
  737. sed 's/^X//' << 'SHAR_EOF' > insult.rc &&
  738. X# Insult generator - shamelessly ripped off from a control file provided
  739. X# by Peter Mielke <peter@zoo.toronto.edu>
  740. X
  741. X{deftag vile-adj}
  742. X{deftag container}
  743. X{deftag heap}
  744. X{deftag animal}
  745. X{deftag vile-object}
  746. X{deftag vile-animal-object}
  747. X
  748. X{defsent You {vile-adj} {container} of {vile-adj} {vile-object}.}
  749. X
  750. X{defsent You {vile-adj} {heap} of {vile-adj} {vile-object}.}
  751. X
  752. X{defsent You {vile-adj} excuse for {vile-adj} {vile-object}.}
  753. X
  754. X{defsent You {vile-adj} {container} of {vile-adj}
  755. X{animal} {vile-animal-object}.}
  756. X
  757. X{defsent You {vile-adj} {heap} of {vile-adj} {animal} {vile-animal-object}.}
  758. X
  759. X{defsent You {vile-adj} excuse for {vile-adj} {animal} {vile-animal-object}.}
  760. X
  761. X{container
  762. Xsack, shovel-full, bowl, box, crock, tub, bag, crate, bucket, truck-load,
  763. Xbunch, vat, pot, collection, barrel, wheelbarrow-full}
  764. X
  765. X{heap
  766. Xheap, loaf, blob, pile, mountain, clump, bunch, hill, load, mound, stack,
  767. Xlump}
  768. X
  769. X{animal
  770. Xgorilla, aardvaark, harp seal, great white shark, tyrannosaurus rex, wombat,
  771. Xbee, beetle, wasp, whale, blue whale, shark, lion, dolphin, elephant, worm,
  772. Xclam, kitten, lobster, hippopotamus, tiger, leopard, rabbit, carp, crocodile,
  773. Xalligator, eel}
  774. X
  775. X{vile-adj
  776. Xhallucinating, pompous, pitiful, bad, laughable, uncultured, bizarre,
  777. Xrevolting, stinking, cranky, insipid, sick, slimy, awful, grotesque, smelly,
  778. Xirrational, unimpressive, dreadful, psychotic, monotonous, pathetic,
  779. Xuneducated, crude, crooked, witless, indecent, sickening, drivelling,
  780. Xilliterate, offensive, dim-witted, deeply disturbed, uncultured, repulsive}
  781. X
  782. X{vile-object
  783. Xcigar butts, nasal hairs, pigeon bombs, stable sweepings, toe jam, ear wax,
  784. Xzit cheese, nose pickings, drain clogs, leprosy scabs, puke lups, cow pies,
  785. Xgarbage, barf}
  786. X
  787. X{vile-animal-object
  788. Xfodder, brains, innards, froth, livers, parts, guts, spite, waste, bowels,
  789. Xbarf, fleas, snot, boogers}
  790. SHAR_EOF
  791. $TOUCH -am 0823105891 insult.rc &&
  792. chmod 0600 insult.rc ||
  793. echo "restore of insult.rc failed"
  794. set `wc -c insult.rc`;Wc_c=$1
  795. if test "$Wc_c" != "1826"; then
  796.     echo original size 1826, current size $Wc_c
  797. fi
  798. fi
  799. # ============= new-user.rc ==============
  800. if test X"$1" != X"-c" -a -f 'new-user.rc'; then
  801.     echo "File already exists: skipping 'new-user.rc'"
  802. else
  803. echo "x - extracting new-user.rc (Text)"
  804. sed 's/^X//' << 'SHAR_EOF' > new-user.rc &&
  805. X# Generate sign-off messages to panic new computer users.  Put this in the
  806. X# standard .logout file for some fun :-)
  807. X
  808. X{deftag catastrophe}
  809. X{deftag core-dump}
  810. X{deftag fault}
  811. X{deftag threat}
  812. X{deftag errmsg}
  813. X
  814. X{defsent {fault} -- {core-dump}}
  815. X
  816. X{defsent {fault}.  {Threat}.  {Catastrophe}.}
  817. X
  818. X{defsent {Errmsg}.  {Fault}.  {Core-dump}.}
  819. X
  820. X{fault Segmentation Fault, Interrupt Fault, Bus^%$ Frro^^*,
  821. XDisk crash, Memory Burnout, Tape destroyed, Files erased}
  822. X
  823. X{errmsg command not found, permission denied, file not found,
  824. Xillegal instruction, error: a.out exec incorrect format, sorry,
  825. Xno such file, name too long, relocation table corrupt, network down,
  826. Xunknown host, RPC: program not registered, unable to reach network}
  827. X
  828. X{core-dump core dumped, core lost, operating system halted, data lost,
  829. XCPU overheated, unable to continue}
  830. X
  831. X{catastrophe your files are lost forever,
  832. Xyour login privileges have been cancelled,
  833. Xyour account is no longer active,
  834. Xyou have destroyed this computer,
  835. Xyou really screwed up,
  836. Xall files have been erased,
  837. Xyour e-mail privileges have been revoked,
  838. Xyour disk quota has been reduced to 200 KB
  839. X}
  840. X
  841. X{threat
  842. Xdon't use this computer until you've read the entire manual set,
  843. Xwe are monitoring your files for signs of sabotage,
  844. Xyour manager will be contacted regarding our suspicions,
  845. Xyour abuse of this system has been logged,
  846. Xthe system administrators take a dim view of such actions,
  847. Xplease contact your system administrator at once,
  848. Xyou don't have privileges to do that,
  849. Xdon't EVER do that again,
  850. Xyou shouldn't have done that,
  851. Xyour actions are contrary to our computing policy
  852. X}
  853. SHAR_EOF
  854. $TOUCH -am 0823105891 new-user.rc &&
  855. chmod 0600 new-user.rc ||
  856. echo "restore of new-user.rc failed"
  857. set `wc -c new-user.rc`;Wc_c=$1
  858. if test "$Wc_c" != "1594"; then
  859.     echo original size 1594, current size $Wc_c
  860. fi
  861. fi
  862. exit 0
  863.  
  864.  
  865. exit 0 # Just in case...
  866.