_PATH_BSHELL, _PATH_SENDMAIL, _PATH_TMP and _PATH_TTY are defined in
<paths.h> and _PATH_SYSV_TTY is unused. All of them can be removed from
pathnames.h. The other defines can be made unconditionally.

See diff below.

cheers,
natano


Index: build/pathnames.h
===================================================================
RCS file: /cvs/src/usr.bin/vi/build/pathnames.h,v
retrieving revision 1.3
diff -u -r1.3 pathnames.h
--- build/pathnames.h   27 Jul 1997 22:27:54 -0000      1.3
+++ build/pathnames.h   14 Nov 2014 13:18:47 -0000
@@ -1,46 +1,9 @@
 /*     $OpenBSD: pathnames.h,v 1.3 1997/07/27 22:27:54 downsj Exp $    */
 /* @(#)pathnames.h.in  8.4 (Berkeley) 6/26/96 */
 
-#ifndef        _PATH_BSHELL
-#define        _PATH_BSHELL    "/bin/sh"
-#endif
-
-#ifndef        _PATH_EXRC
 #define        _PATH_EXRC      ".exrc"
-#endif
-
-#ifndef        _PATH_MSGCAT
 #define        _PATH_MSGCAT    "/usr/share/vi/catalog/"
-#endif
-
-#ifndef        _PATH_NEXRC
 #define        _PATH_NEXRC     ".nexrc"
-#endif
-
-#ifndef        _PATH_PRESERVE
 #define        _PATH_PRESERVE  "/var/tmp/vi.recover"
-#endif
-
-#ifndef _PATH_SYSV_PTY
-#define        _PATH_SYSV_PTY  "/dev/ptmx"
-#endif
-
-#ifndef        _PATH_SENDMAIL
-#define        _PATH_SENDMAIL  "/usr/sbin/sendmail"
-#endif
-
-#ifndef        _PATH_SYSEXRC
 #define        _PATH_SYSEXRC   "/etc/vi.exrc"
-#endif
-
-#ifndef        _PATH_TAGS
 #define        _PATH_TAGS      "tags"
-#endif
-
-#ifndef        _PATH_TMP
-#define        _PATH_TMP       "/tmp"
-#endif
-
-#ifndef        _PATH_TTY
-#define        _PATH_TTY       "/dev/tty"
-#endif
Index: cl/cl_main.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/cl/cl_main.c,v
retrieving revision 1.23
diff -u -r1.23 cl_main.c
--- cl/cl_main.c        12 Nov 2014 16:29:04 -0000      1.23
+++ cl/cl_main.c        14 Nov 2014 13:18:39 -0000
@@ -18,6 +18,7 @@
 #include <curses.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <paths.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -28,7 +29,6 @@
 
 #include "../common/common.h"
 #include "cl.h"
-#include "pathnames.h"
 
 GS *__global_list;                             /* GLOBAL: List of screens. */
 sigset_t __sigblockset;                                /* GLOBAL: Blocked 
signals. */
Index: common/main.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/main.c,v
retrieving revision 1.23
diff -u -r1.23 main.c
--- common/main.c       12 Nov 2014 04:28:41 -0000      1.23
+++ common/main.c       14 Nov 2014 13:18:11 -0000
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
+#include <paths.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -27,7 +28,6 @@
 
 #include "common.h"
 #include "../vi/vi.h"
-#include "pathnames.h"
 
 #ifdef DEBUG
 static void     attach(GS *);
Index: common/options.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/options.c,v
retrieving revision 1.17
diff -u -r1.17 options.c
--- common/options.c    12 Nov 2014 04:28:41 -0000      1.17
+++ common/options.c    14 Nov 2014 13:14:50 -0000
@@ -20,6 +20,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <limits.h>
+#include <paths.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
Index: common/recover.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/common/recover.c,v
retrieving revision 1.18
diff -u -r1.18 recover.c
--- common/recover.c    12 Nov 2014 16:29:04 -0000      1.18
+++ common/recover.c    14 Nov 2014 13:15:48 -0000
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
+#include <paths.h>
 #include <pwd.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -35,7 +36,6 @@
 #include <unistd.h>
 
 #include "common.h"
-#include "pathnames.h"
 
 /*
  * Recovery code.
Index: ex/ex_cscope.c
===================================================================
RCS file: /cvs/src/usr.bin/vi/ex/ex_cscope.c,v
retrieving revision 1.22
diff -u -r1.22 ex_cscope.c
--- ex/ex_cscope.c      12 Nov 2014 16:29:04 -0000      1.22
+++ ex/ex_cscope.c      14 Nov 2014 13:16:08 -0000
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <limits.h>
+#include <paths.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -30,7 +31,6 @@
 #include <unistd.h>
 
 #include "../common/common.h"
-#include "pathnames.h"
 #include "tag.h"
 
 #define        CSCOPE_DBFILE           "cscope.out"

Reply via email to