Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
100 7u83 1
/* vi:set ts=8 sts=4 sw=4:
2
 *
3
 * VIM - Vi IMproved	by Bram Moolenaar
4
 *
5
 * Do ":help uganda"  in Vim to read copying and usage conditions.
6
 * Do ":help credits" in Vim to see a list of people who contributed.
7
 */
8
 
9
/*
10
 * Plan 9 Machine-dependent things
11
 */
12
 
13
#include <sys/types.h>
14
#include <sys/wait.h>
15
#include <sys/stat.h>
16
#include <unistd.h>
17
#include <time.h>
18
#include <dirent.h>
19
 
20
#define SPACE_IN_FILENAME
21
#define USE_TERM_CONSOLE
22
#define USE_UNIXFILENAME
23
 
24
#define HAVE_STDLIB_H
25
#define HAVE_STDARG_H
26
#define HAVE_STRING_H
27
#define HAVE_FCNTL_H
28
#define HAVE_STRCSPN
29
#define HAVE_STRFTIME	    /* guessed */
30
#define HAVE_SETENV
31
#define HAVE_MEMSET
32
#define HAVE_PATHDEF
33
#define HAVE_QSORT
34
#if defined(__DATE__) && defined(__TIME__)
35
# define HAVE_DATE_TIME
36
#endif
37
 
38
#define DFLT_ERRORFILE		"errors.err"
39
 
40
#define DFLT_RUNTIMEPATH	"$home/lib/vim/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$home/lib/vim/vimfiles/after"
41
 
42
#if !defined(MAXNAMLEN)
43
# define MAXNAMLEN 512		    /* for all other Unix */
44
#endif
45
 
46
#define BASENAMELEN	(MAXNAMLEN - 5)
47
 
48
#define TEMPDIRNAMES  "$TMPDIR", "/tmp", ".", "$HOME"
49
#define TEMPNAMELEN    256
50
 
51
/*
52
 * Names for the EXRC, HELP and temporary files.
53
 * Some of these may have been defined in the makefile.
54
 */
55
#ifndef SYS_VIMRC_FILE
56
# define SYS_VIMRC_FILE "$VIM/vimrc"
57
#endif
58
#ifndef SYS_GVIMRC_FILE
59
# define SYS_GVIMRC_FILE "$VIM/gvimrc"
60
#endif
61
#ifndef SYS_MENU_FILE
62
# define SYS_MENU_FILE	"$VIMRUNTIME/menu.vim"
63
#endif
64
#ifndef DFLT_HELPFILE
65
# define DFLT_HELPFILE	"$VIMRUNTIME/doc/help.txt"
66
#endif
67
#ifndef FILETYPE_FILE
68
# define FILETYPE_FILE	"filetype.vim"
69
#endif
70
#ifndef FTPLUGIN_FILE
71
# define FTPLUGIN_FILE	"ftplugin.vim"
72
#endif
73
#ifndef INDENT_FILE
74
# define INDENT_FILE	"indent.vim"
75
#endif
76
#ifndef FTOFF_FILE
77
# define FTOFF_FILE	"ftoff.vim"
78
#endif
79
#ifndef FTPLUGOF_FILE
80
# define FTPLUGOF_FILE	"ftplugof.vim"
81
#endif
82
#ifndef INDOFF_FILE
83
# define INDOFF_FILE	"indoff.vim"
84
#endif
85
#ifndef SYNTAX_FNAME
86
# define SYNTAX_FNAME	"$VIMRUNTIME/syntax/%s.vim"
87
#endif
88
 
89
#ifndef USR_EXRC_FILE
90
# define USR_EXRC_FILE	"$home/lib/exrc"
91
#endif
92
 
93
#ifndef USR_VIMRC_FILE
94
# define USR_VIMRC_FILE	"$home/lib/vimrc"
95
#endif
96
#ifndef EVIM_FILE
97
# define EVIM_FILE	"$VIMRUNTIME/evim.vim"
98
#endif
99
 
100
#ifndef USR_GVIMRC_FILE
101
# define USR_GVIMRC_FILE "$home/lib/gvimrc"
102
#endif
103
 
104
#ifdef FEAT_VIMINFO
105
# ifndef VIMINFO_FILE
106
#  define VIMINFO_FILE	"$home/lib/viminfo"
107
# endif
108
#endif /* FEAT_VIMINFO */
109
 
110
#ifndef EXRC_FILE
111
# define EXRC_FILE	"exrc"
112
#endif
113
 
114
#ifndef VIMRC_FILE
115
# define VIMRC_FILE	"vimrc"
116
#endif
117
 
118
#ifndef GVIMRC_FILE
119
# define GVIMRC_FILE	"gvimrc"
120
#endif
121
 
122
#ifndef DFLT_BDIR
123
#define DFLT_BDIR    ".,/tmp,$home"    /* default for 'backupdir' */
124
#endif
125
 
126
#ifndef DFLT_DIR
127
# define DFLT_DIR     ".,/tmp" /* default for 'directory' */
128
#endif
129
 
130
#ifndef DFLT_VDIR
131
# define DFLT_VDIR    "$home/lib/vim/view"       /* default for 'viewdir' */
132
#endif
133
 
134
#ifndef DFLT_MAXMEM
135
# define DFLT_MAXMEM	(5*1024)	 /* use up to 5 Mbyte for a buffer */
136
#endif
137
#ifndef DFLT_MAXMEMTOT
138
# define DFLT_MAXMEMTOT	(10*1024)    /* use up to 10 Mbyte for Vim */
139
#endif
140
 
141
#define mch_rename(src, dst) rename(src, dst)
142
#define mch_chdir(s) chdir(s)
143
#define vim_mkdir(x, y) mkdir((char*)(x), (y))
144
#define mch_rmdir(x) rmdir((char*)(x))
145
#define mch_getenv(x) (char_u *)getenv((char *)(x))