$NetBSD: patch-ai,v 1.3 2003/11/11 10:42:32 wiz Exp $ --- fep_hist.c.orig Fri Nov 25 12:45:42 1988 +++ fep_hist.c @@ -6,6 +6,8 @@ static char rcsid[]= #endif lint #include +#include +#include #include #include "fep_defs.h" #include "fep_glob.h" @@ -255,7 +257,7 @@ historyExtract(string) default: { - char *buf[64]; + char buf[64]; strcpy (buf, "^"); strncat (buf, string, 64); @@ -267,6 +269,7 @@ historyExtract(string) char * search_reverse_history (string) + char *string; { register int i; char *re_comp(); @@ -291,6 +294,7 @@ search_reverse_history (string) char * search_forward_history (string) + char *string; { register int i; char *re_comp(); @@ -412,7 +416,7 @@ char * mk_home_relative (cp) char *cp; { - char buf[256]; + static char buf[256]; /* * If variable "history-file" is not absolute path name, @@ -540,7 +544,7 @@ read_history (file) char *file; { FILE *fp; - char line [MAXCOMLEN]; + char line [MAXCMDLEN]; register int i; if ((fp = fopen (file, "r")) == NULL) { @@ -550,7 +554,7 @@ read_history (file) return; } - while (fgets (line, MAXCOMLEN, fp)) { + while (fgets (line, MAXCMDLEN, fp)) { i = strlen (line) - 1; if (line [i] == '\n') line [i] = '\0';