summaryrefslogtreecommitdiff
path: root/lib/libedit
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2000-05-22 06:07:00 +0000
committerWarner Losh <imp@FreeBSD.org>2000-05-22 06:07:00 +0000
commitd0646ae7343f29e0a7e12fccab4c7c8cbafdfd31 (patch)
treeb0a3703c66315fd8f918bade37ef7e9021bb25c6 /lib/libedit
parent8ef680403ff66b17176509b8807be866ed76a7d3 (diff)
Notes
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/editline.32
-rw-r--r--lib/libedit/el.c17
-rw-r--r--lib/libedit/read.c8
3 files changed, 14 insertions, 13 deletions
diff --git a/lib/libedit/editline.3 b/lib/libedit/editline.3
index 7528f5fa86f2..3dda60dcce9d 100644
--- a/lib/libedit/editline.3
+++ b/lib/libedit/editline.3
@@ -381,8 +381,6 @@ If
is
.Dv NULL ,
try
-.Pa $PWD/.editrc
-then
.Pa $HOME/.editrc .
Refer to
.Xr editrc 5
diff --git a/lib/libedit/el.c b/lib/libedit/el.c
index 87f6813d455d..c346a8bba283 100644
--- a/lib/libedit/el.c
+++ b/lib/libedit/el.c
@@ -35,7 +35,11 @@
*/
#if !defined(lint) && !defined(SCCSID)
+#if 0
static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint && not SCCSID */
/*
@@ -45,6 +49,7 @@ static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94";
#include <sys/types.h>
#include <sys/param.h>
+#include <errno.h>
#include <string.h>
#include <stdlib.h>
#if __STDC__
@@ -80,7 +85,6 @@ el_init(prog, fin, fout)
if (issetugid() == 0 && (tty = getenv("DEBUGTTY")) != NULL) {
el->el_errfile = fopen(tty, "w");
if (el->el_errfile == NULL) {
- extern errno;
(void) fprintf(stderr, "Cannot open %s (%s).\n",
tty, strerror(errno));
return NULL;
@@ -290,13 +294,10 @@ el_source(el, fname)
char *ptr, path[MAXPATHLEN];
if (fname == NULL) {
- fname = &elpath[1];
- if ((fp = fopen(fname, "r")) == NULL) {
- if (issetugid() != 0 || (ptr = getenv("HOME")) == NULL)
- return -1;
- (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
- fname = path;
- }
+ if (issetugid() != 0 || (ptr = getenv("HOME")) == NULL)
+ return -1;
+ (void) snprintf(path, sizeof(path), "%s%s", ptr, elpath);
+ fname = path;
}
if ((fp = fopen(fname, "r")) == NULL)
diff --git a/lib/libedit/read.c b/lib/libedit/read.c
index d8d662826ce5..2db1942e083f 100644
--- a/lib/libedit/read.c
+++ b/lib/libedit/read.c
@@ -35,18 +35,20 @@
*/
#if !defined(lint) && !defined(SCCSID)
+#if 0
static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93";
-
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint && not SCCSID */
/*
* read.c: Clean this junk up! This is horrible code.
* Terminal read functions
*/
#include "sys.h"
-#include <sys/errno.h>
+#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
-extern int errno;
#include "el.h"
#define OKCMD -1