view lib-src/digest-doc.c @ 4132:e0345afdf64e

* term/x-win.el: Include (invocation-name) in the error messages which might occur during startup. * term/x-win.el: Make the `-rn NAME' option specify a resource name, as documented, and not a resource database string. Make `-name NAME' act like `-rn NAME' and also set the name of the initial frame. (command-switch-alist): Process the `-rn' and `-name' options using the x-handle-name-rn-switch function. (x-handle-name-rn-switch): New function, which sets the x-resource-name variable. (opening connection): Make sure x-resource-name is valid. If it's not a string, set it to (invocation-name), with any periods or asterisks changed to hyphens. * term/x-win.el: Make the `-xrm STRING' option specify a resource database string. `-rn' used to behave this way. (command-switch-alist): Process the `-xrm' switch using x-handle-xrm-switch. (x-handle-xrm-switch): Renamed from x-handle-rn-switch; this function does the right thing for `-xrm', not for `-rn'. * term/x-win.el: Recognize affirmative values for reverseVideo properly. Include "on" in the list of recognized values.
author Jim Blandy <jimb@redhat.com>
date Sun, 18 Jul 1993 06:21:42 +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;
}