[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Tue May 10 19:22:01 EDT 2005)
From: |
Karl Berry |
Subject: |
texinfo update (Tue May 10 19:22:01 EDT 2005) |
Date: |
Tue, 10 May 2005 19:22:09 -0400 |
Index: ChangeLog
===================================================================
RCS file: /cvsroot/texinfo/texinfo/ChangeLog,v
retrieving revision 1.499
retrieving revision 1.500
diff -c -r1.499 -r1.500
*** ChangeLog 9 May 2005 23:53:37 -0000 1.499
--- ChangeLog 10 May 2005 22:54:53 -0000 1.500
***************
*** 1,3 ****
--- 1,9 ----
+ 2005-05-10 Matthias Kilian <address@hidden>
+
+ * makeinfo/cmds.c, makeinfo/defun.c, makeinfo/insertion.c,
+ makeinfo/lang.c, makeinfo/macro.c, makeinfo/multi.c,
+ makeinfo/node.c, makeinfo/xml.c: More bounds checking.
+
2005-05-09 Andreas Vögele <address@hidden> (tiny change)
* makeinfo/multi.c (output_multitable_row): don't look past
Index: makeinfo/cmds.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/cmds.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -c -r1.58 -r1.59
*** makeinfo/cmds.c 22 Mar 2005 01:29:05 -0000 1.58
--- makeinfo/cmds.c 10 May 2005 22:54:53 -0000 1.59
***************
*** 1,5 ****
/* cmds.c -- Texinfo commands.
! $Id: cmds.c,v 1.58 2005/03/22 01:29:05 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
--- 1,5 ----
/* cmds.c -- Texinfo commands.
! $Id: cmds.c,v 1.59 2005/05/10 22:54:53 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
***************
*** 627,632 ****
--- 627,633 ----
/* Use insert for HTML, and XML when indentation is enabled.
For Docbook, use add_char. */
if (xml && xml_indentation_increment > 0
+ && output_paragraph_offset > 0
&& output_paragraph[output_paragraph_offset-1] != '\n')
insert ('\n');
***************
*** 1843,1849 ****
{
/* Erase literal character that's there, except `>', which is
part of the XML tag. */
! if (output_paragraph[output_paragraph_offset-1] != '>')
output_paragraph_offset--;
switch (input_text[input_text_offset-3])
--- 1844,1851 ----
{
/* Erase literal character that's there, except `>', which is
part of the XML tag. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] != '>')
output_paragraph_offset--;
switch (input_text[input_text_offset-3])
***************
*** 1870,1876 ****
void
cm_punct (int arg)
{
! if (xml && !docbook)
{
switch (input_text[input_text_offset-1])
{
--- 1872,1878 ----
void
cm_punct (int arg)
{
! if (xml && !docbook && input_text_offset > 0)
{
switch (input_text[input_text_offset-1])
{
Index: makeinfo/defun.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/defun.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -c -r1.12 -r1.13
*** makeinfo/defun.c 31 Mar 2005 16:56:48 -0000 1.12
--- makeinfo/defun.c 10 May 2005 22:54:53 -0000 1.13
***************
*** 1,8 ****
/* defun.c -- @defun and friends.
! $Id: defun.c,v 1.12 2005/03/31 16:56:48 karl Exp $
! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 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
--- 1,8 ----
/* defun.c -- @defun and friends.
! $Id: defun.c,v 1.13 2005/05/10 22:54:53 karl Exp $
! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
! 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
***************
*** 368,374 ****
line_continuation:
i = strlen (line) - 1;
! if (line[i] == '@' && line[i-1] != '@')
{
get_rest_of_line (0, &next_line);
new_line = (char *) xmalloc (i + strlen (next_line) + 2);
--- 368,374 ----
line_continuation:
i = strlen (line) - 1;
! if (i > 0 && line[i] == '@' && line[i-1] != '@')
{
get_rest_of_line (0, &next_line);
new_line = (char *) xmalloc (i + strlen (next_line) + 2);
***************
*** 690,695 ****
--- 690,696 ----
{
enum insertion_type type;
char *base_command = xstrdup (command); /* command with any `x' removed */
+ /* FIXME: is strlen(command) allways > 0? */
int x_p = (command[strlen (command) - 1] == 'x');
if (x_p)
Index: makeinfo/insertion.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/insertion.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -c -r1.57 -r1.58
*** makeinfo/insertion.c 31 Mar 2005 16:56:48 -0000 1.57
--- makeinfo/insertion.c 10 May 2005 22:54:53 -0000 1.58
***************
*** 1,5 ****
/* insertion.c -- insertions for Texinfo.
! $Id: insertion.c,v 1.57 2005/03/31 16:56:48 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
--- 1,5 ----
/* insertion.c -- insertions for Texinfo.
! $Id: insertion.c,v 1.58 2005/05/10 22:54:53 karl Exp $
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
Software Foundation, Inc.
***************
*** 1082,1088 ****
xml_keep_space--;
}
! if ((xml || html) && output_paragraph[output_paragraph_offset-1] ==
'\n')
output_paragraph_offset--;
break;
--- 1082,1090 ----
xml_keep_space--;
}
! if ((xml || html)
! && output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
break;
***************
*** 1361,1367 ****
{
/* Rollback previous newlines. These occur between
</para> and <example>. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (EXAMPLE, START);
--- 1363,1370 ----
{
/* Rollback previous newlines. These occur between
</para> and <example>. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (EXAMPLE, START);
***************
*** 1384,1390 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLEXAMPLE, START);
if (docbook)
--- 1387,1394 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLEXAMPLE, START);
if (docbook)
***************
*** 1403,1409 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (LISP, START);
if (docbook)
--- 1407,1414 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (LISP, START);
if (docbook)
***************
*** 1422,1428 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLLISP, START);
if (docbook)
--- 1427,1434 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLLISP, START);
if (docbook)
***************
*** 1483,1489 ****
else
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (FORMAT, START);
if (docbook)
--- 1489,1496 ----
else
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (FORMAT, START);
if (docbook)
***************
*** 1499,1505 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLFORMAT, START);
if (docbook)
--- 1506,1513 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLFORMAT, START);
if (docbook)
***************
*** 1515,1521 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (DISPLAY, START);
if (docbook)
--- 1523,1530 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (DISPLAY, START);
if (docbook)
***************
*** 1531,1537 ****
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLDISPLAY, START);
if (docbook)
--- 1540,1547 ----
if (xml)
{
/* See cm_example comments about newlines. */
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_insert_element (SMALLDISPLAY, START);
if (docbook)
Index: makeinfo/lang.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/lang.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -c -r1.14 -r1.15
*** makeinfo/lang.c 22 Nov 2004 23:57:33 -0000 1.14
--- makeinfo/lang.c 10 May 2005 22:54:53 -0000 1.15
***************
*** 1,7 ****
/* lang.c -- language-dependent support.
! $Id: lang.c,v 1.14 2004/11/22 23:57:33 karl Exp $
! Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
--- 1,7 ----
/* lang.c -- language-dependent support.
! $Id: lang.c,v 1.15 2005/05/10 22:54:53 karl Exp $
! Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
***************
*** 27,32 ****
--- 27,34 ----
#include "makeinfo.h"
#include "xml.h"
+ #include <assert.h>
+
/* Current document encoding. */
encoding_code_type document_encoding_code = no_encoding;
***************
*** 801,806 ****
--- 803,809 ----
{
int rc;
char *buffer = xmalloc (1 + strlen (html_solo) + 1);
+ assert (end > 0);
buffer[0] = output_paragraph[end - 1];
buffer[1] = 0;
strcat (buffer, html_solo);
Index: makeinfo/macro.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/macro.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -c -r1.6 -r1.7
*** makeinfo/macro.c 11 Apr 2004 17:56:47 -0000 1.6
--- makeinfo/macro.c 10 May 2005 22:54:54 -0000 1.7
***************
*** 1,7 ****
/* macro.c -- user-defined macros for Texinfo.
! $Id: macro.c,v 1.6 2004/04/11 17:56:47 karl Exp $
! Copyright (C) 1998, 1999, 2002, 2003 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
--- 1,7 ----
/* macro.c -- user-defined macros for Texinfo.
! $Id: macro.c,v 1.7 2005/05/10 22:54:54 karl Exp $
! Copyright (C) 1998, 1999, 2002, 2003, 2005 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
***************
*** 264,270 ****
char **arglist;
get_rest_of_line (0, &word);
! if (input_text[input_text_offset - 1] == '\n')
{
input_text_offset--;
line_number--;
--- 264,271 ----
char **arglist;
get_rest_of_line (0, &word);
! if (input_text_offset > 0
! && input_text[input_text_offset - 1] == '\n')
{
input_text_offset--;
line_number--;
Index: makeinfo/makeinfo.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -c -r1.80 -r1.81
*** makeinfo/makeinfo.c 12 Apr 2005 13:12:23 -0000 1.80
--- makeinfo/makeinfo.c 10 May 2005 22:54:54 -0000 1.81
***************
*** 1,5 ****
/* makeinfo -- convert Texinfo source into other formats.
! $Id: makeinfo.c,v 1.80 2005/04/12 13:12:23 kasal Exp $
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,5 ----
/* makeinfo -- convert Texinfo source into other formats.
! $Id: makeinfo.c,v 1.81 2005/05/10 22:54:54 karl Exp $
Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 2202,2207 ****
--- 2202,2208 ----
menu swallows its newline, so check here instead. */
if (!only_macro_expansion && in_menu
&& input_text_offset + 1 < input_text_length
+ && input_text_offset > 0
&& input_text[input_text_offset-1] == '\n')
handle_menu_entry ();
else
Index: makeinfo/multi.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/multi.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -c -r1.10 -r1.11
*** makeinfo/multi.c 9 May 2005 23:53:37 -0000 1.10
--- makeinfo/multi.c 10 May 2005 22:54:54 -0000 1.11
***************
*** 1,5 ****
/* multi.c -- multiple-column tables (@multitable) for makeinfo.
! $Id: multi.c,v 1.10 2005/05/09 23:53:37 karl Exp $
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
--- 1,5 ----
/* multi.c -- multiple-column tables (@multitable) for makeinfo.
! $Id: multi.c,v 1.11 2005/05/10 22:54:54 karl Exp $
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
Free Software Foundation, Inc.
***************
*** 348,354 ****
if (xml)
{
xml_no_para = 1;
! if (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
}
--- 348,355 ----
if (xml)
{
xml_no_para = 1;
! if (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
}
Index: makeinfo/node.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/node.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -c -r1.28 -r1.29
*** makeinfo/node.c 1 Apr 2005 17:18:24 -0000 1.28
--- makeinfo/node.c 10 May 2005 22:54:54 -0000 1.29
***************
*** 1,7 ****
/* node.c -- nodes for Texinfo.
! $Id: node.c,v 1.28 2005/04/01 17:18:24 karl Exp $
! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
--- 1,7 ----
/* node.c -- nodes for Texinfo.
! $Id: node.c,v 1.29 2005/05/10 22:54:54 karl Exp $
! Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
***************
*** 403,409 ****
if (c == '\t' ||
c == '\n' ||
c == ',' ||
! ((paren_seen && nodename[i - 1] == ')') &&
(c == ' ' || c == '.')) ||
(c == '.' &&
((!nodename[i + 1] ||
--- 403,409 ----
if (c == '\t' ||
c == '\n' ||
c == ',' ||
! ((paren_seen && i > 0 && nodename[i - 1] == ')') &&
(c == ' ' || c == '.')) ||
(c == '.' &&
((!nodename[i + 1] ||
Index: makeinfo/xml.c
===================================================================
RCS file: /cvsroot/texinfo/texinfo/makeinfo/xml.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -c -r1.58 -r1.59
*** makeinfo/xml.c 22 Apr 2005 22:24:26 -0000 1.58
--- makeinfo/xml.c 10 May 2005 22:54:54 -0000 1.59
***************
*** 1,5 ****
/* xml.c -- xml output.
! $Id: xml.c,v 1.58 2005/04/22 22:24:26 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
--- 1,5 ----
/* xml.c -- xml output.
! $Id: xml.c,v 1.59 2005/05/10 22:54:54 karl Exp $
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
***************
*** 30,35 ****
--- 30,37 ----
#include "xml.h"
+ #include <assert.h>
+
/* Options */
int xml_index_divisions = 1;
***************
*** 673,678 ****
--- 675,681 ----
static int
xml_current_element (void)
{
+ assert (element_stack_index > 0);
return element_stack[element_stack_index-1];
}
***************
*** 728,734 ****
|| !xml_element_list[xml_current_element()].contains_para)
return;
! while (output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_indent ();
--- 731,738 ----
|| !xml_element_list[xml_current_element()].contains_para)
return;
! while (output_paragraph_offset > 0
! && output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
xml_indent ();
***************
*** 746,752 ****
if (!xml_in_para || xml_in_footnote)
return;
! while (cr_or_whitespace(output_paragraph[output_paragraph_offset-1]))
output_paragraph_offset--;
insert_string ("</para>");
--- 750,757 ----
if (!xml_in_para || xml_in_footnote)
return;
! while (output_paragraph_offset > 0
! && cr_or_whitespace(output_paragraph[output_paragraph_offset-1]))
output_paragraph_offset--;
insert_string ("</para>");
***************
*** 921,933 ****
/* Eat one newline before </example> and the like. */
if (!docbook && arg == END
&& (xml_element_list[elt].keep_space || elt == GROUP)
&& output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
/* And eat whitespace before </entry> in @multitables. */
if (arg == END && elt == ENTRY)
! while (cr_or_whitespace(output_paragraph[output_paragraph_offset-1]))
! output_paragraph_offset--;
/* Indent elements that can contain <para>. */
if (arg == END && !xml_in_para && !xml_keep_space
--- 926,940 ----
/* Eat one newline before </example> and the like. */
if (!docbook && arg == END
&& (xml_element_list[elt].keep_space || elt == GROUP)
+ && output_paragraph_offset > 0
&& output_paragraph[output_paragraph_offset-1] == '\n')
output_paragraph_offset--;
/* And eat whitespace before </entry> in @multitables. */
if (arg == END && elt == ENTRY)
! while (output_paragraph_offset > 0 &&
! cr_or_whitespace(output_paragraph[output_paragraph_offset-1]))
! output_paragraph_offset--;
/* Indent elements that can contain <para>. */
if (arg == END && !xml_in_para && !xml_keep_space
P ChangeLog
P makeinfo/cmds.c
P makeinfo/defun.c
P makeinfo/insertion.c
P makeinfo/lang.c
P makeinfo/macro.c
P makeinfo/makeinfo.c
P makeinfo/multi.c
P makeinfo/node.c
P makeinfo/xml.c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Tue May 10 19:22:01 EDT 2005),
Karl Berry <=