From 1e2af4f2c82dd1396d247a2b5fe032b13c51189a Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 2 May 2003 00:49:43 +0000 Subject: Removed files not present in v4.5 import. --- contrib/texinfo/makeinfo/docbook.c | 492 ------------------------------------- contrib/texinfo/makeinfo/docbook.h | 81 ------ 2 files changed, 573 deletions(-) delete mode 100644 contrib/texinfo/makeinfo/docbook.c delete mode 100644 contrib/texinfo/makeinfo/docbook.h (limited to 'contrib') diff --git a/contrib/texinfo/makeinfo/docbook.c b/contrib/texinfo/makeinfo/docbook.c deleted file mode 100644 index c9b05c2..0000000 --- a/contrib/texinfo/makeinfo/docbook.c +++ /dev/null @@ -1,492 +0,0 @@ -/* docbook.c -- docbook output. - $Id: docbook.c,v 1.3 2001/12/31 16:52:17 karl Exp $ - - Copyright (C) 2001 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#include "system.h" -#include "cmds.h" -#include "docbook.h" -#include "insertion.h" -#include "lang.h" -#include "makeinfo.h" -#include "macro.h" -#include "sectioning.h" - -int docbook_version_inserted = 0; -int docbook_first_chapter_found = 0; -int docbook_must_insert_node_anchor = 0; -int docbook_begin_book_p = 0; -int docbook_no_new_paragraph = 0; - -static int section_level = -1; -static int in_docbook_paragraph = 0; -static int in_list = 0; - -static int in_table = 0; -static int in_term = 0; -static int in_entry = 0; -static int in_varlistitem = 0; - -static int in_example = 0; - -void -docbook_begin_section (level, cmd) - int level; - char *cmd; -{ - int i, old_no_indent; - char *temp, *tem; - static char *last_chap = NULL; - - close_paragraph (); - docbook_first_chapter_found = 1; - filling_enabled = indented_fill = 0; - old_no_indent = no_indent; - no_indent = 1; - - if (!docbook_begin_book_p) - docbook_begin_book (); - - if (macro_expansion_output_stream && !executing_string) - append_to_expansion_output (input_text_offset + 1); - - get_rest_of_line (0, &temp); - - if (in_docbook_paragraph) - { - insert_string ("\n\n\n"); - adjust_braces_following (0, 10); - } - in_docbook_paragraph = 0; - docbook_no_new_paragraph++; - - if (level > section_level + 1) - level = section_level + 1; - - for (i = section_level; i >= level ; i--) - { - if (i == 0) - { - if (last_chap && strcmp(last_chap, "appendix") == 0) - add_word ("\n\n"); - else - add_word ("\n\n"); - } - else - add_word_args ("\n\n", i); - } - - section_level = level; - - if (level == 0) - { - if (strcmp(cmd, "appendix") == 0) - add_word ("\n"); - add_word (""); - - if (macro_expansion_output_stream && !executing_string) - { - char *temp1 = xmalloc (2 + strlen (temp)); - sprintf (temp1, "%s", temp); - remember_itext (input_text, input_text_offset); - me_execute_string (temp1); - free (temp1); - } - else - execute_string ("%s", temp); - - free (temp); - - add_word ("\n"); - - close_paragraph (); - filling_enabled = 1; - no_indent = old_no_indent; - docbook_no_new_paragraph--; - insert_string("\n"); - in_docbook_paragraph = 1; -} - -void -docbook_begin_paragraph () -{ - if (!docbook_first_chapter_found) - return; - - if (in_example) - return; - - if (in_table && !in_term) - { - if (!in_varlistitem) - insert_string ("\n\n"); - else - insert_string ("\n\n\n\n"); - in_varlistitem = 1; - - return; - } - if (in_list) - return; - if (in_docbook_paragraph) - { - insert_string ("\n\n\n"); - adjust_braces_following (0, 10); - } - -#if 0 - if (docbook_must_insert_node_anchor) - { - char *tem; - insert_string ("\n"); - docbook_must_insert_node_anchor = 0; - } - else -#endif - { - insert_string ("\n"); - adjust_braces_following (0, 7); - } - in_docbook_paragraph = 1; -} - -void -docbook_begin_book () -{ - if (!docbook_begin_book_p) - docbook_begin_book_p = 1; - else - return; - - ++docbook_no_new_paragraph; - add_word_args ("\n\ -\n%s\n", title); - --docbook_no_new_paragraph; -} - -void -docbook_end_book () -{ - int i; - if (in_docbook_paragraph) - { - insert_string ("\n\n\n"); - } - - for (i = section_level; i >= 0 ; i--) - { - if (i == 0) - add_word ("\n"); - else - add_word_args ("\n", i); - } - - add_word ("\n"); -} - -void -docbook_insert_tag (start_or_end, tag) - int start_or_end; - char *tag; -{ - if (!paragraph_is_open && start_or_end == START) - docbook_begin_paragraph (); - - add_char ('<'); - if (start_or_end == START) - add_word (tag); - else - { - add_char ('/'); - for (; *tag && *tag != ' '; tag++) - add_char(*tag); - } - add_meta_char ('>'); -} - -void -docbook_xref1 (node_name) - char *node_name; -{ - char *tem; - add_word (""); -} - -void -docbook_xref2 (node_name, ref_name) - char *node_name; - char *ref_name; -{ - char *tem; - add_word (""); -} - -int -docbook_quote (character) - int character; -{ - switch (language_code) - { - case fr: - if (character == '`') - { - add_word ("« "); - return ';'; - } - else - { - add_word (" "); - return '»'; - } - break; - - default: - if (character == '`') - { - add_word ("&ldquo"); - return ';'; - } - else - { - add_word ("&rdquo"); - return ';'; - } - break; - } -} - -#define IS_BLANK(c) (c == ' ' || c == '\t' || c == '\n') - -int -docbook_is_punctuation (character, next) - int character; - int next; -{ - return ( (character == ';' - || character == ':' - || character == '?' - || character == '!') - && IS_BLANK (next)); -} - -void -docbook_punctuation (character) - int character; -{ - switch (language_code) - { - case fr: - while (output_paragraph[output_paragraph_offset-1] == ' ') - output_paragraph_offset--; - add_word (" "); - break; - } -} - -static int in_item = 0; - -void -docbook_begin_itemize () -{ - if (in_docbook_paragraph) - insert_string ("\n\n"); - - in_docbook_paragraph = 0; - insert_string ("\n\n"); - in_item = 0; - in_list = 1; -} - -void -docbook_end_itemize () -{ - if (in_item) - { - insert_string ("\n\n"); - in_item = 0; - } - insert_string ("\n\n\n\n"); - in_docbook_paragraph = 1; - in_list = 0; -} - -void -docbook_begin_enumerate () -{ - if (in_docbook_paragraph) - insert_string ("\n\n"); - in_docbook_paragraph = 0; - insert_string ("\n\n"); - in_item = 0; - in_list = 1; -} - -void -docbook_end_enumerate () -{ - if (in_item) - { - insert_string ("\n\n"); - in_item = 0; - } - insert_string ("\n\n\n\n"); - in_docbook_paragraph = 1; - in_list = 0; -} - -void -docbook_begin_table () -{ -#if 0 - if (in_docbook_paragraph) - insert_string ("\n\n\n"); - in_docbook_paragraph = 0; -#endif - - add_word ("\n\n"); - in_table ++; - in_varlistitem = 0; - in_entry = 0; -} - -void -docbook_end_table () -{ - if (!in_varlistitem) - docbook_begin_paragraph (); - insert_string ("\n\n\n\n\n"); -#if 0 - if (in_table == 1) - { - insert_string ("\n\n\n"); - in_docbook_paragraph = 0; - } - else - { - insert_string ("\n\n\n"); - in_docbook_paragraph = 1; - } -#endif - in_table --; - in_list = 0; -} - -void -docbook_add_item () -{ - if (in_item) - insert_string ("\n\n"); - insert_string ("\n\n"); - in_docbook_paragraph = 1; - in_item = 1; -} - -void -docbook_add_table_item () -{ - if (in_varlistitem) - { - insert_string ("\n\n\n\n"); - in_entry = 0; - in_varlistitem = 0; - } - if (!in_entry) - { - insert_string ("\n"); - in_entry = 1; - } - insert_string (""); - in_list = 1; - in_term = 1; -} - -void -docbook_close_table_item () -{ - insert_string (""); - in_list = 1; - in_term = 0; -} - -void -docbook_add_anchor (anchor) - char *anchor; -{ - add_word (""); -} - -void -docbook_footnote (note) - char *note; -{ - /* add_word_args ("\n%s\n\n", note); */ - add_word ("\n"); - execute_string("%s", note); - add_word("\n\n"); -} - -void -docbook_begin_index () -{ - add_word ("\n"); -} - -void -docbook_begin_example () -{ - add_word ("\n\n\n"); - in_example = 1; -} - -void -docbook_end_example () -{ - in_example = 0; - add_word ("\n\n"); -} diff --git a/contrib/texinfo/makeinfo/docbook.h b/contrib/texinfo/makeinfo/docbook.h deleted file mode 100644 index 6f0ca49..0000000 --- a/contrib/texinfo/makeinfo/docbook.h +++ /dev/null @@ -1,81 +0,0 @@ -/* docbook.h -- docbook declarations. - $Id: docbook.h,v 1.2 2001/12/31 16:51:32 karl Exp $ - - Copyright (C) 2001 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#ifndef DOCBOOK_H -#define DOCBOOK_H - -#define DB_B "emphasis role=\"bold\"" -#define DB_CITE "citetitle" -#define DB_CODE "literal" -#define DB_COMMAND "command" -#define DB_DFN "firstterm" -#define DB_EMPH "emphasis" -#define DB_ENV "envar" -#define DB_FILE "filename" -#define DB_FUNCTION "function" -#define DB_I "emphasis" -#define DB_KBD "userinput" -#define DB_KEY "keycap" -#define DB_OPTION "option" -#define DB_STRONG "emphasis role=\"bold\"" -#define DB_TT "literal" -#define DB_URL "systemitem role=\"sitename\"" -#define DB_VAR "replaceable" - -extern int docbook_version_inserted; -extern int docbook_begin_book_p; -extern int docbook_first_chapter_found; -extern int docbook_must_insert_node_anchor; -extern int docbook_no_new_paragraph; - -void docbook_begin_section (); -void docbook_begin_paragraph (); -void docbook_begin_book (); -void docbook_end_book (); - -void docbook_insert_tag (); - -void docbook_xref1 (); -void docbook_xref2 (); - -int docbook_quote (); - -int docbook_is_punctuation (); -void docbook_punctuation (); - -void docbook_begin_itemize (); -void docbook_end_itemize (); -void docbook_begin_enumerate (); -void docbook_end_enumerate (); - -void docbook_begin_table (); -void docbook_end_table (); -void docbook_add_item (); -void docbook_add_table_item (); -void docbook_close_table_item (); -void docbook_add_anchor (); - -void docbook_footnote (); - -void docbook_begin_index (); - -void docbook_begin_example (); -void docbook_end_example (); - -#endif /* DOCBOOK_H */ -- cgit v1.1