Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libedit Pull up revision 1.17 (via patch, requested...



details:   https://anonhg.NetBSD.org/src/rev/bdd5b11132c5
branches:  netbsd-1-4
changeset: 470695:bdd5b11132c5
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 29 16:09:42 2000 +0000

description:
Pull up revision 1.17 (via patch, requested by sommerfeld):
  Only read .editrc from home directory.

diffstat:

 lib/libedit/el.c |  15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diffs (36 lines):

diff -r 751b0e4beaa3 -r bdd5b11132c5 lib/libedit/el.c
--- a/lib/libedit/el.c  Thu Jun 29 15:48:26 2000 +0000
+++ b/lib/libedit/el.c  Thu Jun 29 16:09:42 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: el.c,v 1.12 1998/12/12 20:08:22 christos Exp $ */
+/*     $NetBSD: el.c,v 1.12.2.1 2000/06/29 16:09:42 he Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)el.c       8.2 (Berkeley) 1/3/94";
 #else
-__RCSID("$NetBSD: el.c,v 1.12 1998/12/12 20:08:22 christos Exp $");
+__RCSID("$NetBSD: el.c,v 1.12.2.1 2000/06/29 16:09:42 he Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -403,13 +403,10 @@
     char *ptr, path[MAXPATHLEN];
 
     if (fname == NULL) {
-       fname = &elpath[1];
-       if ((fp = fopen(fname, "r")) == NULL) {
-           if ((ptr = getenv("HOME")) == NULL) 
-               return -1;
-           (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
-           fname = path;
-       }
+       if ((ptr = getenv("HOME")) == NULL) 
+           return -1;
+       (void)snprintf(path, sizeof(path), "%s%s", ptr, elpath);
+       fname = path;
     }
 
     if ((fp = fopen(fname, "r")) == NULL) 



Home | Main Index | Thread Index | Old Index