From owner-freebsd-bugs Thu Apr 23 11:52:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA03152 for freebsd-bugs-outgoing; Thu, 23 Apr 1998 11:52:42 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from kaiwan.kaiwan.com (kaiwan.kaiwan.com [198.178.203.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA03147 for ; Thu, 23 Apr 1998 11:52:41 -0700 (PDT) (envelope-from frank@exit.com) Received: from exit.com (uucp@localhost) by kaiwan.kaiwan.com (8.8.8/8.8.8) with UUCP id LAA14676 for freebsd-bugs@freebsd.org; Thu, 23 Apr 1998 11:52:35 -0700 (PDT) Received: (from frank@localhost) by exit.com (8.8.8/8.7.3) id LAA06737 for freebsd-bugs@freebsd.org; Thu, 23 Apr 1998 11:50:45 -0700 (PDT) From: Frank Mayhar Message-Id: <199804231850.LAA06737@exit.com> Subject: Relative paths in tags files doesn't work in nvi. To: freebsd-bugs@FreeBSD.ORG Date: Thu, 23 Apr 1998 11:50:44 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org If your tags file contains relative paths, nvi prepends the full path to the tags file, instead of just the directory portion. This is also found in the regular nvi-1.79 distribution. It's caused by a one-liner in ex/ex_tag.c; here's the diff to fix it: Index: ex_tag.c =================================================================== RCS file: /cvs/repos/src/contrib/nvi/ex/ex_tag.c,v retrieving revision 1.1.1.1.2.1 diff -c -r1.1.1.1.2.1 ex_tag.c *** ex_tag.c 1997/04/20 20:15:02 1.1.1.1.2.1 --- ex_tag.c 1998/04/23 18:48:15 *************** *** 1339,1349 **** stat(name, &sb) && (p = strrchr(tfp->name, '/')) != NULL) { *p = '\0'; len = snprintf(buf, sizeof(buf), "%s/%s", tfp->name, name); - *p = '/'; if (stat(buf, &sb) == 0) { *dirp = tfp->name; *dlenp = strlen(*dirp); } } } --- 1339,1349 ---- stat(name, &sb) && (p = strrchr(tfp->name, '/')) != NULL) { *p = '\0'; len = snprintf(buf, sizeof(buf), "%s/%s", tfp->name, name); if (stat(buf, &sb) == 0) { *dirp = tfp->name; *dlenp = strlen(*dirp); } + *p = '/'; } } -- Frank Mayhar frank@exit.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message