aboutsummaryrefslogtreecommitdiff
path: root/texinfo
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1997-12-05 15:13:17 -0700
committerJeff Law <law@gcc.gnu.org>1997-12-05 15:13:17 -0700
commitf2d765451e5dee21174c6ca6d4174866dbe24e00 (patch)
treed4816ec61b2c9013a45e2d0b1f5cdc7060e5a9ab /texinfo
parent435bba3a39bd51688b1b6cd15c042a17259d1b8b (diff)
downloadgcc-f2d765451e5dee21174c6ca6d4174866dbe24e00.zip
gcc-f2d765451e5dee21174c6ca6d4174866dbe24e00.tar.gz
gcc-f2d765451e5dee21174c6ca6d4174866dbe24e00.tar.bz2
release branch changes from 11-27 snapshot to egcs-1.0.
From-SVN: r16970
Diffstat (limited to 'texinfo')
-rw-r--r--texinfo/ChangeLog5
-rw-r--r--texinfo/INSTALL3
-rw-r--r--texinfo/makeinfo/makeinfo.c19
3 files changed, 20 insertions, 7 deletions
diff --git a/texinfo/ChangeLog b/texinfo/ChangeLog
index 7f5a278..2a65dd9 100644
--- a/texinfo/ChangeLog
+++ b/texinfo/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec 2 20:24:40 1997 Bruno Haible <haible@ilog.fr>
+
+ * makeinfo/makeinfo.c (find_and_load, convert_from_stream):
+ Zero-terminate the file contents.
+
Fri Oct 31 09:39:31 1997 Jeffrey A Law (law@cygnus.com)
* Makefile.in (install targets): Add a dummy target for sunos make.
diff --git a/texinfo/INSTALL b/texinfo/INSTALL
index a2c8722..178cd2b 100644
--- a/texinfo/INSTALL
+++ b/texinfo/INSTALL
@@ -1,3 +1,6 @@
+Note most of this information is out of date and superceded by the EGCS
+install procedures. It is provided for historical reference only.
+
Basic Installation
==================
diff --git a/texinfo/makeinfo/makeinfo.c b/texinfo/makeinfo/makeinfo.c
index 2b9e966..afcc2e2 100644
--- a/texinfo/makeinfo/makeinfo.c
+++ b/texinfo/makeinfo/makeinfo.c
@@ -1,5 +1,5 @@
/* Makeinfo -- convert texinfo format files into info files.
- $Id: makeinfo.c,v 1.2 1997/09/03 04:25:24 law Exp $
+ $Id: makeinfo.c,v 1.5 1998/03/03 09:03:45 law Exp $
Copyright (C) 1987, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
@@ -1167,7 +1167,7 @@ find_and_load (filename)
goto error_exit;
/* Load the file. */
- result = (char *)xmalloc (1 + file_size);
+ result = (char *)xmalloc (file_size + 2);
/* VMS stat lies about the st_size value. The actual number of
readable bytes is always less than this value. The arcane
@@ -1207,6 +1207,8 @@ find_and_load (filename)
extra unnecessary work each time it is called (that is a lot of times).
The SIZE_OF_INPUT_TEXT is one past the actual end of the text. */
input_text[size_of_input_text] = '\n';
+ /* Necessary, because later on we call strlen(input_text+limit). */
+ input_text[size_of_input_text+1] = '\0';
return (result);
}
@@ -1947,21 +1949,22 @@ convert_from_stream (stream, name)
FILE *stream;
char *name;
{
- char *buffer = (char *)NULL;
- int buffer_offset = 0, buffer_size = 0;
+ int buffer_size = READ_BUFFER_GROWTH;
+ char *buffer = (char *) xmalloc (buffer_size + 2);
+ int buffer_offset = 0;
initialize_conversion ();
/* Read until the end of the stream. This isn't strictly correct, since
the texinfo input may end before the stream ends, but it is a quick
- working hueristic. */
+ working heuristic. */
while (!feof (stream))
{
int count;
- if (buffer_offset + (READ_BUFFER_GROWTH + 1) >= buffer_size)
+ if (buffer_offset + READ_BUFFER_GROWTH > buffer_size)
buffer = (char *)
- xrealloc (buffer, (buffer_size += READ_BUFFER_GROWTH));
+ xrealloc (buffer, (buffer_size += READ_BUFFER_GROWTH) + 2);
count = fread (buffer + buffer_offset, 1, READ_BUFFER_GROWTH, stream);
@@ -1988,6 +1991,8 @@ convert_from_stream (stream, name)
extra unnecessary work each time it is called (that is a lot of times).
The SIZE_OF_INPUT_TEXT is one past the actual end of the text. */
input_text[size_of_input_text] = '\n';
+ /* Necessary, because later on we call strlen(input_text+limit). */
+ input_text[size_of_input_text+1] = '\0';
convert_from_loaded_file (name);
}