home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / unix / volume11 / hum.pch < prev    next >
Encoding:
Text File  |  1988-09-11  |  14.9 KB  |  659 lines

  1. Subject:  v11i065:  Hum concordance package update kit
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: sun!tut (Bill Tuthill)
  7. Posting-number: Volume 11, Issue 65
  8. Archive-name: hum.pch
  9.  
  10. Quite a few people asked me for the troff macros to produce concordances.
  11. They weren't included with Hum source because "troffmt" automatically
  12. produces macros.  However, this made me think.  Now that laser printers
  13. have virtually replaced line printers, troff is a lot cheaper than it
  14. used to be.  So I modified "troffmt" for laser printers, taking out the
  15. cut marks.  Here is the recommended command line to produce a concordance
  16. in 10 point type on a laser printer:
  17.  
  18.     % kwic -c120 filename(s) | sort | troffmt | troff
  19.  
  20. While I was modifying "troffmt" I found a bug in "format".  So the shell
  21. archive below contains the new "troffmt", the fixed "format", and troff
  22. macros for producing a concordance.  The troff macros are helpful if you
  23. want to modify the look of your concordance.  Here's how to produce a
  24. concordance with your own macros:
  25.  
  26.     % kwic -c120 filename(s) | sort | troffmt -m | troff trmacs -
  27.  
  28. A few people asked for the "lemma" program, which was promised in the
  29. documentation.  To tell you the truth, I never came up with a good design
  30. for "lemma".  At UC Berkeley, we always used editor scripts to move words
  31. from one file to another.  I think this method is superior to any special
  32. purpose program I could write.
  33.  
  34. Bill Tuthill
  35.  
  36. ------------------------------- cut here ------------------------------- 
  37. echo Extracting troffmt.c 1>&2
  38. sed 's/^X//' > troffmt.c <<\!!!EOF!!!
  39. X# include <stdio.h>            /* troffmt.c (rev3.7) */
  40. X# include <ctype.h>
  41. X# include <signal.h>
  42. X
  43. Xchar *tempfile;        /* to store contexts while counting */
  44. Xint nocnt = 0;        /* toggle for not counting keyword */
  45. Xint nokwd = 0;        /* toggle for suppressing keyword */
  46. Xint nomacs = 0;        /* toggle for not supplying macros */
  47. X
  48. Xusage()            /* print proper usage and exit */
  49. X{
  50. X    puts("Usage: troffmt [-ckm] [filename(s)] [-]\t\t(rev3.7)");
  51. X    puts("-c: suppress counting of keyword frequency");
  52. X    puts("-k: entirely suppress printing of keyword");
  53. X    puts("-m: do not supply concordance macros automatically");
  54. X    puts("- : read standard input instead of files");
  55. X    exit(1);
  56. X}
  57. X
  58. Xmain(argc, argv)    /* format concordance for sending to troff */
  59. Xint argc;
  60. Xchar *argv[];
  61. X{
  62. X    FILE *fopen(), *fp;
  63. X    int i, j, onintr();
  64. X    char *mktemp();
  65. X
  66. X    if (signal(SIGINT, SIG_IGN) != SIG_IGN)
  67. X        signal(SIGINT, onintr);
  68. X
  69. X    tempfile = "/tmp/FmtXXXXX";
  70. X    mktemp(tempfile);
  71. X
  72. X    for (i = 1; argv[i] && *argv[i] == '-'; i++)
  73. X    {
  74. X        for (j = 1; argv[i][j] != NULL; j++)
  75. X        {
  76. X            if (argv[i][j] == 'c')
  77. X                nocnt = 1;
  78. X            else if (argv[i][j] == 'k')
  79. X                nokwd = 1;
  80. X            else if (argv[i][j] == 'm')
  81. X                nomacs = 1;
  82. X            else  /* bad option */
  83. X            {
  84. X                fprintf(stderr,
  85. X                "Illegal troffmt flag: -%c\n", argv[i][j]);
  86. X                usage();
  87. X            }
  88. X        }
  89. X    }
  90. X    if (!nomacs)
  91. X        pr_macs();
  92. X    if (i == argc)
  93. X    {
  94. X        if (nokwd)
  95. X            rmkwds(stdin);
  96. X        else if (nocnt)
  97. X            ffmt(stdin);
  98. X        else
  99. X            format(stdin);
  100. X    }
  101. X    for (; i < argc; i++)
  102. X    {
  103. X        if (argv[i][0] == '-' && argv[i][1] == NULL)
  104. X        {
  105. X            if (nokwd)
  106. X                rmkwds(stdin);
  107. X            else if (nocnt)
  108. X                ffmt(stdin);
  109. X            else
  110. X                format(stdin);
  111. X        }
  112. X        if ((fp = fopen(argv[i], "r")) != NULL)
  113. X        {
  114. X            if (nokwd)
  115. X                rmkwds(fp);
  116. X            else if (nocnt)
  117. X                ffmt(fp);
  118. X            else
  119. X                format(fp);
  120. X            fclose(fp);
  121. X        }
  122. X        else  /* attempt to open file failed */
  123. X        {
  124. X            fprintf(stderr,
  125. X            "Trfmt cannot access the file: %s\n", argv[i]);
  126. X            continue;
  127. X        }
  128. X    }
  129. X    unlink(tempfile);
  130. X    exit(0);
  131. X}
  132. X
  133. Xpr_macs()        /* supply concordance macros automatically */
  134. X{
  135. X    if (access("/usr/lib/ms/ms.acc", 4) == 0)     /* -ms accent marks */
  136. X        printf(".so /usr/lib/ms/ms.acc\n");
  137. X    else if (access("/usr/lib/me/chars.me", 4) == 0) /* -me accent marks */
  138. X        printf(".so /usr/lib/me/chars.me\n");
  139. X    else    fprintf(stderr, "Install -ms or -me macros!\n");
  140. X    printf(".de KW\n.ne 2.1\n.sp 0.3\n.ta 20n\n.ft B\n..\n");
  141. X    printf(".de CX\n.sp 0.1\n.ta 3.6iR 3.75i\n.ft R\n..\n");
  142. X    printf(".de HD\n'sp 2\n.tl ''- %% -''\n'sp 2\n..\n");
  143. X    printf(".de FO\n'bp\n..\n.wh 0 HD\n.wh -5 FO\n");
  144. X    printf(".nf\n.po 0.5i\n.ll 7.0i\n.lt 7.0i\n");
  145. X}
  146. X
  147. Xformat(fp)          /* print keyword and count only if different */
  148. XFILE *fp;
  149. X{
  150. X    FILE *fopen(), *tf;
  151. X    char s[BUFSIZ], okw[BUFSIZ/2], nkw[BUFSIZ/2], cntxt[BUFSIZ];
  152. X    char *sp, *kwp, *cxp, *strcpy();
  153. X    int kwfreq = 0;
  154. X
  155. X    strcpy(okw,"~~~~~");    /* make sure 1st keyword is printed */
  156. X    tf = NULL;        /* to prevent core dump with no input */
  157. X    while (fgets(s, BUFSIZ, fp))
  158. X    {
  159. X        for (sp = s, kwp = nkw; *sp != ' ' && *sp != '|'; sp++, kwp++)
  160. X        {
  161. X            if (*sp == '\b')    /* interpolate troff string */
  162. X            {
  163. X                *kwp = '\\';
  164. X                *++kwp = '*';
  165. X            } else
  166. X                *kwp = *sp;
  167. X        }
  168. X        *kwp = NULL;
  169. X        for (; *sp && *sp != '|'; sp++)
  170. X            ;
  171. X        for (++sp, cxp = cntxt; *sp && *sp != '\n'; sp++, cxp++)
  172. X        {
  173. X            if (*sp == '|')
  174. X                *cxp = '\t';
  175. X            else if (*sp == '\b')    /* interpolate troff string */
  176. X            {
  177. X                *cxp = '\\';
  178. X                *++cxp = '*';
  179. X            } else
  180. X                *cxp = *sp;
  181. X        }
  182. X        *cxp = '\n';
  183. X        *++cxp = NULL;
  184. X
  185. X        if (strcmp(nkw, okw) != 0)  /* kwds different */
  186. X        {
  187. X            if (kwfreq != 0)
  188. X                prtmpfile(tf, kwfreq);
  189. X            printf(".KW\n%s\t", nkw);
  190. X            tf = fopen(tempfile, "w");
  191. X            fputs(cntxt, tf);
  192. X            kwfreq = 1;
  193. X        }
  194. X        else  /* if keywords are the same */
  195. X        {
  196. X            fputs(cntxt, tf);
  197. X            kwfreq++;
  198. X        }
  199. X        strcpy(okw, nkw);
  200. X    }
  201. X    prtmpfile(tf, kwfreq);
  202. X}
  203. X
  204. Xprtmpfile(tf, kwfreq)        /* print frequency and contexts */
  205. XFILE *tf;
  206. Xint kwfreq;
  207. X{
  208. X    char save[BUFSIZ];
  209. X
  210. X    if (tf == NULL)        /* exit without core dump */
  211. X        exit(1);
  212. X
  213. X    printf("(%d)\n.CX\n", kwfreq);
  214. X    fclose(tf);
  215. X    tf = fopen(tempfile, "r");
  216. X    while (fgets(save, BUFSIZ, tf))
  217. X        printf(" %s", save);
  218. X    fclose(tf);
  219. X}
  220. X
  221. Xint onintr()        /* remove tempfile in case of interrupt */
  222. X{
  223. X    fprintf(stderr, "\nInterrupt\n");
  224. X    unlink(tempfile);
  225. X    exit(1);
  226. X}
  227. X
  228. Xffmt(fp)          /* fast format routine, no keyword counting */
  229. XFILE *fp;
  230. X{
  231. X    char s[BUFSIZ], okw[BUFSIZ/2], nkw[BUFSIZ/2], cntxt[BUFSIZ];
  232. X    char *sp, *kwp, *cxp;
  233. X
  234. X    strcpy(okw,"~~~~~");    /* make sure 1st keyword is printed */
  235. X
  236. X    while (fgets(s, BUFSIZ, fp))
  237. X    { 
  238. X        for (sp = s, kwp = nkw; *sp && *sp != ' '; sp++, kwp++)
  239. X        {
  240. X            if (*sp == '\b')    /* interpolate troff string */
  241. X            {
  242. X                *kwp = '\\';
  243. X                *++kwp = '*';
  244. X            } else
  245. X                *kwp = *sp;
  246. X        }
  247. X        *kwp = NULL;
  248. X        for (; *sp && *sp != '|'; sp++)
  249. X            ;
  250. X        for (++sp, cxp = cntxt; *sp && *sp != '\n'; sp++, cxp++)
  251. X        {
  252. X            if (*sp == '|')
  253. X                *cxp = '\t';
  254. X            else if (*sp == '\b')    /* interpolate troff string */
  255. X            {
  256. X                *cxp = '\\';
  257. X                *++cxp = '*';
  258. X            } else
  259. X                *cxp = *sp;
  260. X        }
  261. X        *cxp = '\n';
  262. X        *++cxp = NULL;
  263. X
  264. X        if (strcmp(nkw, okw) != 0)  /* kwds different */
  265. X            printf(".KW\n%s\n.CX\n %s", nkw, cntxt);
  266. X        else  /* if keywords are the same */
  267. X            printf(" %s", cntxt);
  268. X        strcpy(okw, nkw);
  269. X    }
  270. X}
  271. X
  272. Xrmkwds(fp)        /* completely suppress printing of keyword */
  273. XFILE *fp;
  274. X{
  275. X    char s[BUFSIZ], *sp;
  276. X
  277. X    while (fgets(s, BUFSIZ, fp))
  278. X    {
  279. X        for (sp = s; *sp && *sp != '|'; sp++)
  280. X            ;
  281. X        for (; *sp; sp++)
  282. X        {
  283. X            if (*sp == '|')
  284. X                putchar(' ');
  285. X            else
  286. X                putchar(*sp);
  287. X        }
  288. X    }
  289. X}
  290. !!!EOF!!!
  291. if [ "`wc -c troffmt.c`" != "    5328 troffmt.c" ]
  292.             then    
  293.                 echo \07WARNING troffmt.c: extraction error
  294.             fi
  295. echo Extracting format.c 1>&2
  296. sed 's/^X//' > format.c <<\!!!EOF!!!
  297. X# include <stdio.h>            /* format.c (rev3.7) */
  298. X# include <ctype.h>
  299. X# include <signal.h>
  300. X
  301. Xchar *tempfile;        /* to store overflow while counting */
  302. Xint nomap = 0;        /* toggle for mapping keyword to lcase */
  303. Xint nocnt = 0;        /* toggle for counting keyword */
  304. Xint nokwd = 0;        /* toggle for suppressing keyword */
  305. X
  306. Xusage()            /* print proper usage and exit */
  307. X{
  308. X    puts("Usage: format [-mck] [filename(s)]\t\t(rev3.7)");
  309. X    puts("-m: keywords not mapped from lower to upper case");
  310. X    puts("-c: suppress counting of keyword frequency");
  311. X    puts("-k: entirely suppress printing of keyword");
  312. X    exit(1);
  313. X}
  314. X
  315. Xmain(argc, argv)    /* make keyword headings with count */
  316. Xint argc;
  317. Xchar *argv[];
  318. X{
  319. X    FILE *fopen(), *fp;
  320. X    int i, j, onintr();
  321. X    char *mktemp();
  322. X
  323. X    if (signal(SIGINT, SIG_IGN) != SIG_IGN)
  324. X        signal(SIGINT, onintr);
  325. X
  326. X    tempfile = "/tmp/FmtXXXXX";
  327. X    mktemp(tempfile);
  328. X
  329. X    for (i = 1; argv[i] && *argv[i] == '-'; i++)
  330. X    {
  331. X        for (j = 1; argv[i][j] != NULL; j++)
  332. X        {
  333. X            if (argv[i][j] == 'm')
  334. X                nomap = 1;
  335. X            else if (argv[i][j] == 'c')
  336. X                nocnt = 1;
  337. X            else if (argv[i][j] == 'k')
  338. X                nokwd = 1;
  339. X            else  /* bad option */
  340. X            {
  341. X                fprintf(stderr,
  342. X                "Illegal format flag: -%c\n", argv[i][j]);
  343. X                usage();
  344. X            }
  345. X        }
  346. X    }
  347. X    if (i == argc)
  348. X    {
  349. X        if (nokwd)
  350. X            rmkwds(stdin);
  351. X        else if (nocnt)
  352. X            ffmt(stdin);
  353. X        else
  354. X            format(stdin);
  355. X    }
  356. X    for (; i < argc; i++)
  357. X    {
  358. X        if ((fp = fopen(argv[i], "r")) != NULL)
  359. X        {
  360. X            if (nokwd)
  361. X                rmkwds(fp);
  362. X            else if (nocnt)
  363. X                ffmt(fp);
  364. X            else
  365. X                format(fp);
  366. X            fclose(fp);
  367. X        }
  368. X        else  /* attempt to open file failed */
  369. X        {
  370. X            fprintf(stderr,
  371. X            "Format cannot access the file: %s\n", argv[i]);
  372. X            continue;
  373. X        }
  374. X    }
  375. X    unlink(tempfile);
  376. X    exit(0);
  377. X}
  378. X
  379. Xchar buff[BUFSIZ*8];    /* tempfile buffer for storing contexts */
  380. Xint bufflen;        /* total length of contexts in buffer */
  381. Xint fulltf = 0;        /* does the tempfile contain something? */
  382. XFILE *tf = NULL;    /* file pointer for tempfile routines */
  383. X
  384. Xformat(fp)          /* print keyword and count only if different */
  385. XFILE *fp;
  386. X{
  387. X    char s[BUFSIZ], okw[BUFSIZ/2], nkw[BUFSIZ/2], cntxt[BUFSIZ];
  388. X    char *sp, *kwp, *cxp, *strcpy();
  389. X    int kwfreq = 0;
  390. X
  391. X    strcpy(okw,"~~~~~");    /* make sure 1st keyword is printed */
  392. X
  393. X    while (fgets(s, BUFSIZ, fp))
  394. X    {
  395. X        for (sp = s, kwp = nkw; *sp && *sp != '|'; sp++, kwp++)
  396. X        {
  397. X            if (!nomap && islower(*sp))
  398. X                *kwp = toupper(*sp);
  399. X            else
  400. X                *kwp = *sp;
  401. X        }
  402. X        *kwp = NULL;
  403. X
  404. X        for (++sp, cxp = cntxt; *sp && *sp != '\n'; sp++, cxp++)
  405. X        {
  406. X            if (*sp == '|') {
  407. X                *cxp = ' '; *++cxp = ' '; *++cxp = ' ';
  408. X            } else
  409. X                *cxp = *sp;
  410. X        }
  411. X        *cxp = '\n';
  412. X        *++cxp = NULL;
  413. X
  414. X        if (strcmp(nkw, okw) != 0)  /* kwds different */
  415. X        {
  416. X            if (kwfreq != 0)
  417. X            {
  418. X                getbuff(kwfreq);
  419. X                putchar('\n');
  420. X            }
  421. X            *buff = NULL;
  422. X            bufflen = 0;
  423. X            fputs(nkw, stdout);
  424. X            putbuff(cntxt);
  425. X            kwfreq = 1;
  426. X        }
  427. X        else  /* if keywords are the same */
  428. X        {
  429. X            putbuff(cntxt);
  430. X            kwfreq++;
  431. X        }
  432. X        strcpy(okw, nkw);
  433. X    }
  434. X    getbuff(kwfreq);
  435. X}
  436. X
  437. Xputbuff(cntxt)        /* cache routine to buffer tempfile */
  438. Xchar cntxt[];
  439. X{
  440. X    char *strcat();
  441. X
  442. X    if (!fulltf)
  443. X    {
  444. X        bufflen += strlen(cntxt);
  445. X        if (bufflen < BUFSIZ*8)
  446. X            strcat(buff, cntxt);
  447. X        else {
  448. X            fulltf = 1;
  449. X            if ((tf = fopen(tempfile, "w")) == NULL)
  450. X                perror(tempfile);
  451. X            fputs(buff, tf);
  452. X            *buff = NULL;
  453. X            bufflen = 0;
  454. X        }
  455. X    }
  456. X    else  /* fulltf */
  457. X        fputs(cntxt, tf);
  458. X}
  459. X
  460. Xgetbuff(kwfreq)        /* print frequency and context buffer */
  461. Xint kwfreq;
  462. X{
  463. X    char str[BUFSIZ];
  464. X
  465. X    printf("(%d)\n", kwfreq);
  466. X    if (!fulltf)
  467. X        fputs(buff, stdout);
  468. X    else
  469. X    {
  470. X        fclose(tf);
  471. X        if ((tf = fopen(tempfile, "r")) == NULL)
  472. X            perror(tempfile);
  473. X        while (fgets(str, BUFSIZ, tf))
  474. X            fputs(str, stdout);
  475. X        fclose(tf);
  476. X        fulltf = 0;
  477. X    }
  478. X}
  479. X
  480. Xint onintr()        /* remove tempfile in case of interrupt */
  481. X{
  482. X    fprintf(stderr, "\nInterrupt\n");
  483. X    unlink(tempfile);
  484. X    exit(1);
  485. X}
  486. X
  487. Xffmt(fp)          /* if different, print keyword without count */
  488. XFILE *fp;
  489. X{
  490. X    char s[BUFSIZ], okw[BUFSIZ/2], nkw[BUFSIZ/2], cntxt[BUFSIZ];
  491. X    char *sp, *kwp, *cxp, *strcpy();
  492. X
  493. X    strcpy(okw,"~~~~~");    /* make sure 1st keyword is printed */
  494. X    while (fgets(s, BUFSIZ, fp))
  495. X    {
  496. X        for (sp = s, kwp = nkw; *sp && *sp != '|'; sp++, kwp++)
  497. X        {
  498. X            if (!nomap && islower(*sp))
  499. X                *kwp = toupper(*sp);
  500. X            else
  501. X                *kwp = *sp;
  502. X        }
  503. X        *kwp = NULL;
  504. X
  505. X        for (++sp, cxp = cntxt; *sp && *sp != '\n'; sp++, cxp++)
  506. X        {
  507. X            if (*sp == '|') {
  508. X                *cxp = ' '; *++cxp = ' '; *++cxp = ' ';
  509. X            } else
  510. X                *cxp = *sp;
  511. X        }
  512. X        *cxp = '\n';
  513. X        *++cxp = NULL;
  514. X
  515. X        if (strcmp(nkw, okw) != 0)  /* kwds different */
  516. X            printf("\n%s\n %s", nkw, cntxt);
  517. X        else  /* if keywords are the same */
  518. X            printf(" %s", cntxt);
  519. X        strcpy(okw, nkw);
  520. X    }
  521. X}
  522. X
  523. Xrmkwds(fp)        /* completely suppress printing of keyword */
  524. XFILE *fp;
  525. X{
  526. X    char s[BUFSIZ], *sp;
  527. X
  528. X    while (fgets(s, BUFSIZ, fp))
  529. X    {
  530. X        for (sp = s; *sp && *sp != '|'; sp++)
  531. X            ;
  532. X        for (; *sp; sp++)
  533. X        {
  534. X            if (*sp == '|')
  535. X                printf("   ");
  536. X            else
  537. X                putchar(*sp);
  538. X        }
  539. X    }
  540. X}
  541. !!!EOF!!!
  542. if [ "`wc -c format.c`" != "    4765 format.c" ]
  543.             then    
  544.                 echo \07WARNING format.c: extraction error
  545.             fi
  546. echo Extracting trmacs 1>&2
  547. sed 's/^X//' > trmacs <<\!!!EOF!!!
  548. X.\" @(#)ms.acc 1.1 86/07/08 SMI; from UCB 4.2
  549. X.    \" AM - accent mark definitions
  550. X.bd S B 3
  551. X.    \" fudge factors for nroff and troff
  552. X.if n \{\
  553. X.    ds #H 0
  554. X.    ds #V .8m
  555. X.    ds #F .3m
  556. X.    ds #[ \f1
  557. X.    ds #] \fP
  558. X.\}
  559. X.if t \{\
  560. X.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  561. X.    ds #V .6m
  562. X.    ds #F 0
  563. X.    ds #[ \&
  564. X.    ds #] \&
  565. X.\}
  566. X.    \" simple accents for nroff and troff
  567. X.if n \{\
  568. X.    ds ' \h'-1'\'
  569. X.    ds ` \h'-1'\`
  570. X.    ds ^ \h'-1'^
  571. X.    ds , \h'-1',
  572. X.    ds ~ \h'-1'~
  573. X.    ds ? ?
  574. X.    ds ! !
  575. X.    ds / \h'-1'\(sl
  576. X.    ds q o\h'-1',
  577. X.\}
  578. X.if t \{\
  579. X.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  580. X.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  581. X.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  582. X.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  583. X.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  584. X.    ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
  585. X.    ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
  586. X.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  587. X.    ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
  588. X.\}
  589. X.    \" troff and (daisy-wheel) nroff accents
  590. X.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  591. X.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  592. X.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
  593. X.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
  594. X.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
  595. X.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
  596. X.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  597. X.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  598. X.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  599. X.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  600. X.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  601. X.ds ae a\h'-(\w'a'u*4/10)'e
  602. X.ds Ae A\h'-(\w'A'u*4/10)'E
  603. X.ds oe o\h'-(\w'o'u*4/10)'e
  604. X.ds Oe O\h'-(\w'O'u*4/10)'E
  605. X.    \" corrections for vroff
  606. X.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  607. X.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  608. X.    \" for low resolution devices (crt and lpr)
  609. X.if \n(.H>23 .if \n(.V>19 \
  610. X\{\
  611. X.    ds : \h'-1'"
  612. X.    ds 8 B
  613. X.    ds v \h'-1'\o'\(aa\(ga'
  614. X.    ds _ \h'-1'^
  615. X.    ds . \h'-1'.
  616. X.    ds 3 3
  617. X.    ds o a
  618. X.    ds d- d\h'-1'\(ga
  619. X.    ds D- D\h'-1'\(hy
  620. X.    ds th \o'bp'
  621. X.    ds Th \o'LP'
  622. X.    ds ae ae
  623. X.    ds Ae AE
  624. X.    ds oe oe
  625. X.    ds Oe OE
  626. X.\}
  627. X.rm #[ #] #H #V #F C
  628. X.de KW
  629. X.ne 2.1
  630. X.sp 0.3
  631. X.ta 20n
  632. X.ft B
  633. X..
  634. X.de CX
  635. X.sp 0.1
  636. X.ta 3.6iR 3.75i
  637. X.ft R
  638. X..
  639. X.de HD
  640. X'sp 2
  641. X.tl ''- % -''
  642. X'sp 2
  643. X..
  644. X.de FO
  645. X'bp
  646. X..
  647. X.wh 0 HD
  648. X.wh -5 FO
  649. X.nf
  650. X.po 0.5i
  651. X.ll 7.0i
  652. X.lt 7.0i
  653. !!!EOF!!!
  654. if [ "`wc -c trmacs`" != "    2509 trmacs" ]
  655.             then    
  656.                 echo \07WARNING trmacs: extraction error
  657.             fi
  658.  
  659.