2 * info backend for Halibut
6 * - configurable choice of how to allocate node names
7 * - escape, warn or simply remove commas and colons in node
8 * names; also test colons in index terms.
9 * - might be helpful to diagnose duplicate node names too!
10 * - test everything in info(1), and probably jed too
14 * - configurable indentation, bullets, emphasis, quotes etc?
27 typedef struct node_tag node
;
30 node
*up
, *prev
, *next
, *lastchild
;
31 int pos
, started_menu
, filenum
;
42 static int info_convert(wchar_t *, char **);
44 static void info_heading(rdstringc
*, word
*, word
*, int);
45 static void info_rule(rdstringc
*, int, int);
46 static void info_para(rdstringc
*, word
*, char *, word
*, keywordlist
*,
48 static void info_codepara(rdstringc
*, word
*, int, int);
49 static void info_versionid(rdstringc
*, word
*);
50 static void info_menu_item(rdstringc
*, node
*, paragraph
*);
51 static word
*info_transform_wordlist(word
*, keywordlist
*);
52 static int info_check_index(word
*, node
*, indexdata
*);
54 static void info_rdaddwc(rdstringc
*, word
*, word
*, int);
56 static node
*info_node_new(char *name
);
57 static char *info_node_name(paragraph
*p
);
59 static infoconfig
info_configure(paragraph
*source
) {
65 ret
.filename
= dupstr("output.info");
66 ret
.maxfilesize
= 64 << 10;
68 for (; source
; source
= source
->next
) {
69 if (source
->type
== para_Config
) {
70 if (!ustricmp(source
->keyword
, L
"info-filename")) {
72 ret
.filename
= utoa_dup(uadv(source
->keyword
));
73 } else if (!ustricmp(source
->keyword
, L
"info-max-file-size")) {
74 ret
.maxfilesize
= utoi(uadv(source
->keyword
));
82 paragraph
*info_config_filename(char *filename
)
85 wchar_t *ufilename
, *up
;
89 memset(p
, 0, sizeof(*p
));
90 p
->type
= para_Config
;
92 p
->fpos
.filename
= "<command line>";
93 p
->fpos
.line
= p
->fpos
.col
= -1;
95 ufilename
= ufroma_dup(filename
);
96 len
= ustrlen(ufilename
) + 2 + lenof(L
"info-filename");
97 p
->keyword
= mknewa(wchar_t, len
);
99 ustrcpy(up
, L
"info-filename");
101 ustrcpy(up
, ufilename
);
104 assert(up
- p
->keyword
< len
);
110 void info_backend(paragraph
*sourceform
, keywordlist
*keywords
,
114 word
*prefix
, *body
, *wp
;
117 int nesting
, nestindent
;
118 int indentb
, indenta
;
121 rdstringc intro_text
= { 0, 0, NULL
};
122 node
*topnode
, *currnode
;
129 int width
= 70, listindentbefore
= 1, listindentafter
= 3;
130 int indent_code
= 2, index_width
= 40;
132 IGNORE(keywords
); /* we don't happen to need this */
133 IGNORE(idx
); /* or this */
135 conf
= info_configure(sourceform
);
138 * Go through and create a node for each section.
140 topnode
= info_node_new("Top");
142 for (p
= sourceform
; p
; p
= p
->next
) switch (p
->type
) {
148 case para_UnnumberedChapter
:
152 node
*newnode
, *upnode
;
155 nodename
= info_node_name(p
);
156 newnode
= info_node_new(nodename
);
159 p
->private_data
= newnode
;
162 upnode
= (node
*)p
->parent
->private_data
;
166 newnode
->up
= upnode
;
168 currnode
->next
= newnode
;
169 newnode
->prev
= currnode
;
171 currnode
->listnext
= newnode
;
178 * Set up the display form of each index entry.
184 for (i
= 0; (entry
= index234(idx
->entries
, i
)) != NULL
; i
++) {
185 info_idx
*ii
= mknew(info_idx
);
186 rdstringc rs
= { 0, 0, NULL
};
188 ii
->nnodes
= ii
->nodesize
= 0;
191 info_rdaddwc(&rs
, entry
->text
, NULL
, FALSE
);
193 * FIXME: splatter colons.
197 entry
->backend_data
= ii
;
202 * An Info file begins with a piece of introductory text which
203 * is apparently never shown anywhere. This seems to me to be a
204 * good place to put the copyright notice and the version IDs.
205 * Also, Info directory entries are expected to go here.
209 "This Info file generated by Halibut, ");
210 rdaddsc(&intro_text
, version
);
211 rdaddsc(&intro_text
, "\n\n");
213 for (p
= sourceform
; p
; p
= p
->next
)
214 if (p
->type
== para_Config
&&
215 !ustricmp(p
->keyword
, L
"info-dir-entry")) {
216 wchar_t *section
, *shortname
, *longname
, *kw
;
219 section
= uadv(p
->keyword
);
220 shortname
= *section ?
uadv(section
) : NULL
;
221 longname
= *shortname ?
uadv(shortname
) : NULL
;
222 kw
= *longname ?
uadv(longname
) : NULL
;
225 error(err_infodirentry
, &p
->fpos
);
229 rdaddsc(&intro_text
, "INFO-DIR-SECTION ");
230 s
= utoa_dup(section
);
231 rdaddsc(&intro_text
, s
);
233 rdaddsc(&intro_text
, "\nSTART-INFO-DIR-ENTRY\n* ");
234 s
= utoa_dup(shortname
);
235 rdaddsc(&intro_text
, s
);
237 rdaddsc(&intro_text
, ": (");
238 s
= dupstr(conf
.filename
);
239 if (strlen(s
) > 5 && !strcmp(s
+strlen(s
)-5, ".info"))
240 s
[strlen(s
)-5] = '\0';
241 rdaddsc(&intro_text
, s
);
243 rdaddsc(&intro_text
, ")");
245 keyword
*kwl
= kw_lookup(keywords
, kw
);
246 if (kwl
&& kwl
->para
->private_data
) {
247 node
*n
= (node
*)kwl
->para
->private_data
;
248 rdaddsc(&intro_text
, n
->name
);
251 rdaddsc(&intro_text
, ". ");
252 s
= utoa_dup(longname
);
253 rdaddsc(&intro_text
, s
);
255 rdaddsc(&intro_text
, "\nEND-INFO-DIR-ENTRY\n\n");
258 for (p
= sourceform
; p
; p
= p
->next
)
259 if (p
->type
== para_Copyright
)
260 info_para(&intro_text
, NULL
, NULL
, p
->words
, keywords
,
263 for (p
= sourceform
; p
; p
= p
->next
)
264 if (p
->type
== para_VersionID
)
265 info_versionid(&intro_text
, p
->words
);
267 if (intro_text
.text
[intro_text
.pos
-1] != '\n')
268 rdaddc(&intro_text
, '\n');
271 for (p
= sourceform
; p
; p
= p
->next
)
272 if (p
->type
== para_Title
)
273 info_heading(&topnode
->text
, NULL
, p
->words
, width
);
275 nestindent
= listindentbefore
+ listindentafter
;
280 /* Do the main document */
281 for (p
= sourceform
; p
; p
= p
->next
) switch (p
->type
) {
288 assert(nesting
>= 0);
292 nesting
+= nestindent
;
295 nesting
-= nestindent
;
296 assert(nesting
>= 0);
300 * Things we ignore because we've already processed them or
301 * aren't going to touch them in this pass.
305 case para_Biblio
: /* only touch BiblioCited */
316 case para_UnnumberedChapter
:
319 currnode
= p
->private_data
;
321 assert(currnode
->up
);
323 if (!currnode
->up
->started_menu
) {
324 rdaddsc(&currnode
->up
->text
, "* Menu:\n\n");
325 currnode
->up
->started_menu
= TRUE
;
327 info_menu_item(&currnode
->up
->text
, currnode
, p
);
329 has_index
|= info_check_index(p
->words
, currnode
, idx
);
330 info_heading(&currnode
->text
, p
->kwtext
, p
->words
, width
);
335 info_rule(&currnode
->text
, nesting
, width
- nesting
);
340 case para_DescribedThing
:
341 case para_Description
:
342 case para_BiblioCited
:
344 case para_NumberedList
:
345 has_index
|= info_check_index(p
->words
, currnode
, idx
);
346 if (p
->type
== para_Bullet
) {
349 bullet
.type
= word_Normal
;
350 bullet
.text
= L
"-"; /* FIXME: configurability */
353 indentb
= listindentbefore
;
354 indenta
= listindentafter
;
355 } else if (p
->type
== para_NumberedList
) {
357 prefixextra
= "."; /* FIXME: configurability */
358 indentb
= listindentbefore
;
359 indenta
= listindentafter
;
360 } else if (p
->type
== para_Description
) {
363 indentb
= listindentbefore
;
364 indenta
= listindentafter
;
368 indentb
= indenta
= 0;
370 if (p
->type
== para_BiblioCited
) {
371 body
= dup_word_list(p
->kwtext
);
372 for (wp
= body
; wp
->next
; wp
= wp
->next
);
373 wp
->next
= &spaceword
;
374 spaceword
.next
= p
->words
;
375 spaceword
.alt
= NULL
;
376 spaceword
.type
= word_WhiteSpace
;
377 spaceword
.text
= NULL
;
382 info_para(&currnode
->text
, prefix
, prefixextra
, body
, keywords
,
383 nesting
+ indentb
, indenta
,
384 width
- nesting
- indentb
- indenta
);
387 free_word_list(body
);
392 info_codepara(&currnode
->text
, p
->words
,
393 nesting
+ indent_code
,
394 width
- nesting
- 2 * indent_code
);
399 * Create an index node if required.
406 newnode
= info_node_new("Index");
407 newnode
->up
= topnode
;
409 currnode
->next
= newnode
;
410 newnode
->prev
= currnode
;
411 currnode
->listnext
= newnode
;
413 rdaddsc(&newnode
->text
, "Index\n-----\n\n* Menu:\n\n");
415 info_menu_item(&topnode
->text
, newnode
, NULL
);
417 for (i
= 0; (entry
= index234(idx
->entries
, i
)) != NULL
; i
++) {
418 info_idx
*ii
= (info_idx
*)entry
->backend_data
;
420 for (j
= 0; j
< ii
->nnodes
; j
++) {
421 int pos0
= newnode
->text
.pos
;
422 rdaddsc(&newnode
->text
, "* ");
424 * When we have multiple references for a single
425 * index term, we only display the actual term on
426 * the first line, to make it clear that the terms
427 * really are the same.
430 rdaddsc(&newnode
->text
, ii
->text
);
431 for (k
= newnode
->text
.pos
- pos0
; k
< index_width
; k
++)
432 rdaddc(&newnode
->text
, ' ');
433 rdaddsc(&newnode
->text
, ": ");
434 rdaddsc(&newnode
->text
, ii
->nodes
[j
]->name
);
435 rdaddsc(&newnode
->text
, ".\n");
441 * Finalise the text of each node, by adding the ^_ delimiter
442 * and the node line at the top.
444 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
) {
445 char *origtext
= currnode
->text
.text
;
446 currnode
->text
.text
= NULL
;
447 currnode
->text
.pos
= currnode
->text
.size
= 0;
448 rdaddsc(&currnode
->text
, "\037\nFile: ");
449 rdaddsc(&currnode
->text
, conf
.filename
);
450 rdaddsc(&currnode
->text
, ", Node: ");
451 rdaddsc(&currnode
->text
, currnode
->name
);
452 if (currnode
->prev
) {
453 rdaddsc(&currnode
->text
, ", Prev: ");
454 rdaddsc(&currnode
->text
, currnode
->prev
->name
);
456 rdaddsc(&currnode
->text
, ", Up: ");
457 rdaddsc(&currnode
->text
, (currnode
->up ?
458 currnode
->up
->name
: "(dir)"));
459 if (currnode
->next
) {
460 rdaddsc(&currnode
->text
, ", Next: ");
461 rdaddsc(&currnode
->text
, currnode
->next
->name
);
463 rdaddsc(&currnode
->text
, "\n\n");
464 rdaddsc(&currnode
->text
, origtext
);
466 * Just make _absolutely_ sure we end with a newline.
468 if (currnode
->text
.text
[currnode
->text
.pos
-1] != '\n')
469 rdaddc(&currnode
->text
, '\n');
475 * Compute the offsets for the tag table.
477 filepos
= intro_text
.pos
;
478 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
) {
479 currnode
->pos
= filepos
;
480 filepos
+= currnode
->text
.pos
;
484 * Split into sub-files.
486 if (conf
.maxfilesize
> 0) {
487 int currfilesize
= intro_text
.pos
, currfilenum
= 1;
488 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
) {
489 if (currfilesize
> intro_text
.pos
&&
490 currfilesize
+ currnode
->text
.pos
> conf
.maxfilesize
) {
492 currfilesize
= intro_text
.pos
;
494 currnode
->filenum
= currfilenum
;
495 currfilesize
+= currnode
->text
.pos
;
500 * Write the primary output file.
502 fp
= fopen(conf
.filename
, "w");
504 error(err_cantopenw
, conf
.filename
);
507 fputs(intro_text
.text
, fp
);
508 if (conf
.maxfilesize
== 0) {
509 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
)
510 fputs(currnode
->text
.text
, fp
);
513 fprintf(fp
, "\037\nIndirect:\n");
514 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
)
515 if (filenum
!= currnode
->filenum
) {
516 filenum
= currnode
->filenum
;
517 fprintf(fp
, "%s-%d: %d\n", conf
.filename
, filenum
,
521 fprintf(fp
, "\037\nTag Table:\n");
522 if (conf
.maxfilesize
> 0)
523 fprintf(fp
, "(Indirect)\n");
524 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
)
525 fprintf(fp
, "Node: %s\177%d\n", currnode
->name
, currnode
->pos
);
526 fprintf(fp
, "\037\nEnd Tag Table\n");
530 * Write the subfiles.
532 if (conf
.maxfilesize
> 0) {
536 for (currnode
= topnode
; currnode
; currnode
= currnode
->listnext
) {
537 if (filenum
!= currnode
->filenum
) {
540 filenum
= currnode
->filenum
;
544 fname
= mknewa(char, strlen(conf
.filename
) + 40);
545 sprintf(fname
, "%s-%d", conf
.filename
, filenum
);
546 fp
= fopen(fname
, "w");
548 error(err_cantopenw
, fname
);
552 fputs(intro_text
.text
, fp
);
554 fputs(currnode
->text
.text
, fp
);
562 static int info_check_index(word
*w
, node
*n
, indexdata
*idx
)
566 for (; w
; w
= w
->next
) {
567 if (w
->type
== word_IndexRef
) {
571 tag
= index_findtag(idx
, w
->text
);
575 for (i
= 0; i
< tag
->nrefs
; i
++) {
576 indexentry
*entry
= tag
->refs
[i
];
577 info_idx
*ii
= (info_idx
*)entry
->backend_data
;
579 if (ii
->nnodes
> 0 && ii
->nodes
[ii
->nnodes
-1] == n
) {
581 * If the same index term is indexed twice
582 * within the same section, we only want to
583 * mention it once in the index. So do nothing
589 if (ii
->nnodes
>= ii
->nodesize
) {
591 ii
->nodes
= resize(ii
->nodes
, ii
->nodesize
);
594 ii
->nodes
[ii
->nnodes
++] = n
;
605 * Convert a wide string into a string of chars. If `result' is
606 * non-NULL, mallocs the resulting string and stores a pointer to
607 * it in `*result'. If `result' is NULL, merely checks whether all
608 * characters in the string are feasible for the output character
611 * Return is nonzero if all characters are OK. If not all
612 * characters are OK but `result' is non-NULL, a result _will_
613 * still be generated!
615 static int info_convert(wchar_t *s
, char **result
) {
617 * FIXME. Currently this is ISO8859-1 only.
619 int doing
= (result
!= 0);
622 int plen
= 0, psize
= 0;
628 if ((c
>= 32 && c
<= 126) ||
629 (c
>= 160 && c
<= 255)) {
633 /* Char is not OK. */
635 outc
= 0xBF; /* approximate the good old DEC `uh?' */
640 p
= resize(p
, psize
);
646 p
= resize(p
, plen
+1);
653 static word
*info_transform_wordlist(word
*words
, keywordlist
*keywords
)
655 word
*ret
= dup_word_list(words
);
659 for (w
= ret
; w
; w
= w
->next
) {
660 w
->private_data
= NULL
;
661 if (w
->type
== word_UpperXref
|| w
->type
== word_LowerXref
) {
662 kwl
= kw_lookup(keywords
, w
->text
);
664 if (kwl
->para
->type
== para_NumberedList
||
665 kwl
->para
->type
== para_BiblioCited
) {
667 * In Info, we do nothing special for xrefs to
668 * numbered list items or bibliography entries.
673 * An xref to a different section has its text
674 * completely replaced.
680 if (w2
->type
== word_XrefEnd
) {
690 * Now w is the UpperXref / LowerXref we
691 * started with, and w4 is the next word after
692 * the corresponding XrefEnd (if any). The
693 * simplest thing is just to stick a pointer to
694 * the target node structure in the private
695 * data field of the xref word, and let
696 * info_rdaddwc and friends read the node name
700 w
->private_data
= kwl
->para
->private_data
;
701 assert(w
->private_data
);
710 static void info_rdaddwc(rdstringc
*rs
, word
*words
, word
*end
, int xrefs
) {
713 for (; words
&& words
!= end
; words
= words
->next
) switch (words
->type
) {
724 case word_WhiteSpace
:
727 case word_WkCodeSpace
:
731 case word_WkCodeQuote
:
732 assert(words
->type
!= word_CodeQuote
&&
733 words
->type
!= word_WkCodeQuote
);
734 if (towordstyle(words
->type
) == word_Emph
&&
735 (attraux(words
->aux
) == attr_First
||
736 attraux(words
->aux
) == attr_Only
))
737 rdaddc(rs
, '_'); /* FIXME: configurability */
738 else if (towordstyle(words
->type
) == word_Code
&&
739 (attraux(words
->aux
) == attr_First
||
740 attraux(words
->aux
) == attr_Only
))
741 rdaddc(rs
, '`'); /* FIXME: configurability */
742 if (removeattr(words
->type
) == word_Normal
) {
743 if (info_convert(words
->text
, &c
))
746 info_rdaddwc(rs
, words
->alt
, NULL
, FALSE
);
748 } else if (removeattr(words
->type
) == word_WhiteSpace
) {
750 } else if (removeattr(words
->type
) == word_Quote
) {
751 rdaddc(rs
, quoteaux(words
->aux
) == quote_Open ?
'`' : '\'');
752 /* FIXME: configurability */
754 if (towordstyle(words
->type
) == word_Emph
&&
755 (attraux(words
->aux
) == attr_Last
||
756 attraux(words
->aux
) == attr_Only
))
757 rdaddc(rs
, '_'); /* FIXME: configurability */
758 else if (towordstyle(words
->type
) == word_Code
&&
759 (attraux(words
->aux
) == attr_Last
||
760 attraux(words
->aux
) == attr_Only
))
761 rdaddc(rs
, '\''); /* FIXME: configurability */
766 if (xrefs
&& words
->private_data
) {
767 rdaddsc(rs
, "*Note ");
768 rdaddsc(rs
, ((node
*)words
->private_data
)->name
);
775 static int info_width_internal(word
*words
, int xrefs
);
777 static int info_width_internal_list(word
*words
, int xrefs
) {
780 w
+= info_width_internal(words
, xrefs
);
786 static int info_width_internal(word
*words
, int xrefs
) {
787 switch (words
->type
) {
798 return (((words
->type
== word_Emph
||
799 words
->type
== word_Code
)
800 ?
(attraux(words
->aux
) == attr_Only ?
2 :
801 attraux(words
->aux
) == attr_Always ?
0 : 1)
803 (info_convert(words
->text
, NULL
) ?
804 ustrlen(words
->text
) :
805 info_width_internal_list(words
->alt
, xrefs
)));
807 case word_WhiteSpace
:
810 case word_WkCodeSpace
:
814 case word_WkCodeQuote
:
815 assert(words
->type
!= word_CodeQuote
&&
816 words
->type
!= word_WkCodeQuote
);
817 return (((towordstyle(words
->type
) == word_Emph
||
818 towordstyle(words
->type
) == word_Code
)
819 ?
(attraux(words
->aux
) == attr_Only ?
2 :
820 attraux(words
->aux
) == attr_Always ?
0 : 1)
825 if (xrefs
&& words
->private_data
) {
826 /* "*Note " plus "::" comes to 8 characters */
827 return 8 + strlen(((node
*)words
->private_data
)->name
);
831 return 0; /* should never happen */
834 static int info_width_noxrefs(word
*words
)
836 return info_width_internal(words
, FALSE
);
838 static int info_width_xrefs(word
*words
)
840 return info_width_internal(words
, TRUE
);
843 static void info_heading(rdstringc
*text
, word
*tprefix
,
844 word
*words
, int width
) {
845 rdstringc t
= { 0, 0, NULL
};
847 int firstlinewidth
, wrapwidth
;
849 wrappedline
*wrapping
, *p
;
852 info_rdaddwc(&t
, tprefix
, NULL
, FALSE
);
853 rdaddsc(&t
, ": "); /* FIXME: configurability */
855 margin
= length
= (t
.text ?
strlen(t
.text
) : 0);
858 firstlinewidth
= width
- length
;
861 wrapping
= wrap_para(words
, firstlinewidth
, wrapwidth
, info_width_noxrefs
);
862 for (p
= wrapping
; p
; p
= p
->next
) {
863 info_rdaddwc(&t
, p
->begin
, p
->end
, FALSE
);
864 length
= (t
.text ?
strlen(t
.text
) : 0);
865 for (i
= 0; i
< margin
; i
++)
867 rdaddsc(text
, t
.text
);
869 for (i
= 0; i
< margin
; i
++)
884 static void info_rule(rdstringc
*text
, int indent
, int width
) {
885 while (indent
--) rdaddc(text
, ' ');
886 while (width
--) rdaddc(text
, '-');
891 static void info_para(rdstringc
*text
, word
*prefix
, char *prefixextra
,
892 word
*input
, keywordlist
*keywords
,
893 int indent
, int extraindent
, int width
) {
894 wrappedline
*wrapping
, *p
;
896 rdstringc pfx
= { 0, 0, NULL
};
899 int firstlinewidth
= width
;
901 words
= info_transform_wordlist(input
, keywords
);
904 info_rdaddwc(&pfx
, prefix
, NULL
, FALSE
);
906 rdaddsc(&pfx
, prefixextra
);
907 for (i
= 0; i
< indent
; i
++)
909 rdaddsc(text
, pfx
.text
);
910 /* If the prefix is too long, shorten the first line to fit. */
911 e
= extraindent
- strlen(pfx
.text
);
913 firstlinewidth
+= e
; /* this decreases it, since e < 0 */
914 if (firstlinewidth
< 0) {
915 e
= indent
+ extraindent
;
916 firstlinewidth
= width
;
923 e
= indent
+ extraindent
;
925 wrapping
= wrap_para(words
, firstlinewidth
, width
, info_width_xrefs
);
926 for (p
= wrapping
; p
; p
= p
->next
) {
927 for (i
= 0; i
< e
; i
++)
929 info_rdaddwc(text
, p
->begin
, p
->end
, TRUE
);
931 e
= indent
+ extraindent
;
936 free_word_list(words
);
939 static void info_codepara(rdstringc
*text
, word
*words
,
940 int indent
, int width
) {
943 for (; words
; words
= words
->next
) if (words
->type
== word_WeakCode
) {
945 info_convert(words
->text
, &c
);
946 if (strlen(c
) > (size_t)width
) {
949 for (i
= 0; i
< indent
; i
++)
959 static void info_versionid(rdstringc
*text
, word
*words
) {
960 rdaddc(text
, '['); /* FIXME: configurability */
961 info_rdaddwc(text
, words
, NULL
, FALSE
);
962 rdaddsc(text
, "]\n");
965 static node
*info_node_new(char *name
)
971 n
->text
.pos
= n
->text
.size
= 0;
972 n
->up
= n
->next
= n
->prev
= n
->lastchild
= n
->listnext
= NULL
;
973 n
->name
= dupstr(name
);
974 n
->started_menu
= FALSE
;
979 static char *info_node_name(paragraph
*p
)
981 rdstringc rsc
= { 0, 0, NULL
};
982 info_rdaddwc(&rsc
, p
->kwtext ? p
->kwtext
: p
->words
, NULL
, FALSE
);
986 static void info_menu_item(rdstringc
*text
, node
*n
, paragraph
*p
)
989 * FIXME: Depending on how we're doing node names in this info
990 * file, we might want to do
992 * * Node name:: Chapter title
996 * * Chapter number: Node name.
1000 rdaddsc(text
, "* ");
1001 rdaddsc(text
, n
->name
);
1002 rdaddsc(text
, "::");
1005 info_rdaddwc(text
, p
->words
, NULL
, FALSE
);