21320c5685
- no errno, use errno.h - no redefinition of function parameters as local variables [how did this ever work?!] - malloc comes from stdlib.h - NAME_MAX is prefered when available, it is POSIX - strchr, strpbrk, strspn, strstr, strtol and strtoul can and should be used from libc. - remove tcl version of string.h, system header is good enough (and if it doesn't have index, it would have been broken anyway)
28 lines
796 B
Text
28 lines
796 B
Text
$NetBSD: patch-bh,v 1.1 2005/12/14 13:53:24 joerg Exp $
|
|
|
|
--- readline/history.c.orig 1995-02-24 21:20:00.000000000 +0000
|
|
+++ readline/history.c
|
|
@@ -45,6 +45,7 @@ extern char *alloca ();
|
|
#include <sys/types.h>
|
|
#include <sys/file.h>
|
|
#include <sys/stat.h>
|
|
+#include <errno.h>
|
|
#include <fcntl.h>
|
|
#include "history.h"
|
|
|
|
@@ -466,7 +467,6 @@ read_history_range (filename, from, to)
|
|
char *input, *buffer = (char *)NULL;
|
|
int file, current_line;
|
|
struct stat finfo;
|
|
- extern int errno;
|
|
|
|
input = history_filename (filename);
|
|
file = open (input, O_RDONLY, 0666);
|
|
@@ -601,7 +601,6 @@ history_do_write (filename, nelements, o
|
|
char *filename;
|
|
int nelements, overwrite;
|
|
{
|
|
- extern int errno;
|
|
register int i;
|
|
char *output = history_filename (filename);
|
|
int file, mode;
|