Just a little correction at the it.po file.
[midnight-commander.git] / src / global.h
blobd9d8219fd8fcf975afb8c2b9df2a04d8a60a61b5
1 /*
2 * This file should be included after all system includes and before
3 * all local includes.
4 */
6 #ifndef __MC_GLOBAL_H
7 #define __MC_GLOBAL_H
9 #include <stdlib.h> /* for free() and other usefull routins */
11 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
12 # include <string.h>
13 /* An ANSI string.h and pre-ANSI memory.h might conflict */
14 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
15 # include <memory.h>
16 # endif /* !STDC_HEADERS & HAVE_MEMORY_H */
18 #else /* !STDC_HEADERS & !HAVE_STRING_H */
19 # include <strings.h>
20 /* memory and strings.h conflict on other systems */
21 #endif /* !STDC_HEADERS & !HAVE_STRING_H */
23 #ifdef NATIVE_WIN32
24 # include <windows.h>
25 # include <io.h>
26 #ifdef _MSC_VER
27 # include <direct.h> /* from mkdir() */
28 #endif
29 #endif
31 #ifdef HAVE_SYS_PARAM_H
32 # include <sys/param.h>
33 #endif
35 #ifdef HAVE_FCNTL_H
36 # include <fcntl.h>
37 #endif
39 /* The O_BINARY definition was taken from gettext */
40 #if !defined O_BINARY && defined _O_BINARY
41 /* For MSC-compatible compilers. */
42 # define O_BINARY _O_BINARY
43 #endif
44 #ifdef __BEOS__
45 /* BeOS 5 has O_BINARY, but is has no effect. */
46 # undef O_BINARY
47 #endif
48 /* On reasonable systems, binary I/O is the default. */
49 #ifndef O_BINARY
50 # define O_BINARY 0
51 #endif
54 /* Replacement for O_NONBLOCK */
55 #ifndef O_NONBLOCK
56 #ifdef O_NDELAY /* SYSV */
57 #define O_NONBLOCK O_NDELAY
58 #else /* BSD */
59 #define O_NONBLOCK FNDELAY
60 #endif /* !O_NDELAY */
61 #endif /* !O_NONBLOCK */
64 #ifdef HAVE_SYS_TIMEB_H
65 # include <sys/timeb.h>
66 #endif
68 #ifdef TIME_WITH_SYS_TIME
69 # include <sys/time.h>
70 # include <time.h>
71 #else
72 # ifdef HAVE_SYS_TIME_H
73 # include <sys/time.h>
74 # else
75 # include <time.h>
76 # endif
77 #endif
79 #if !defined(HAVE_SYS_TIME_H) && !defined(NATIVE_WIN32)
80 struct timeval {
81 long int tv_sec; /* seconds */
82 long int tv_usec; /* microseconds */
84 #endif /* !HAVE_SYS_TIME_H */
86 #ifdef HAVE_UTIME_H
87 # include <utime.h>
88 #elif defined(HAVE_SYS_UTIME_H)
89 # include <sys/utime.h>
90 #endif
92 #ifdef HAVE_SYS_WAIT_H
93 # include <sys/wait.h>
94 #endif
96 #ifdef HAVE_SYS_SELECT_H
97 # include <sys/select.h>
98 #endif
100 #ifdef HAVE_GRP_H
101 # include <grp.h>
102 #endif
104 #ifdef HAVE_PWD_H
105 # include <pwd.h>
106 #endif
108 #if defined(__QNX__) && !defined(__QNXNTO__)
109 /* exec*() from <process.h> */
110 # include <unix.h>
111 #endif
113 #include <glib.h>
115 #if defined(HAVE_RX_H) && defined(HAVE_REGCOMP)
116 #include <rx.h>
117 #else
118 #include "eregex.h"
119 #endif
121 #ifndef __GNUC__
122 # define __attribute__(x)
123 #endif
125 #ifndef HAVE_GETUID
126 # define getuid() 0
127 #endif
128 #ifndef HAVE_GETGID
129 # define getgid() 0
130 #endif
131 #ifndef HAVE_GETEUID
132 # define geteuid() getuid()
133 #endif
134 #ifndef HAVE_GETEGID
135 # define getegid() getgid()
136 #endif
138 #include "fs.h"
139 #include "util.h"
141 #include "textconf.h"
142 #include "../vfs/vfs.h"
144 extern char *home_dir;
146 #ifdef min
147 #undef min
148 #endif
150 #ifdef max
151 #undef max
152 #endif
154 #define min(x, y) ((x) > (y) ? (y) : (x))
155 #define max(x, y) ((x) > (y) ? (x) : (y))
157 /* Just for keeping Your's brains from invention a proper size of the buffer :-) */
158 #define BUF_10K 10240L
159 #define BUF_8K 8192L
160 #define BUF_4K 4096L
161 #define BUF_1K 1024L
163 #define BUF_LARGE BUF_1K
164 #define BUF_MEDIUM 512
165 #define BUF_SMALL 128
166 #define BUF_TINY 64
168 void refresh_screen (void *);
170 /* AIX compiler doesn't understand '\e' */
171 #define ESC_CHAR '\033'
172 #define ESC_STR "\033"
174 #endif /* !__MC_GLOBAL_H */