Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / nsplugins / sdk / obsolete / protypes.h
blob2817f50d6deea6365eb413452ae7919c5fb33a47
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * The contents of this file are subject to the Mozilla Public
4 * License Version 1.1 (the "License"); you may not use this file
5 * except in compliance with the License. You may obtain a copy of
6 * the License at http://www.mozilla.org/MPL/
7 *
8 * Software distributed under the License is distributed on an "AS
9 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10 * implied. See the License for the specific language governing
11 * rights and limitations under the License.
13 * The Original Code is the Netscape Portable Runtime (NSPR).
15 * The Initial Developer of the Original Code is Netscape
16 * Communications Corporation. Portions created by Netscape are
17 * Copyright (C) 1998-2000 Netscape Communications Corporation. All
18 * Rights Reserved.
20 * Contributor(s):
22 * Alternatively, the contents of this file may be used under the
23 * terms of the GNU General Public License Version 2 or later (the
24 * "GPL"), in which case the provisions of the GPL are applicable
25 * instead of those above. If you wish to allow use of your
26 * version of this file only under the terms of the GPL and not to
27 * allow others to use your version of this file under the MPL,
28 * indicate your decision by deleting the provisions above and
29 * replace them with the notice and other provisions required by
30 * the GPL. If you do not delete the provisions above, a recipient
31 * may use your version of this file under either the MPL or the
32 * GPL.
36 * This header typedefs the old 'native' types to the new PR<type>s.
37 * These definitions are scheduled to be eliminated at the earliest
38 * possible time. The NSPR API is implemented and documented using
39 * the new definitions.
42 //krazy:excludeall=captruefalse
44 #ifndef NSPLUGIN_PROTYPES_H
45 #define NSPLUGIN_PROTYPES_H
47 typedef PRUintn uintn;
48 #ifndef _XP_Core_
49 typedef PRIntn intn;
50 #endif
53 * It is trickier to define uint, int8, uint8, int16, uint16,
54 * int32, uint32, int64, and uint64 because some of these int
55 * types are defined by standard header files on some platforms.
56 * Our strategy here is to include all such standard headers
57 * first, and then define these int types only if they are not
58 * defined by those standard headers.
62 * BeOS defines all the int types below in its standard header
63 * file SupportDefs.h.
65 #ifdef XP_BEOS
66 #include <support/SupportDefs.h>
67 #endif
70 * OpenVMS defines all the int types below in its standard
71 * header files ints.h and types.h.
73 #ifdef VMS
74 #include <ints.h>
75 #include <types.h>
76 #endif
79 * SVR4 typedef of uint is commonly found on UNIX machines.
81 * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
82 * defines the types int8, int16, int32, and int64.
84 #ifdef XP_UNIX
85 #include <sys/types.h>
86 #endif
88 /* model.h on HP-UX defines int8, int16, and int32. */
89 #ifdef HPUX
90 #include <model.h>
91 #endif
94 * uint
97 #if !defined(XP_BEOS) && !defined(VMS) \
98 && !defined(XP_UNIX) || defined(NTO)
99 typedef PRUintn uint;
100 #endif
103 * uint64
106 #if !defined(XP_BEOS) && !defined(VMS)
107 typedef PRUint64 uint64;
108 #endif
111 * uint32
114 #if !defined(XP_BEOS) && !defined(VMS)
115 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
116 typedef PRUint32 uint32;
117 #else
118 typedef unsigned long uint32;
119 #endif
120 #endif
123 * uint16
126 #if !defined(XP_BEOS) && !defined(VMS)
127 typedef PRUint16 uint16;
128 #endif
131 * uint8
134 #if !defined(XP_BEOS) && !defined(VMS)
135 typedef PRUint8 uint8;
136 #endif
139 * int64
142 #if !defined(XP_BEOS) && !defined(VMS) \
143 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
144 typedef PRInt64 int64;
145 #endif
148 * int32
151 #if !defined(XP_BEOS) && !defined(VMS) \
152 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
153 && !defined(HPUX)
154 #if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */
155 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
156 typedef PRInt32 int32;
157 #else
158 typedef long int32;
159 #endif
160 #endif
161 #endif
164 * int16
167 #if !defined(XP_BEOS) && !defined(VMS) \
168 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
169 && !defined(HPUX)
170 typedef PRInt16 int16;
171 #endif
174 * int8
177 #if !defined(XP_BEOS) && !defined(VMS) \
178 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
179 && !defined(HPUX)
180 typedef PRInt8 int8;
181 #endif
183 typedef PRFloat64 float64;
184 typedef PRUptrdiff uptrdiff_t;
185 typedef PRUword uprword_t;
186 typedef PRWord prword_t;
189 /* Re: prbit.h */
190 #define TEST_BIT PR_TEST_BIT
191 #define SET_BIT PR_SET_BIT
192 #define CLEAR_BIT PR_CLEAR_BIT
194 /* Re: prarena.h->plarena.h */
195 #define PRArena PLArena
196 #define PRArenaPool PLArenaPool
197 #define PRArenaStats PLArenaStats
198 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
199 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
200 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
201 #define PR_ARENA_GROW PL_ARENA_GROW
202 #define PR_ARENA_MARK PL_ARENA_MARK
203 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
204 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
205 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
206 #define PR_COUNT_ARENA PL_COUNT_ARENA
207 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
208 #define PR_InitArenaPool PL_InitArenaPool
209 #define PR_FreeArenaPool PL_FreeArenaPool
210 #define PR_FinishArenaPool PL_FinishArenaPool
211 #define PR_CompactArenaPool PL_CompactArenaPool
212 #define PR_ArenaFinish PL_ArenaFinish
213 #define PR_ArenaAllocate PL_ArenaAllocate
214 #define PR_ArenaGrow PL_ArenaGrow
215 #define PR_ArenaRelease PL_ArenaRelease
216 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
217 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
218 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
219 #define PR_ArenaCountRelease PL_ArenaCountRelease
220 #define PR_ArenaCountRetract PL_ArenaCountRetract
222 /* Re: prhash.h->plhash.h */
223 #define PRHashEntry PLHashEntry
224 #define PRHashTable PLHashTable
225 #define PRHashNumber PLHashNumber
226 #define PRHashFunction PLHashFunction
227 #define PRHashComparator PLHashComparator
228 #define PRHashEnumerator PLHashEnumerator
229 #define PRHashAllocOps PLHashAllocOps
230 #define PR_NewHashTable PL_NewHashTable
231 #define PR_HashTableDestroy PL_HashTableDestroy
232 #define PR_HashTableRawLookup PL_HashTableRawLookup
233 #define PR_HashTableRawAdd PL_HashTableRawAdd
234 #define PR_HashTableRawRemove PL_HashTableRawRemove
235 #define PR_HashTableAdd PL_HashTableAdd
236 #define PR_HashTableRemove PL_HashTableRemove
237 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
238 #define PR_HashTableLookup PL_HashTableLookup
239 #define PR_HashTableDump PL_HashTableDump
240 #define PR_HashString PL_HashString
241 #define PR_CompareStrings PL_CompareStrings
242 #define PR_CompareValues PL_CompareValues
244 #if defined(XP_MAC)
245 #ifndef TRUE /* Mac standard is lower case true */
246 #define TRUE 1
247 #endif
248 #ifndef FALSE /* Mac standard is lower case false */
249 #define FALSE 0
250 #endif
251 #endif
253 #endif /* NSPLUGIN_PROTYPES_H */