view lib-src/digest-doc.c @ 35800:fe8277459ef3

(enum window_part): New enumeration. (Qleft_fringe, Qright_fringe): Replace Qleft_bitmap_area and Qright_bitmap_area. (coordinates_in_window): Return an enumerator from enum window_part. Fix handling of right scroll bar. (Fcoordinates_in_window_p): Doc fix. Return `left-fringe' and `right-fringe' instead of `left-bitmap-area' and `right-bitmap-area'. Use enumerators from enum window_part instead of hard-coded integers. (check_window_containing, window_from_coordinates): Use enumerators from enum window_part instead of hard-coded integers. (syms_of_window): Replace Qleft_bitmap_area and Qright_bitmap_area.with Qleft_fringe and Qright_fringe.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 31 Jan 2001 20:26:26 +0000
parents dd3b83e4ceb0
children c8fb06423da0
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>

int
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;
}