annotate lib-src/digest-doc.c @ 10374:d6de68b87cbd

Removed several more gratuitous autoload cookies. rlogin-initially-track-cwd: Variable deleted. rlogin-directory-tracking-mode: New variable and function. Default to 'local. rlogin-host, rlogin-remote-user: New variables. rlogin: Set them appropriately. rlogin-mode-map: Copy shell-mode-map fully if not a list (in lucid emacs, keymaps are opaque objects). rlogin-tab-or-complete: New function. Bind C-i to it. rlogin-carriage-filter: New function. rlogin: Add it to comint-output-filter-functions. rlogin-parse-words: New function. rlogin: Make buffer name "*rlogin-USER@HOST* if remote user differs from local. Simplify initialization of local variables, using rlogin-parse-words. Do not call comint-mode directly. Doc fixes.
author Noah Friedman <friedman@splode.com>
date Tue, 10 Jan 1995 03:14:24 +0000
parents dd3b83e4ceb0
children c8fb06423da0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Give this program DOCSTR.mm.nn as standard input
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 and it outputs to standard output
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 a file of nroff output containing the doc strings.
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5 See also sorted-doc.c, which produces similar output
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 but in texinfo format and sorted by function/variable name. */
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 #include <stdio.h>
9491
dd3b83e4ceb0 Eliminate some -Wall warnings.
David J. MacKenzie <djm@gnu.org>
parents: 9
diff changeset
9
dd3b83e4ceb0 Eliminate some -Wall warnings.
David J. MacKenzie <djm@gnu.org>
parents: 9
diff changeset
10 int
9
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 main ()
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 {
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 register int ch;
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 register int notfirst = 0;
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 printf (".TL\n");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 printf ("Command Summary for GNU Emacs\n");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 printf (".AU\nRichard M. Stallman\n");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 while ((ch = getchar ()) != EOF)
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20 {
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 if (ch == '\037')
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 {
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 if (notfirst)
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 printf ("\n.DE");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 else
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 notfirst = 1;
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 printf ("\n.SH\n");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 ch = getchar ();
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 printf (ch == 'F' ? "Function " : "Variable ");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 while ((ch = getchar ()) != '\n') /* Changed this line */
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34 {
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 if (ch != EOF)
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 putchar (ch);
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 else
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 {
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 ungetc (ch, stdin);
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 break;
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 }
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 }
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 printf ("\n.DS L\n");
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 }
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 else
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 putchar (ch);
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 }
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 return 0;
bba832d91c66 entered into RCS
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 }