view lib-src/digest-doc.c @ 3679:e1380814a454

* config.h.in (HAVE_XRMSETDATABASE, HAVE_RANDOM, HAVE_LIBXBSD): Add #undefs for these. Dyke out code requesting -lXbsd and HAVE_RANDOM for XFREE386. * xfns.c (Fx_open_connection): Test HAVE_XRMSETDATABASE instead of NO_XRM_SET_DATABASE; the latter isn't used any more. * m/delta88k, m/tekXD88.h, s/linux.h, s/usg5-4-2.h (HAVE_RANDOM): Dyke out these #definitions; to avoid conflict with autoconf.
author Jim Blandy <jimb@redhat.com>
date Sat, 12 Jun 1993 10:12:21 +0000
parents bba832d91c66
children dd3b83e4ceb0
line wrap: on
line source

/* Give this program DOCSTR.mm.nn as standard input
   and it outputs to standard output
   a file of nroff output containing the doc strings.

   See also sorted-doc.c, which produces similar output
   but in texinfo format and sorted by function/variable name.  */

#include <stdio.h>
main ()
{
  register int ch;
  register int notfirst = 0;

  printf (".TL\n");
  printf ("Command Summary for GNU Emacs\n");
  printf (".AU\nRichard M. Stallman\n");
  while ((ch = getchar ()) != EOF)
    {
      if (ch == '\037')
	{
	  if (notfirst)
	    printf ("\n.DE");
	  else
	    notfirst = 1;

	  printf ("\n.SH\n");

	  ch = getchar ();
	  printf (ch == 'F' ? "Function " : "Variable ");

	  while ((ch = getchar ()) != '\n')  /* Changed this line */
	    {
	      if (ch != EOF)
		  putchar (ch);
	      else
		{
		  ungetc (ch, stdin);
		  break;
		}
	    }
	  printf ("\n.DS L\n");
	}
      else
	putchar (ch);
    }
  return 0;
}