00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _UNIXPORT
00018 #define _UNIXPORT
00019
00020 #define __UNIX__ 1
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef VOID
00030 # ifdef __STDC__
00031 # define VOID void
00032 # else
00033 # define VOID char
00034 # endif
00035 #endif
00036
00037 #include <stdio.h>
00038 #include <ctype.h>
00039 #include <fcntl.h>
00040 #ifdef HAVE_LIMITS_H
00041 # include <limits.h>
00042 #else
00043 # include "../compat/limits.h"
00044 #endif
00045 #include <math.h>
00046 #include <pwd.h>
00047 #ifdef NO_STDLIB_H
00048 # include "../compat/stdlib.h"
00049 #else
00050 # include <stdlib.h>
00051 #endif
00052 #include <string.h>
00053 #include <sys/types.h>
00054 #include <sys/file.h>
00055 #ifdef HAVE_SYS_SELECT_H
00056 # include <sys/select.h>
00057 #endif
00058 #include <sys/stat.h>
00059 #ifndef _TCL
00060 # include <tcl.h>
00061 #endif
00062 #if TIME_WITH_SYS_TIME
00063 # include <sys/time.h>
00064 # include <time.h>
00065 #else
00066 # if HAVE_SYS_TIME_H
00067 # include <sys/time.h>
00068 # else
00069 # include <time.h>
00070 # endif
00071 #endif
00072 #ifdef HAVE_UNISTD_H
00073 # include <unistd.h>
00074 #else
00075 # include "../compat/unistd.h"
00076 #endif
00077 #include <X11/Xlib.h>
00078 #include <X11/cursorfont.h>
00079 #include <X11/keysym.h>
00080 #include <X11/Xatom.h>
00081 #include <X11/Xproto.h>
00082 #include <X11/Xresource.h>
00083 #include <X11/Xutil.h>
00084
00085
00086
00087
00088
00089
00090 #ifndef NO_FD_SET
00091 # define SELECT_MASK fd_set
00092 #else
00093 # ifndef _AIX
00094 typedef long fd_mask;
00095 # endif
00096 # if defined(_IBMR2)
00097 # define SELECT_MASK void
00098 # else
00099 # define SELECT_MASK int
00100 # endif
00101 #endif
00102
00103
00104
00105
00106
00107 #ifndef FD_SETSIZE
00108 # ifdef OPEN_MAX
00109 # define FD_SETSIZE OPEN_MAX
00110 # else
00111 # define FD_SETSIZE 256
00112 # endif
00113 #endif
00114 #if !defined(howmany)
00115 # define howmany(x, y) (((x)+((y)-1))/(y))
00116 #endif
00117 #ifndef NFDBITS
00118 # define NFDBITS NBBY*sizeof(fd_mask)
00119 #endif
00120 #define MASK_SIZE howmany(FD_SETSIZE, NFDBITS)
00121
00122
00123
00124
00125
00126
00127 extern int errno;
00128
00129
00130
00131
00132
00133 #ifndef NBBY
00134 # define NBBY 8
00135 #endif
00136
00137
00138
00139
00140
00141 #define TkClipBox(rgn, rect) XClipBox((Region) rgn, rect)
00142 #define TkCreateRegion() (TkRegion) XCreateRegion()
00143 #define TkDestroyRegion(rgn) XDestroyRegion((Region) rgn)
00144 #define TkIntersectRegion(a, b, r) XIntersectRegion((Region) a, \
00145 (Region) b, (Region) r)
00146 #define TkRectInRegion(r, x, y, w, h) XRectInRegion((Region) r, x, y, w, h)
00147 #define TkSetRegion(d, gc, rgn) XSetRegion(d, gc, (Region) rgn)
00148 #define TkUnionRectWithRegion(rect, src, ret) XUnionRectWithRegion(rect, \
00149 (Region) src, (Region) ret)
00150
00151
00152
00153
00154
00155
00156 #define TkPutImage(colors, ncolors, display, pixels, gc, image, destx, desty, srcx, srcy, width, height) \
00157 XPutImage(display, pixels, gc, image, destx, desty, srcx, \
00158 srcy, width, height);
00159
00160
00161
00162
00163
00164
00165 #ifndef SEEK_SET
00166 # define SEEK_SET 0
00167 #endif
00168
00169 #ifndef SEEK_CUR
00170 # define SEEK_CUR 1
00171 #endif
00172
00173 #ifndef SEEK_END
00174 # define SEEK_END 2
00175 #endif
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187 #define TkpButtonSetDefaults(specPtr) {}
00188 #define TkpDestroyButton(butPtr) {}
00189 #define TkSelUpdateClipboard(a,b) {}
00190 #define TkSetPixmapColormap(p,c) {}
00191
00192
00193
00194
00195
00196
00197 #define TkpDefineNativeBitmaps()
00198 #define TkpCreateNativeBitmap(display, source) None
00199 #define TkpGetNativeAppBitmap(display, name, w, h) None
00200
00201
00202
00203
00204
00205 #define TkpPrintWindowId(buf,w) \
00206 sprintf((buf), "0x%x", (unsigned int) (w))
00207
00208
00209
00210
00211
00212 #define TkpScanWindowId(i,s,wp) \
00213 Tcl_GetInt((i),(s),(wp))
00214
00215
00216
00217
00218
00219
00220 #define ALWAYS_SHOW_SELECTION
00221
00222
00223
00224
00225
00226
00227 #ifndef _TCLINT
00228 #include <tclInt.h>
00229 #endif
00230
00231 #endif