summaryrefslogtreecommitdiffstats
path: root/generic/tclPlatDecls.h
blob: 3ef035ac0800b2c0e0c4f26989e5afc3b290d481 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

/* !BEGIN!: Do not edit below this line. */

/*
 * Exported function declarations:
 */

#if !defined(__WIN32__) && !defined(MAC_TCL)
/* 0 */
EXTERN void		Tcl_CreateFileHandler _ANSI_ARGS_((int fd, int mask, 
				Tcl_FileProc * proc, ClientData clientData));
/* 1 */
EXTERN void		Tcl_DeleteFileHandler _ANSI_ARGS_((int fd));
/* 2 */
EXTERN int		Tcl_GetOpenFile _ANSI_ARGS_((Tcl_Interp * interp, 
				char * string, int write, int checkUsage, 
				ClientData * filePtr));
#endif /* UNIX */

typedef struct TclPlatStubs {
    int magic;
    struct TclPlatStubHooks *hooks;

#if !defined(__WIN32__) && !defined(MAC_TCL)
    void (*tcl_CreateFileHandler) _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); /* 0 */
    void (*tcl_DeleteFileHandler) _ANSI_ARGS_((int fd)); /* 1 */
    int (*tcl_GetOpenFile) _ANSI_ARGS_((Tcl_Interp * interp, char * string, int write, int checkUsage, ClientData * filePtr)); /* 2 */
#endif /* UNIX */
} TclPlatStubs;

extern TclPlatStubs *tclPlatStubsPtr;

#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)

/*
 * Inline function declarations:
 */

#if !defined(__WIN32__) && !defined(MAC_TCL)
#ifndef Tcl_CreateFileHandler
#define Tcl_CreateFileHandler(fd, mask, proc, clientData) \
	(tclPlatStubsPtr->tcl_CreateFileHandler)(fd, mask, proc, clientData) /* 0 */
#endif
#ifndef Tcl_DeleteFileHandler
#define Tcl_DeleteFileHandler(fd) \
	(tclPlatStubsPtr->tcl_DeleteFileHandler)(fd) /* 1 */
#endif
#ifndef Tcl_GetOpenFile
#define Tcl_GetOpenFile(interp, string, write, checkUsage, filePtr) \
	(tclPlatStubsPtr->tcl_GetOpenFile)(interp, string, write, checkUsage, filePtr) /* 2 */
#endif
#endif /* UNIX */

#endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */

/* !END!: Do not edit above this line. */