237
260
if (DEFUN_SELF_DELIMITING (defun_arg[0]))
238
add_char (defun_arg[0]);
239
else if (defun_arg[0] == '&')
242
defun_arg = escape_string (xstrdup (defun_arg));
243
add_word (defun_arg);
247
add_word (defun_arg);
248
else if (defun_arg[0] == COMMAND_PREFIX)
262
/* Within @deffn and friends, texinfo.tex makes parentheses
263
sans serif and brackets bold. We use roman instead. */
265
insert_html_tag (START, "");
267
add_char (defun_arg[0]);
270
insert_html_tag (END, "");
272
/* else if (defun_arg[0] == '&' || defun_arg[0] == COMMAND_PREFIX) */
273
/* execute_string ("%s", defun_arg); */
274
/* else if (auto_var_p) */
275
/* execute_string ("%s", defun_arg); */
249
277
execute_string ("%s", defun_arg);
253
defun_arg = escape_string (xstrdup (defun_arg));
254
add_word (defun_arg);
258
add_word (defun_arg);
260
add_word (defun_arg);
265
next_nonwhite_defun_arg (arg_pointer)
282
next_nonwhite_defun_arg (char ***arg_pointer)
268
284
char **scan = (*arg_pointer);
269
285
char *arg = (*scan++);
438
484
current_indent -= default_indentation_increment;
439
485
start_paragraph ();
442
/* Start the definition on new paragraph. */
446
docbook_begin_paragraph ();
449
if (!html && !docbook)
450
488
switch (base_type)
455
execute_string (" -- %s: %s", category, defined_name);
493
execute_string (" --- %s: %s", category, defined_name);
459
execute_string (" -- %s: %s %s", category, type_name, defined_name);
497
execute_string (" --- %s: %s %s", category, type_name, defined_name);
462
execute_string (" -- %s %s %s: %s", category, _("of"), type_name,
500
execute_string (" --- %s %s %s: %s", category, _("of"), type_name,
465
504
case deftypeivar:
466
execute_string (" -- %s %s %s: %s %s", category, _("of"), type_name,
505
execute_string (" --- %s %s %s: %s %s", category, _("of"), type_name,
467
506
type_name2, defined_name);
470
execute_string (" -- %s %s %s: %s", category, _("on"), type_name,
509
execute_string (" --- %s %s %s: %s", category, _("on"), type_name,
474
execute_string (" -- %s %s %s: %s %s", category, _("on"), type_name,
513
execute_string (" --- %s %s %s: %s %s", category, _("on"), type_name,
475
514
type_name2, defined_name);
477
516
case deftypemethod:
478
execute_string (" -- %s %s %s: %s %s", category, _("on"), type_name,
517
execute_string (" --- %s %s %s: %s %s", category, _("on"), type_name,
479
518
type_name2, defined_name);
485
523
/* If this is not a @def...x version, it could only
486
524
be a normal version @def.... So start the table here. */
489
add_html_elt ("<table width=");
490
add_word ("\"100%\">\n");
493
/* If this is an @def...x there has to be an other @def... before
494
it, so this is only a new row within an existing table. With
495
two complete standalone tables the gap between them is too big. */
497
add_html_elt ("<td align=\"left\">");
504
/* <i> is for the following function arguments. */
526
insert_string ("<div class=\"defun\">\n");
528
rollback_empty_tag ("blockquote");
530
/* xx The single words (on, off) used here, should depend on
531
documentlanguage and NOT on gettext --kama. */
539
execute_string ("--- %s: ", category);
545
execute_string ("--- %s %s %s: ", category, _("of"), type_name);
551
execute_string ("--- %s %s %s: ", category, _("on"), type_name);
553
} /* switch (base_type)... */
560
/* <var> is for the following function arguments. */
561
insert_html_tag (START, "b");
506
562
execute_string ("%s", defined_name);
507
add_word ("</b><i>");
563
insert_html_tag (END, "b");
564
insert_html_tag (START, "var");
511
568
execute_string ("%s ", type_name);
569
insert_html_tag (START, "b");
513
570
execute_string ("%s", defined_name);
514
add_word ("</b><i>");
571
insert_html_tag (END, "b");
572
insert_html_tag (START, "var");
576
insert_html_tag (START, "b");
519
577
execute_string ("%s", defined_name);
520
add_word ("</b><i>");
578
insert_html_tag (END, "b");
579
insert_html_tag (START, "var");
522
583
case deftypemethod:
525
585
execute_string ("%s ", type_name2);
586
insert_html_tag (START, "b");
527
587
execute_string ("%s", defined_name);
528
add_word ("</b><i>");
542
add_word_args ("<%s>%s</%s>", DB_FUNCTION, defined_name,
547
add_word_args ("%s <%s>%s</%s>", type_name, DB_FUNCTION,
548
defined_name, DB_FUNCTION);
553
add_word_args ("%s <%s>%s</%s>", type_name2, DB_FUNCTION,
554
defined_name, DB_FUNCTION);
558
} /* if (docbook)... */
588
insert_html_tag (END, "b");
589
insert_html_tag (START, "var");
594
xml_begin_def_term (base_type, category, defined_name, type_name,
560
597
current_indent += default_indentation_increment;
587
624
current_indent -= default_indentation_increment;
588
close_single_paragraph ();
592
/* xx The single words (on, off) used here, should depend on
593
documentlanguage and NOT on gettext --kama. */
601
add_word ("</i>"); /* close italic area for arguments */
602
/* put the rest into the second column */
603
add_word ("</td>\n");
604
add_html_elt ("<td align=\"right\">");
605
execute_string ("%s", category);
609
add_word ("</td>\n");
610
add_html_elt ("<td align=\"right\">");
611
execute_string ("%s %s %s", category, _("of"), type_name);
618
add_word ("</td>\n");
619
add_html_elt ("<td align=\"right\">");
620
execute_string ("%s %s %s", category, _("on"), type_name);
625
add_word ("</td>\n");
626
add_html_elt ("<td align=\"right\">");
627
execute_string ("%s %s %s", category, _("of"), type_name);
629
} /* switch (base_type)... */
631
add_word ("</td>\n"); /* close second column */
632
add_word ("</tr>\n"); /* close row */
634
/* This is needed because I have to know if the next line is
635
normal text or another @def..x. If text follows, create a new
636
table to get the indentation for the following text.
638
This construction would fail if someone uses:
644
But we don't care. */
645
if (!looking_at ("@def"))
647
add_word ("</table>\n");
648
add_html_elt ("<table width=\"95%\" align=\"center\">");
649
add_word ("\n<tr><td>\n");
654
/* Make an entry in the appropriate index. */
659
execute_string ("@findex %s\n", defined_name);
664
execute_string ("@vindex %s\n", defined_name);
667
execute_string ("@vindex %s %s %s\n", defined_name, _("of"), type_name);
672
execute_string ("@findex %s %s %s\n", defined_name, _("on"), type_name);
675
execute_string ("@tindex %s\n", defined_name);
626
close_single_paragraph ();
628
/* Make an entry in the appropriate index. (XML and
629
Docbook already got their entries, so skip them.) */
635
execute_string ("@findex %s\n", defined_name);
641
execute_string ("@vindex %s\n", defined_name);
644
execute_string ("@vindex %s %s %s\n", defined_name, _("of"),
650
execute_string ("@findex %s %s %s\n", defined_name, _("on"),
654
execute_string ("@tindex %s\n", defined_name);
662
inhibit_paragraph_indentation = 1;
664
insert_html_tag (END, "var");
665
insert_string ("<br>\n");
666
/* Indent the definition a bit. */
667
add_html_block_elt ("<blockquote>");
669
inhibit_paragraph_indentation = 0;
670
paragraph_is_open = 0;
679
673
/* Deallocate the token list. */
692
686
If the name of the calling command ends in `x', then this is an extra
693
687
entry included in the body of an insertion of the same type. */
698
enum insertion_type type;
699
char *temp = xstrdup (command);
701
x_p = (command[strlen (command) - 1] == 'x');
692
char *base_command = xstrdup (command); /* command with any `x' removed */
693
int x_p = (command[strlen (command) - 1] == 'x');
704
temp[strlen (temp) - 1] = 0;
696
base_command[strlen (base_command) - 1] = 0;
706
type = find_type_from_name (temp);
698
type = find_type_from_name (base_command);
709
700
/* If we are adding to an already existing insertion, then make sure
710
701
that we are already in an insertion of type TYPE. */
711
if (x_p && (!insertion_level || insertion_stack->insertion != type))
713
line_error (_("Must be in `%s' insertion to use `%sx'"),
715
discard_until ("\n");
704
INSERTION_ELT *i = insertion_stack;
705
/* Skip over ifclear and ifset conditionals. */
706
while (i && (i->insertion == ifset || i->insertion == ifclear))
709
if (!i || i->insertion != type)
711
line_error (_("Must be in `@%s' environment to use `@%s'"),
712
base_command, command);
713
discard_until ("\n");
719
718
defun_internal (type, x_p);