[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Sat Aug 6 12:22:01 EDT 2005)
From: |
Karl Berry |
Subject: |
texinfo update (Sat Aug 6 12:22:01 EDT 2005) |
Date: |
Sat, 06 Aug 2005 12:22:07 -0400 |
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.525
retrieving revision 1.526
diff -c -r1.525 -r1.526
*** ChangeLog 5 Aug 2005 09:25:44 -0000 1.525
--- ChangeLog 6 Aug 2005 16:04:37 -0000 1.526
***************
*** 1,3 ****
--- 1,18 ----
+ 2005-08-06 Per Bothner <address@hidden>
+
+ * makeinfo/index.c (cm_printindex): Don't xml_insert_indexentry if
+ docbook, since we'll let the doxbook processor generate the index.
+ * makeinfo/xml.h (xml_sort_index, xml_insert_indexentry): Remove.
+ * makeinfo/xml.c (xml_begin_index): Don't actually do any formatting.
+ (xml_end_index): Don't do anything except close <index>.
+ (xml_insert_indexentry): Remove no-longer-used function.
+
+ * makeinfo/xml.c (element docbook_element_list): The docbook <index>
+ element should *not* be contained_in_para.
+
+ * makeinfo/xml.c (xml_begin_document): Add id attribute to top-level
+ book if emitting docbook.
+
2005-08-05 Stepan Kasal <address@hidden>
* configure.ac: (auto)update.
Index: makeinfo/index.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/index.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -c -r1.18 -r1.19
*** makeinfo/index.c 15 May 2005 00:00:07 -0000 1.18
--- makeinfo/index.c 6 Aug 2005 16:04:37 -0000 1.19
***************
*** 1,5 ****
/* index.c -- indexing for Texinfo.
! $Id: index.c,v 1.18 2005/05/15 00:00:07 karl Exp $
Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation,
Inc.
--- 1,5 ----
/* index.c -- indexing for Texinfo.
! $Id: index.c,v 1.19 2005/08/06 16:04:37 karl Exp $
Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation,
Inc.
***************
*** 869,879 ****
}
else if (xml && docbook)
{
! /* In the DocBook case, the expanded index entry is not
! good for us, since it was expanded for non-DocBook mode
! inside sort_index. So we send the original entry text
! to be used with execute_string. */
! xml_insert_indexentry (index->entry_text, index_node);
}
else
{
--- 869,875 ----
}
else if (xml && docbook)
{
! /* Let DocBook processor generate the index. */
}
else
{
Index: makeinfo/xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -c -r1.60 -r1.61
*** makeinfo/xml.c 15 May 2005 00:00:08 -0000 1.60
--- makeinfo/xml.c 6 Aug 2005 16:04:37 -0000 1.61
***************
*** 1,5 ****
/* xml.c -- xml output.
! $Id: xml.c,v 1.60 2005/05/15 00:00:08 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,5 ----
/* xml.c -- xml output.
! $Id: xml.c,v 1.61 2005/08/06 16:04:37 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 32,40 ****
#include <assert.h>
- /* Options */
- int xml_index_divisions = 1;
-
#if !__OPTIMIZE__
/* To make enum names available to debugger. */
static enum xml_element xml_element_dummy;
--- 32,37 ----
***************
*** 415,421 ****
{ "example", 1, 1, 0 },
{ "sidebar", 1, 0, 0 },
! { "index", 0, 1, 0 }, /* PRINTINDEX */
{ "", 0, 1, 0 }, /* LISTOFFLOATS */
{ "", 0, 1, 0 }, /* ANCHOR */
--- 412,418 ----
{ "example", 1, 1, 0 },
{ "sidebar", 1, 0, 0 },
! { "index", 0, 0, 0 }, /* PRINTINDEX */
{ "", 0, 1, 0 }, /* LISTOFFLOATS */
{ "", 0, 1, 0 }, /* ANCHOR */
***************
*** 536,541 ****
--- 533,540 ----
int xml_no_para = 0;
char *xml_node_id = NULL;
+
+ /* Currently sorting the index. */
int xml_sort_index = 0;
int xml_in_xref_token = 0;
***************
*** 656,662 ****
if (language_code != last_language_code)
{
if (docbook)
! xml_insert_element_with_attribute (TEXINFO, START, "lang=\"%s\"",
language_table[language_code].abbrev);
else
xml_insert_element_with_attribute (TEXINFO, START, "xml:lang=\"%s\"",
language_table[language_code].abbrev);
}
--- 655,663 ----
if (language_code != last_language_code)
{
if (docbook)
! /* The toplevel <book> element needs an id attribute if you want to use
! the chunk.xml feature of the DocBook-XSL stylesheets. */
! xml_insert_element_with_attribute (TEXINFO, START, "id=\"book-root\"
lang=\"%s\"", language_table[language_code].abbrev);
else
xml_insert_element_with_attribute (TEXINFO, START, "xml:lang=\"%s\"",
language_table[language_code].abbrev);
}
***************
*** 810,816 ****
/* Look at the replace_elements table to see if we have to change the
element */
if (xml_sort_index)
return;
! if (docbook)
{
replace_element *element_list = replace_elements;
while (element_list->element_to_replace >= 0)
--- 811,817 ----
/* Look at the replace_elements table to see if we have to change the
element */
if (xml_sort_index)
return;
! if (docbook && element_stack_index > 0)
{
replace_element *element_list = replace_elements;
while (element_list->element_to_replace >= 0)
***************
*** 1798,1891 ****
void
xml_begin_index (void)
{
! typedef struct xml_index_title {
! struct xml_index_title *next;
! char *title;
! } XML_INDEX_TITLE;
!
! static XML_INDEX_TITLE *xml_index_titles = NULL;
!
! if (!handling_delayed_writes)
! { /* We assume that we just opened a section, and so that the last output
is
! <SECTION ID="node-name"><TITLE>Title</TITLE>
! where SECTION can be CHAPTER, ... */
!
! XML_INDEX_TITLE *new = xmalloc (sizeof (XML_INDEX_TITLE));
! xml_section *temp = last_section;
!
! int l = output_paragraph_offset-xml_last_section_output_position;
! char *tmp = xmalloc (l+1);
! char *p = tmp;
! strncpy (tmp, (char *) output_paragraph, l);
!
! /* We remove <SECTION */
! tmp[l] = '\0';
! while (*p != '<')
! p++;
! while (*p != ' ')
! p++;
! /* ... and its label attribute. */
! if (strncmp (p, " label=", 7) == 0)
! {
! p++;
! while (*p != ' ')
! p++;
! }
!
! output_paragraph_offset = xml_last_section_output_position;
! xml_last_section_output_position = 0;
!
! xml_pop_current_element (); /* remove section element from elements
stack */
!
! if (last_section)
! last_section = last_section->prev; /* remove section from sections
stack */
! if (temp)
! {
! free (temp->name);
! free (temp);
! }
!
! new->title = xstrdup (p);
! new->next = xml_index_titles;
! xml_index_titles = new;
! }
! else
{
- static int xml_index_titles_reversed = 0;
-
- if (!xml_index_titles_reversed)
- {
- xml_index_titles = (XML_INDEX_TITLE *) reverse_list
- ((GENERIC_LIST *) xml_index_titles);
- xml_index_titles_reversed = 1;
- }
-
/* We put <INDEX> */
xml_insert_element (PRINTINDEX, START);
- if (xml_index_titles)
- {
- /* Remove the final > */
- output_paragraph_offset--;
- /* and put ID="node-name"><TITLE>Title</TITLE> */
- insert_string (xml_index_titles->title);
- free (xml_index_titles->title);
- xml_index_titles = xml_index_titles->next;
- }
-
- if (xml_index_divisions)
- {
- xml_insert_element (INDEXDIV, START);
- indexdivempty = 1;
- }
}
}
void
xml_end_index (void)
{
- xml_close_indexentry ();
- if (xml_index_divisions)
- xml_insert_element (INDEXDIV, END);
xml_insert_element (PRINTINDEX, END);
}
--- 1799,1814 ----
void
xml_begin_index (void)
{
! if (handling_delayed_writes)
{
/* We put <INDEX> */
xml_insert_element (PRINTINDEX, START);
}
}
void
xml_end_index (void)
{
xml_insert_element (PRINTINDEX, END);
}
***************
*** 1911,1985 ****
insert (toupper (c));
xml_insert_element (TITLE, END);
}
- }
-
- void
- xml_insert_indexentry (char *entry, char *node)
- {
- char *primary = NULL, *secondary;
- if (xml_index_divisions)
- xml_index_divide (entry);
-
- indexdivempty = 0;
- if (strstr (entry+1, INDEX_SEP))
- {
- primary = xmalloc (strlen (entry) + 1);
- strcpy (primary, entry);
- secondary = strstr (primary+1, INDEX_SEP);
- *secondary = '\0';
- secondary += strlen (INDEX_SEP);
-
- if (in_secondary && strcmp (primary, index_primary) == 0)
- {
- xml_insert_element (SECONDARYIE, END);
- xml_insert_element (SECONDARYIE, START);
- execute_string ("%s", secondary);
- }
- else
- {
- xml_close_indexentry ();
- xml_insert_element (INDEXENTRY, START);
- in_indexentry = 1;
- xml_insert_element (PRIMARYIE, START);
- execute_string ("%s", primary);
- xml_insert_element (PRIMARYIE, END);
- xml_insert_element (SECONDARYIE, START);
- execute_string ("%s", secondary);
- in_secondary = 1;
- }
- }
- else
- {
- xml_close_indexentry ();
- xml_insert_element (INDEXENTRY, START);
- in_indexentry = 1;
- xml_insert_element (PRIMARYIE, START);
- execute_string ("%s", entry);
- }
- add_word (", ");
-
- /* Don't link to @unnumbered sections directly.
- We are disabling warnings temporarily, otherwise these xrefs
- will cause bogus warnings about missing punctuation. */
- {
- extern int print_warnings;
- int save_print_warnings = print_warnings;
- print_warnings = 0;
- execute_string ("%cxref{%s}", COMMAND_PREFIX, xstrdup (node));
- print_warnings = save_print_warnings;
- }
-
- if (primary)
- {
- strcpy (index_primary, primary);
- /* xml_insert_element (SECONDARYIE, END);*/
- /* *(secondary-1) = ',';*/ /* necessary ? */
- free (primary);
- }
- else
- xml_insert_element (PRIMARYIE, END);
-
- /* xml_insert_element (INDEXENTRY, END); */
}
void
--- 1834,1839 ----
Index: makeinfo/xml.h
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -c -r1.26 -r1.27
*** makeinfo/xml.h 15 May 2005 00:00:08 -0000 1.26
--- makeinfo/xml.h 6 Aug 2005 16:04:37 -0000 1.27
***************
*** 1,5 ****
/* xml.h -- xml output declarations.
! $Id: xml.h,v 1.26 2005/05/15 00:00:08 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,5 ----
/* xml.h -- xml output declarations.
! $Id: xml.h,v 1.27 2005/08/06 16:04:37 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 22,33 ****
#ifndef XML_H
#define XML_H
! /* Options. */
!
! /* Separate index entries into divisions for each letters. */
! extern int xml_index_divisions;
extern int xml_sort_index;
extern int xml_no_indent;
extern int xml_node_open;
--- 22,32 ----
#ifndef XML_H
#define XML_H
! /* Currently sorting the index. */
extern int xml_sort_index;
+ /* Options. */
+
extern int xml_no_indent;
extern int xml_node_open;
***************
*** 110,116 ****
xml_insert_entity (char *entity_name),
xml_insert_footnote (char *note),
xml_insert_quotation (char *type, int arg),
- xml_insert_indexentry (char *entry, char *node),
xml_insert_indexterm (char *indexterm, char *index),
xml_insert_docbook_image (char *name_arg),
xml_synindex (char *from, char *to),
--- 109,114 ----
P ChangeLog
P makeinfo/index.c
P makeinfo/xml.c
P makeinfo/xml.h
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Sat Aug 6 12:22:01 EDT 2005),
Karl Berry <=