annotate lib-src/digest-doc.c @ 4928:ea701c23ed84

change text_width method to take a window, in preparation for unicode-internal changes -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-01-19 Ben Wing <ben@xemacs.org> * console-impl.h (struct console_methods): * console-stream.c (stream_text_width): * redisplay-msw.c (mswindows_output_string): * redisplay-msw.c (mswindows_text_width): * redisplay-tty.c (tty_text_width): * redisplay-xlike-inc.c (XLIKE_text_width): * redisplay-xlike-inc.c (XLIKE_output_string): * redisplay.c: * redisplay.c (redisplay_window_text_width_ichar_string): * redisplay.c (redisplay_text_width_string): Change the text_width method to take a window instead of a frame. Needed for Unicode-internal.
author Ben Wing <ben@xemacs.org>
date Tue, 19 Jan 2010 11:21:34 -0600
parents ecf1ebac70d8
children ed624ab64583 06dd936cde16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Give this program DOCSTR.mm.nn as standard input
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 and it outputs to standard output
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 a file of nroff output containing the doc strings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 See also sorted-doc.c, which produces similar output
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 but in texinfo format and sorted by function/variable name. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 #ifdef emacs
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
9 #include <config.h>
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 #include <stdio.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 int
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 2286
diff changeset
14 main (int argc, char **argv)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 register int ch;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 register int notfirst = 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 printf (".TL\n");
613
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 438
diff changeset
20 printf ("Command Summary for XEmacs\n");
023b83f4e54b [xemacs-hg @ 2001-06-10 10:42:16 by ben]
ben
parents: 438
diff changeset
21 printf (".AU\nThe XEmacs Advocacy Group\n");
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 while ((ch = getchar ()) != EOF)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 if (ch == '\037')
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 if (notfirst)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 printf ("\n.DE");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 notfirst = 1;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 printf ("\n.SH\n");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 ch = getchar ();
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 printf (ch == 'F' ? "Function " : "Variable ");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 while ((ch = getchar ()) != '\n') /* Changed this line */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 if (ch != EOF)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 putchar (ch);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 ungetc (ch, stdin);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 break;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 printf ("\n.DS L\n");
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 putchar (ch);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 }
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 return 0;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 }