Commit 34b6478b by Jeff Law

More merge stuff.

From-SVN: r18769
parent b19e662b
/* man.c: How to read and format man files. /* man.c: How to read and format man files.
$Id: man.c,v 1.4 1998/03/22 21:47:54 law Exp $ $Id: man.c,v 1.5 1998/03/22 22:35:19 law Exp $
Copyright (C) 1995, 97 Free Software Foundation, Inc. Copyright (C) 1995, 97 Free Software Foundation, Inc.
...@@ -32,10 +32,6 @@ ...@@ -32,10 +32,6 @@
#include "tilde.h" #include "tilde.h"
#include "man.h" #include "man.h"
#if !defined (SIGCHLD) && defined (SIGCLD)
#define SIGCHLD SIGCLD
#endif
#if !defined (_POSIX_VERSION) #if !defined (_POSIX_VERSION)
#define pid_t int #define pid_t int
#endif #endif
...@@ -48,8 +44,6 @@ ...@@ -48,8 +44,6 @@
# endif /* !hpux */ # endif /* !hpux */
#endif /* FD_SET */ #endif /* FD_SET */
extern char *getenv ();
static char *read_from_fd (); static char *read_from_fd ();
static void clean_manpage (); static void clean_manpage ();
static NODE *manpage_node_of_file_buffer (); static NODE *manpage_node_of_file_buffer ();
...@@ -175,7 +169,7 @@ executable_file_in_path (filename, path) ...@@ -175,7 +169,7 @@ executable_file_in_path (filename, path)
static char * static char *
find_man_formatter () find_man_formatter ()
{ {
return (executable_file_in_path ("man", getenv ("PATH"))); return (executable_file_in_path ("man", (char *)getenv ("PATH")));
} }
static char *manpage_pagename = (char *)NULL; static char *manpage_pagename = (char *)NULL;
......
/* Makeinfo -- convert Texinfo source files into Info files. /* Makeinfo -- convert Texinfo source files into Info files.
$Id: makeinfo.c,v 1.6 1998/03/22 21:47:57 law Exp $ $Id: makeinfo.c,v 1.8 1998/03/24 18:07:53 law Exp $
Copyright (C) 1987, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc. Copyright (C) 1987, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
...@@ -774,7 +774,6 @@ static COMMAND command_table[] = { ...@@ -774,7 +774,6 @@ static COMMAND command_table[] = {
{ NULL, NULL, NO_BRACE_ARGS } { NULL, NULL, NO_BRACE_ARGS }
}; };
struct option long_options[] = struct option long_options[] =
{ {
{ "error-limit", 1, 0, 'e' }, /* formerly -el */ { "error-limit", 1, 0, 'e' }, /* formerly -el */
...@@ -1148,25 +1147,6 @@ print_version_info () ...@@ -1148,25 +1147,6 @@ print_version_info ()
major_version, minor_version); major_version, minor_version);
} }
/* Like realloc (), but barfs if there isn't enough memory. */
void *
xrealloc (pointer, nbytes)
void *pointer;
unsigned int nbytes;
{
void *temp;
if (!pointer)
temp = (void *)xmalloc (nbytes);
else
temp = (void *)realloc (pointer, nbytes);
if (nbytes && !temp)
memory_error ("xrealloc", nbytes);
return (temp);
}
/* If EXIT_VALUE is zero, print the full usage message to stdout. /* If EXIT_VALUE is zero, print the full usage message to stdout.
Otherwise, just say to use --help for more info. Otherwise, just say to use --help for more info.
Then exit with EXIT_VALUE. */ Then exit with EXIT_VALUE. */
...@@ -1269,7 +1249,7 @@ find_and_load (filename) ...@@ -1269,7 +1249,7 @@ find_and_load (filename)
goto error_exit; goto error_exit;
/* Load the file. */ /* Load the file. */
result = (char *)xmalloc (file_size + 2); result = (char *)xmalloc (1 + file_size);
/* VMS stat lies about the st_size value. The actual number of /* VMS stat lies about the st_size value. The actual number of
readable bytes is always less than this value. The arcane readable bytes is always less than this value. The arcane
...@@ -1313,8 +1293,6 @@ find_and_load (filename) ...@@ -1313,8 +1293,6 @@ find_and_load (filename)
extra unnecessary work each time it is called (that is a lot of times). 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. */ The SIZE_OF_INPUT_TEXT is one past the actual end of the text. */
input_text[size_of_input_text] = '\n'; 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); return (result);
} }
...@@ -1974,15 +1952,14 @@ convert_from_stream (stream, name) ...@@ -1974,15 +1952,14 @@ convert_from_stream (stream, name)
FILE *stream; FILE *stream;
char *name; char *name;
{ {
int buffer_size = READ_BUFFER_GROWTH; char *buffer = (char *)NULL;
char *buffer = (char *) xmalloc (buffer_size + 2); int buffer_offset = 0, buffer_size = 0;
int buffer_offset = 0;
initialize_conversion (); initialize_conversion ();
/* Read until the end of the stream. This isn't strictly correct, since /* 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 the texinfo input may end before the stream ends, but it is a quick
working heuristic. */ working hueristic. */
while (!feof (stream)) while (!feof (stream))
{ {
int count; int count;
...@@ -2016,8 +1993,6 @@ convert_from_stream (stream, name) ...@@ -2016,8 +1993,6 @@ convert_from_stream (stream, name)
extra unnecessary work each time it is called (that is a lot of times). 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. */ The SIZE_OF_INPUT_TEXT is one past the actual end of the text. */
input_text[size_of_input_text] = '\n'; 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); convert_from_loaded_file (name);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment