summaryrefslogtreecommitdiffstats
path: root/generic/tclIntPlatDecls.h
blob: 35d5b95d6deeda4d47810af007b77f8117aa674c (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*
 * tclIntPlatDecls.h --
 *
 *	This file contains the declarations for all platform dependent
 *	unsupported functions that are exported by the Tcl library.  These
 *	interfaces are not guaranteed to remain the same between
 *	versions.  Use at your own risk.
 *
 * Copyright (c) 1998-1999 by Scriptics Corporation.
 * All rights reserved.
 *
 * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.1 1999/03/03 00:38:41 stanton Exp $
 */

#ifndef _TCLINTPLATDECLS
#define _TCLINTPLATDECLS

/*
 * WARNING: This file is automatically generated by the tools/genStubs.tcl
 * script.  Any modifications to the function declarations below should be made
 * in the generic/tclInt.decls script.
 */

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

/*
 * Exported function declarations:
 */

#ifdef __WIN32__
/* 0 */
EXTERN void		TclWinConvertError _ANSI_ARGS_((DWORD errCode));
/* 1 */
EXTERN void		TclWinConvertWSAError _ANSI_ARGS_((DWORD errCode));
/* 2 */
EXTERN struct servent *	 TclWinGetServByName _ANSI_ARGS_((const char * nm, 
				const char * proto));
/* 3 */
EXTERN int		TclWinGetSockOpt _ANSI_ARGS_((SOCKET s, int level, 
				int optname, char FAR * optval, 
				int FAR * optlen));
/* 4 */
EXTERN HINSTANCE	TclWinGetTclInstance _ANSI_ARGS_((void));
/* 5 */
EXTERN HINSTANCE	TclWinLoadLibrary _ANSI_ARGS_((char * name));
/* 6 */
EXTERN u_short		TclWinNToHS _ANSI_ARGS_((u_short ns));
/* 7 */
EXTERN int		TclWinSetSockOpt _ANSI_ARGS_((SOCKET s, int level, 
				int optname, const char FAR * optval, 
				int optlen));
#endif /* __WIN32__ */
#ifdef MAC_TCL
/* 0 */
EXTERN int		TclpCheckStackSpace _ANSI_ARGS_((void));
/* 1 */
EXTERN VOID *		TclpSysAlloc _ANSI_ARGS_((long size, int isBin));
/* 2 */
EXTERN void		TclpSysFree _ANSI_ARGS_((VOID * ptr));
/* 3 */
EXTERN VOID *		TclpSysRealloc _ANSI_ARGS_((VOID * cp, 
				unsigned int size));
/* 4 */
EXTERN void		TclPlatformExit _ANSI_ARGS_((int status));
#endif /* MAC_TCL */

typedef struct TclIntPlatStubs {
    int magic;
    struct TclIntPlatStubHooks *hooks;

#ifdef __WIN32__
    void (*tclWinConvertError) _ANSI_ARGS_((DWORD errCode)); /* 0 */
    void (*tclWinConvertWSAError) _ANSI_ARGS_((DWORD errCode)); /* 1 */
    struct servent * (*tclWinGetServByName) _ANSI_ARGS_((const char * nm, const char * proto)); /* 2 */
    int (*tclWinGetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, char FAR * optval, int FAR * optlen)); /* 3 */
    HINSTANCE (*tclWinGetTclInstance) _ANSI_ARGS_((void)); /* 4 */
    HINSTANCE (*tclWinLoadLibrary) _ANSI_ARGS_((char * name)); /* 5 */
    u_short (*tclWinNToHS) _ANSI_ARGS_((u_short ns)); /* 6 */
    int (*tclWinSetSockOpt) _ANSI_ARGS_((SOCKET s, int level, int optname, const char FAR * optval, int optlen)); /* 7 */
#endif /* __WIN32__ */
#ifdef MAC_TCL
    int (*tclpCheckStackSpace) _ANSI_ARGS_((void)); /* 0 */
    VOID * (*tclpSysAlloc) _ANSI_ARGS_((long size, int isBin)); /* 1 */
    void (*tclpSysFree) _ANSI_ARGS_((VOID * ptr)); /* 2 */
    VOID * (*tclpSysRealloc) _ANSI_ARGS_((VOID * cp, unsigned int size)); /* 3 */
    void (*tclPlatformExit) _ANSI_ARGS_((int status)); /* 4 */
#endif /* MAC_TCL */
} TclIntPlatStubs;

extern TclIntPlatStubs *tclIntPlatStubsPtr;

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

/*
 * Inline function declarations:
 */

#ifdef __WIN32__
#ifndef TclWinConvertError
#define TclWinConvertError(errCode) \
	(tclIntPlatStubsPtr->tclWinConvertError)(errCode) /* 0 */
#endif
#ifndef TclWinConvertWSAError
#define TclWinConvertWSAError(errCode) \
	(tclIntPlatStubsPtr->tclWinConvertWSAError)(errCode) /* 1 */
#endif
#ifndef TclWinGetServByName
#define TclWinGetServByName(nm, proto) \
	(tclIntPlatStubsPtr->tclWinGetServByName)(nm, proto) /* 2 */
#endif
#ifndef TclWinGetSockOpt
#define TclWinGetSockOpt(s, level, optname, optval, optlen) \
	(tclIntPlatStubsPtr->tclWinGetSockOpt)(s, level, optname, optval, optlen) /* 3 */
#endif
#ifndef TclWinGetTclInstance
#define TclWinGetTclInstance() \
	(tclIntPlatStubsPtr->tclWinGetTclInstance)() /* 4 */
#endif
#ifndef TclWinLoadLibrary
#define TclWinLoadLibrary(name) \
	(tclIntPlatStubsPtr->tclWinLoadLibrary)(name) /* 5 */
#endif
#ifndef TclWinNToHS
#define TclWinNToHS(ns) \
	(tclIntPlatStubsPtr->tclWinNToHS)(ns) /* 6 */
#endif
#ifndef TclWinSetSockOpt
#define TclWinSetSockOpt(s, level, optname, optval, optlen) \
	(tclIntPlatStubsPtr->tclWinSetSockOpt)(s, level, optname, optval, optlen) /* 7 */
#endif
#endif /* __WIN32__ */
#ifdef MAC_TCL
#ifndef TclpCheckStackSpace
#define TclpCheckStackSpace() \
	(tclIntPlatStubsPtr->tclpCheckStackSpace)() /* 0 */
#endif
#ifndef TclpSysAlloc
#define TclpSysAlloc(size, isBin) \
	(tclIntPlatStubsPtr->tclpSysAlloc)(size, isBin) /* 1 */
#endif
#ifndef TclpSysFree
#define TclpSysFree(ptr) \
	(tclIntPlatStubsPtr->tclpSysFree)(ptr) /* 2 */
#endif
#ifndef TclpSysRealloc
#define TclpSysRealloc(cp, size) \
	(tclIntPlatStubsPtr->tclpSysRealloc)(cp, size) /* 3 */
#endif
#ifndef TclPlatformExit
#define TclPlatformExit(status) \
	(tclIntPlatStubsPtr->tclPlatformExit)(status) /* 4 */
#endif
#endif /* MAC_TCL */

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

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

#endif /* _TCLINTPLATDECLS */