Annotation of 43BSD/contrib/emacs/etc/digest-doc.c, revision 1.1

1.1     ! root        1: /* Give this program DOCSTR.mm.nn as standard input
        !             2:    and it outputs to standard output
        !             3:    a file of nroff output containing the doc strings.  */
        !             4: 
        !             5: # include <stdio.h>
        !             6: main()
        !             7: {
        !             8:   register int ch;
        !             9:   register int notfirst = 0;
        !            10: 
        !            11:   printf (".TL\n");
        !            12:   printf ("Command Summary for GNU Emacs\n");
        !            13:   printf (".AU\nRichard M. Stallman\n");
        !            14:   while ((ch = getchar()) != EOF)
        !            15:     {
        !            16:       if (ch == '\037')
        !            17:        {
        !            18:          if (notfirst)
        !            19:            printf("\n.DE");
        !            20:          else
        !            21:            notfirst = 1;
        !            22: 
        !            23:          printf("\n.SH\n");
        !            24: 
        !            25:          while ((ch = getchar()) != '\n')  /* Changed this line */
        !            26:            {
        !            27:              if (ch != EOF)
        !            28:                  putchar(ch);
        !            29:              else
        !            30:                {
        !            31:                  ungetc(ch);
        !            32:                  break;
        !            33:                }
        !            34:            }
        !            35:          printf("\n.DS L\n");
        !            36:        }
        !            37:       else
        !            38:        putchar(ch);
        !            39:     }
        !            40:   exit(0);
        !            41: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.