summaryrefslogtreecommitdiff
path: root/usr.bin/vim/unix.h
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-09-21 06:23:56 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-09-21 06:23:56 +0000
commite8e01073071369d33ab4cf61be05bebe5a65566e (patch)
tree2c29b23bfb933e0fa40619f7d1fae430ff2c247e /usr.bin/vim/unix.h
parent584e4bbf452da2934dbaf4b9dc09bd131a1d4cd7 (diff)
update to vim 4.4beta
Diffstat (limited to 'usr.bin/vim/unix.h')
-rw-r--r--usr.bin/vim/unix.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/usr.bin/vim/unix.h b/usr.bin/vim/unix.h
index b06739bf7b9..bf67c8c91d4 100644
--- a/usr.bin/vim/unix.h
+++ b/usr.bin/vim/unix.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.h,v 1.1 1996/09/07 21:40:27 downsj Exp $ */
+/* $OpenBSD: unix.h,v 1.2 1996/09/21 06:23:25 downsj Exp $ */
/* vi:set ts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
@@ -90,7 +90,9 @@
#if HAVE_DIRENT_H
# include <dirent.h>
+# ifndef NAMLEN
# define NAMLEN(dirent) strlen((dirent)->d_name)
+# endif
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
@@ -135,6 +137,8 @@
# define MAXNAMLEN 512 /* for all other Unix */
#endif
+#define BASENAMELEN (MAXNAMLEN - 5)
+
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif
@@ -206,13 +210,15 @@
#endif
#ifdef OS2
-#define TMPNAME1 "$TMP/viXXXXXX"
-#define TMPNAME2 "$TMP/voXXXXXX"
-#define TMPNAMELEN 128
+/*
+ * Try several directories to put the temp files.
+ */
+#define TEMPDIRNAMES "$TMP", "$TEMP", "c:\\TMP", "c:\\TEMP", ""
+#define TEMPNAME "v?XXXXXX"
+#define TEMPNAMELEN 128
#else
-#define TMPNAME1 "/tmp/viXXXXXX"
-#define TMPNAME2 "/tmp/voXXXXXX"
-#define TMPNAMELEN 15
+#define TEMPNAME "/tmp/v?XXXXXX"
+#define TEMPNAMELEN 15
#endif
/*
@@ -232,8 +238,6 @@
# define MAXMEMTOT 2048 /* use up to 2048Kbyte for Vim */
#endif
-#define BASENAMELEN (MAXNAMLEN - 5)
-
/* memmove is not present on all systems, use memmove, bcopy, memcpy or our
* own version */
/* Some systems have (void *) arguments, some (char *). If we use (char *) it