summaryrefslogtreecommitdiffstats
path: root/contrib/texinfo/makeinfo/defun.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/texinfo/makeinfo/defun.c')
-rw-r--r--contrib/texinfo/makeinfo/defun.c61
1 files changed, 38 insertions, 23 deletions
diff --git a/contrib/texinfo/makeinfo/defun.c b/contrib/texinfo/makeinfo/defun.c
index 49dbd43..ce56059 100644
--- a/contrib/texinfo/makeinfo/defun.c
+++ b/contrib/texinfo/makeinfo/defun.c
@@ -1,7 +1,7 @@
/* defun.c -- @defun and friends.
- $Id: defun.c,v 1.19 2002/03/18 16:54:54 karl Exp $
+ $Id: defun.c,v 1.3 2002/11/11 00:57:49 feloy Exp $
- Copyright (C) 1998, 99, 2000, 01, 02 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +19,11 @@
#include "system.h"
#include "defun.h"
-#include "docbook.h"
+#include "xml.h"
#include "insertion.h"
#include "makeinfo.h"
+#include "cmds.h"
+#include "html.h"
#define DEFUN_SELF_DELIMITING(c) \
@@ -239,7 +241,13 @@ process_defun_args (defun_args, auto_var_p)
}
if (DEFUN_SELF_DELIMITING (defun_arg[0]))
- add_char (defun_arg[0]);
+ {
+ /* Within @deffn and friends, texinfo.tex makes parentheses
+ sans serif and brackets bold. We use roman instead. */
+ insert_html_tag (START, "");
+ add_char (defun_arg[0]);
+ insert_html_tag (END, "");
+ }
else if (defun_arg[0] == '&')
if (html)
{
@@ -446,8 +454,6 @@ defun_internal (type, x_p)
/* Start the definition on new paragraph. */
if (html)
add_word ("<p>\n");
- if (docbook)
- docbook_begin_paragraph ();
}
if (!html && !docbook)
@@ -506,30 +512,34 @@ defun_internal (type, x_p)
case defvr:
case deftp:
/* <i> is for the following function arguments. */
- add_word ("<b>");
+ insert_html_tag (START, "b");
execute_string ("%s", defined_name);
- add_word ("</b><i>");
+ insert_html_tag (END, "b");
+ insert_html_tag (START, "i");
break;
case deftypefn:
case deftypevr:
execute_string ("%s ", type_name);
- add_word ("<b>");
+ insert_html_tag (START, "b");
execute_string ("%s", defined_name);
- add_word ("</b><i>");
+ insert_html_tag (END, "b");
+ insert_html_tag (START, "i");
break;
case defcv:
case defop:
- add_word ("<b>");
+ insert_html_tag (START, "b");
execute_string ("%s", defined_name);
- add_word ("</b><i>");
+ insert_html_tag (END, "b");
+ insert_html_tag (START, "i");
break;
case deftypemethod:
case deftypeop:
case deftypeivar:
execute_string ("%s ", type_name2);
- add_word ("<b>");
+ insert_html_tag (START, "b");
execute_string ("%s", defined_name);
- add_word ("</b><i>");
+ insert_html_tag (END, "b");
+ insert_html_tag (START, "i");
break;
}
} /* if (html)... */
@@ -543,19 +553,24 @@ defun_internal (type, x_p)
case deftp:
case defcv:
case defop:
- add_word_args ("<%s>%s</%s>", DB_FUNCTION, defined_name,
- DB_FUNCTION);
+ xml_insert_element (FUNCTION, START);
+ execute_string ("%s", defined_name);
+ xml_insert_element (FUNCTION, END);
break;
case deftypefn:
case deftypevr:
- add_word_args ("%s <%s>%s</%s>", type_name, DB_FUNCTION,
- defined_name, DB_FUNCTION);
+ execute_string ("%s", type_name);
+ xml_insert_element (FUNCTION, START);
+ execute_string ("%s", defined_name);
+ xml_insert_element (FUNCTION, END);
break;
case deftypemethod:
case deftypeop:
case deftypeivar:
- add_word_args ("%s <%s>%s</%s>", type_name2, DB_FUNCTION,
- defined_name, DB_FUNCTION);
+ execute_string ("%s", type_name2);
+ xml_insert_element (FUNCTION, START);
+ execute_string ("%s", defined_name);
+ xml_insert_element (FUNCTION, END);
break;
}
@@ -602,7 +617,7 @@ defun_internal (type, x_p)
case deftp:
case deftypefn:
case deftypevr:
- add_word ("</i>"); /* close italic area for arguments */
+ insert_html_tag (END, "i"); /* close italic area for arguments */
/* put the rest into the second column */
add_word ("</td>\n");
add_html_elt ("<td align=\"right\">");
@@ -618,14 +633,14 @@ defun_internal (type, x_p)
case defop:
case deftypemethod:
case deftypeop:
- add_word ("</i>");
+ insert_html_tag (END, "i");
add_word ("</td>\n");
add_html_elt ("<td align=\"right\">");
execute_string ("%s %s %s", category, _("on"), type_name);
break;
case deftypeivar:
- add_word ("</i>");
+ insert_html_tag (END, "i");
add_word ("</td>\n");
add_html_elt ("<td align=\"right\">");
execute_string ("%s %s %s", category, _("of"), type_name);
OpenPOWER on IntegriCloud