*** empty log message ***
[emacs.git] / lib-src / digest-doc.c
blobd7764c08a65639d87fefd64b5fc1b1160636ab4a
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.
5 See also sorted-doc.c, which produces similar output
6 but in texinfo format and sorted by function/variable name. */
8 #include <stdio.h>
9 main ()
11 register int ch;
12 register int notfirst = 0;
14 printf (".TL\n");
15 printf ("Command Summary for GNU Emacs\n");
16 printf (".AU\nRichard M. Stallman\n");
17 while ((ch = getchar ()) != EOF)
19 if (ch == '\037')
21 if (notfirst)
22 printf ("\n.DE");
23 else
24 notfirst = 1;
26 printf ("\n.SH\n");
28 ch = getchar ();
29 printf (ch == 'F' ? "Function " : "Variable ");
31 while ((ch = getchar ()) != '\n') /* Changed this line */
33 if (ch != EOF)
34 putchar (ch);
35 else
37 ungetc (ch, stdin);
38 break;
41 printf ("\n.DS L\n");
43 else
44 putchar (ch);
46 return 0;