81ef29ab40
OS X patch program.
66 lines
1.2 KiB
Text
66 lines
1.2 KiB
Text
$NetBSD: patch-ai,v 1.6 2006/01/17 21:23:01 kristerw Exp $
|
|
|
|
--- fep_hist.c.orig 1988-11-25 06:45:42.000000000 -0500
|
|
+++ fep_hist.c 2005-12-10 16:59:27.000000000 -0500
|
|
@@ -6 +6 @@
|
|
-#endif lint
|
|
+#endif /* lint */
|
|
@@ -7,4 +7,6 @@
|
|
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
#include <ctype.h>
|
|
#include "fep_defs.h"
|
|
@@ -255,7 +257,7 @@
|
|
|
|
default:
|
|
{
|
|
- char *buf[64];
|
|
+ char buf[64];
|
|
|
|
strcpy (buf, "^");
|
|
strncat (buf, string, 64);
|
|
@@ -267,6 +269,7 @@
|
|
|
|
char *
|
|
search_reverse_history (string)
|
|
+ char *string;
|
|
{
|
|
register int i;
|
|
char *re_comp();
|
|
@@ -291,6 +294,7 @@
|
|
|
|
char *
|
|
search_forward_history (string)
|
|
+ char *string;
|
|
{
|
|
register int i;
|
|
char *re_comp();
|
|
@@ -412,7 +416,7 @@
|
|
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 @@
|
|
char *file;
|
|
{
|
|
FILE *fp;
|
|
- char line [MAXCOMLEN];
|
|
+ char line [MAXCMDLEN];
|
|
register int i;
|
|
|
|
if ((fp = fopen (file, "r")) == NULL) {
|
|
@@ -550,7 +554,7 @@
|
|
return;
|
|
}
|
|
|
|
- while (fgets (line, MAXCOMLEN, fp)) {
|
|
+ while (fgets (line, MAXCMDLEN, fp)) {
|
|
i = strlen (line) - 1;
|
|
if (line [i] == '\n')
|
|
line [i] = '\0';
|