[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/makeinfo insertion.c,1.23,1.24 xml.c,1.28,1.29
From: |
dirt |
Subject: |
texinfo/makeinfo insertion.c,1.23,1.24 xml.c,1.28,1.29 |
Date: |
Tue, 17 Feb 2004 14:44:22 +0100 |
Update of /cvsroot/texinfo/texinfo/makeinfo
In directory sheep:/tmp/cvs-serv10376/makeinfo
Modified Files:
insertion.c xml.c
Log Message:
2004-02-17 Alper Ersoy <address@hidden>
* makeinfo/insertion.c (begin_insertion): for XML and Docbook, do not
expand @copying text. Instead of calling @anchor, use <float
name="floatlabel"> for XML.
(cm_copying): removed ugly copying_text manipulation for Docbook.
Warn if there is no @copying before @insertcopying.
* makeinfo/xml.c: made floats contain para.
(xml_start_para): check if current element can contain para.
(xml_add_char): removed @copying checks.
Index: insertion.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/insertion.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** insertion.c 17 Feb 2004 00:46:42 -0000 1.23
--- insertion.c 17 Feb 2004 13:44:19 -0000 1.24
***************
*** 510,514 ****
char *text;
int start_of_end;
- int save_paragraph_indentation = inhibit_paragraph_indentation;
int save_line_number;
int real_line_number;
--- 510,513 ----
***************
*** 521,533 ****
line_number = save_line_number;
! /* include all the output-format-specific markup. */
! if (docbook)
! inhibit_paragraph_indentation = 1;
! copying_text = full_expansion (text, 0);
! canon_white (copying_text);
! free (text);
! if (docbook)
! inhibit_paragraph_indentation = save_paragraph_indentation;
input_text_offset = start_of_end; /* go back to the @end to match */
--- 520,532 ----
line_number = save_line_number;
! if (!xml)
! {
! copying_text = full_expansion (text, 0);
! free (text);
! }
! else
! copying_text = text;
! canon_white (copying_text);
input_text_offset = start_of_end; /* go back to the @end to match */
***************
*** 553,558 ****
--- 552,559 ----
xml_insert_element (LEGALNOTICE, START);
}
+
if (!html && !no_headers)
cm_insert_copying ();
+
if (docbook)
xml_insert_element (LEGALNOTICE, END);
***************
*** 835,852 ****
if (html)
add_html_block_elt ("<div class=\"float\">\n");
else if (xml)
{
! xml_insert_element (FLOAT, START);
! if (!docbook)
! {
! xml_insert_element (FLOATTYPE, START);
! execute_string ("%s", current_float_type ());
! xml_insert_element (FLOATTYPE, END);
! xml_insert_element (FLOATPOS, START);
! execute_string ("%s", current_float_position ());
! xml_insert_element (FLOATPOS, END);
! }
}
else
--- 836,853 ----
if (html)
add_html_block_elt ("<div class=\"float\">\n");
+ else if (docbook)
+ xml_insert_element (FLOAT, START);
else if (xml)
{
! xml_insert_element_with_attribute (FLOAT, START,
! "name=\"%s\"", current_float_id ());
! xml_insert_element (FLOATTYPE, START);
! execute_string ("%s", current_float_type ());
! xml_insert_element (FLOATTYPE, END);
! xml_insert_element (FLOATPOS, START);
! execute_string ("%s", current_float_position ());
! xml_insert_element (FLOATPOS, END);
}
else
***************
*** 857,862 ****
}
! /* Anchor now. */
! if (strlen (current_float_id ()) > 0)
execute_string ("@anchor{%s}", current_float_id ());
--- 858,864 ----
}
! /* Anchor now. Note that XML documents get their
! anchors with <float name="anchor"> tag. */
! if ((!xml || docbook) && strlen (current_float_id ()) > 0)
execute_string ("@anchor{%s}", current_float_id ());
***************
*** 1443,1490 ****
cm_insert_copying (void)
{
! if (copying_text)
{
! if (xml)
! xml_end_para ();
!
! if (docbook && xml_in_bookinfo)
! { /* Remove blockquote if we are inside bookinfo, because we have
! legalnotice there, so quotation is unnecessary. */
! char *temp;
! int start_pos = 0;
! int end_pos = 0;
! int len = strlen (copying_text);
!
! /* Go to the start of first tag. */
! while (copying_text[start_pos] != '<')
! start_pos++;
! start_pos++;
! /* Skip the first tag. */
! while (copying_text[start_pos] != '<')
! start_pos++;
! /* Find the start of last tag. */
! while (copying_text[len-end_pos] != '<')
! end_pos++;
!
! temp = xmalloc (len - start_pos - end_pos);
! strncpy (temp, copying_text + start_pos, len - start_pos - end_pos);
! temp[len - start_pos - end_pos] = '\0';
!
! /* insert_string rather than add_word because we've already
! done full expansion on copying_text when we saved it. */
! insert_string (temp);
! free (temp);
! }
! else
insert_string (copying_text);
-
- if (!xml)
insert_string ("\n\n");
!
! /* Update output_position so that the node positions in the tag
! tables will take account of the copying text. */
! flush_output ();
! }
}
--- 1445,1464 ----
cm_insert_copying (void)
{
! if (!copying_text)
{
! warning ("@copying not used before %s", command);
! return;
! }
! if (xml)
! execute_string ("%s", copying_text);
! else
! {
insert_string (copying_text);
insert_string ("\n\n");
! /* Update output_position so that the node positions in the tag
! tables will take account of the copying text. */
! flush_output ();
! }
}
Index: xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** xml.c 17 Feb 2004 00:45:37 -0000 1.28
--- xml.c 17 Feb 2004 13:44:19 -0000 1.29
***************
*** 177,181 ****
{ "group", 0, 0, 0 },
! { "float", 0, 0, 0 },
{ "floattype", 0, 0, 0 },
{ "floatpos", 0, 0, 0 },
--- 177,181 ----
{ "group", 0, 0, 0 },
! { "float", 1, 0, 0 },
{ "floattype", 0, 0, 0 },
{ "floatpos", 0, 0, 0 },
***************
*** 382,386 ****
{ "", 0, 0, 0 }, /* GROUP */
! { "", 0, 0, 0 }, /* FLOAT */
{ "", 0, 0, 0 }, /* FLOATTYPE */
{ "", 0, 0, 0 }, /* FLOATPOS */
--- 382,386 ----
{ "", 0, 0, 0 }, /* GROUP */
! { "", 1, 0, 0 }, /* FLOAT */
{ "", 0, 0, 0 }, /* FLOATTYPE */
{ "", 0, 0, 0 }, /* FLOATPOS */
***************
*** 694,698 ****
xml_start_para (void)
{
! if (xml_in_para || xml_in_footnote)
return;
--- 694,699 ----
xml_start_para (void)
{
! if (xml_in_para || xml_in_footnote
! || !xml_element_list[xml_current_element()].contains_para)
return;
***************
*** 1172,1176 ****
static int xml_last_character;
- static int xml_in_legalnotice = 0;
void
--- 1173,1176 ----
***************
*** 1189,1193 ****
}
! if ( !first_section_opened && !xml_in_abstract && !xml_in_book_title
&& !xml_no_para && character != '\r' && character != '\n'
&& character != ' ' && !is_in_insertion_of_type (copying))
--- 1189,1193 ----
}
! if (!first_section_opened && !xml_in_abstract && !xml_in_book_title
&& !xml_no_para && character != '\r' && character != '\n'
&& character != ' ' && !is_in_insertion_of_type (copying))
***************
*** 1200,1212 ****
xml_insert_element (ABSTRACT, START);
xml_in_abstract = 1;
- }
-
- if (!xml_in_legalnotice && is_in_insertion_of_type (copying))
- {
- xml_in_legalnotice = 1;
- if (docbook)
- xml_insert_element (QUOTATION, START);
- else
- xml_insert_element (COPYING, START);
}
--- 1200,1203 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/makeinfo insertion.c,1.23,1.24 xml.c,1.28,1.29,
dirt <=
- Prev by Date:
texinfo config.guess,1.5,1.6 config.sub,1.4,1.5
- Next by Date:
texinfo ChangeLog,1.195,1.196
- Previous by thread:
texinfo config.guess,1.5,1.6 config.sub,1.4,1.5
- Next by thread:
texinfo ChangeLog,1.195,1.196
- Index(es):