home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nspr30-e.zip / nspr30-e / include / obsolete / protypes.h < prev    next >
C/C++ Source or Header  |  1998-11-02  |  6KB  |  177 lines

  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 Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  * 
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  * 
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /*
  20.  * This section typedefs the old 'native' types to the new PR<type>s.
  21.  * These definitions are scheduled to be eliminated at the earliest
  22.  * possible time. The NSPR API is implemented and documented using
  23.  * the new definitions.
  24.  */
  25.  
  26. #if !defined(PROTYPES_H)
  27. #define PROTYPES_H
  28.  
  29.  
  30. /* SVR4 typedef of uint is commonly found on UNIX machines. */
  31. #ifdef XP_UNIX
  32. #include <sys/types.h>
  33. #else
  34. typedef PRUintn uint;
  35. #endif
  36.  
  37. typedef PRUintn uintn;
  38. typedef PRUint64 uint64;
  39. #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2)
  40. typedef PRUint32 uint32;
  41. #else
  42. typedef unsigned long uint32;
  43. #endif
  44. typedef PRUint16 uint16;
  45. typedef PRUint8 uint8;
  46.  
  47. #ifndef _XP_Core_
  48. typedef PRIntn intn;
  49. #endif
  50.  
  51. /*
  52.  * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very
  53.  * common header file) defines the types int8, int16, int32, and int64.
  54.  * So we don't define these four types here to avoid conflicts in case
  55.  * the code also includes sys/types.h.
  56.  */
  57. #if defined(AIX4_3)
  58. #include <sys/inttypes.h>
  59. #else
  60. typedef PRInt64 int64;
  61.  
  62. /* /usr/include/model.h on HP-UX defines int8, int16, and int32 */
  63. #if defined(HPUX)
  64. #include <model.h>
  65. #else
  66. #if !defined(WIN32) || !defined(_WINSOCK2API_)  /* defines its own "int32" */
  67. #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2)
  68. typedef PRInt32 int32;
  69. #else
  70. typedef long int32;
  71. #endif
  72. #endif
  73. typedef PRInt16 int16;
  74. typedef PRInt8 int8;
  75. #endif /* HPUX */
  76. #endif /* AIX4_3 */
  77.  
  78. typedef PRFloat64 float64;
  79. typedef PRUptrdiff uptrdiff_t;
  80. typedef PRUword uprword_t;
  81. typedef PRWord prword_t;
  82.  
  83.  
  84. /* Re: prbit.h */
  85. #define TEST_BIT    PR_TEST_BIT
  86. #define SET_BIT        PR_SET_BIT
  87. #define CLEAR_BIT    PR_CLEAR_BIT
  88.  
  89. /* Re: prarena.h->plarena.h */
  90. #define PRArena PLArena
  91. #define PRArenaPool PLArenaPool
  92. #define PRArenaStats PLArenaStats
  93. #define PR_ARENA_ALIGN PL_ARENA_ALIGN
  94. #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
  95. #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
  96. #define PR_ARENA_GROW PL_ARENA_GROW
  97. #define PR_ARENA_MARK PL_ARENA_MARK
  98. #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
  99. #define PR_CLEAR_ARENA PL_CLEAR_ARENA
  100. #define PR_ARENA_RELEASE PL_ARENA_RELEASE
  101. #define PR_COUNT_ARENA PL_COUNT_ARENA
  102. #define PR_ARENA_DESTROY PL_ARENA_DESTROY
  103. #define PR_InitArenaPool PL_InitArenaPool
  104. #define PR_FreeArenaPool PL_FreeArenaPool
  105. #define PR_FinishArenaPool PL_FinishArenaPool
  106. #define PR_CompactArenaPool PL_CompactArenaPool
  107. #define PR_ArenaFinish PL_ArenaFinish
  108. #define PR_ArenaAllocate PL_ArenaAllocate
  109. #define PR_ArenaGrow PL_ArenaGrow
  110. #define PR_ArenaRelease PL_ArenaRelease
  111. #define PR_ArenaCountAllocation PL_ArenaCountAllocation
  112. #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
  113. #define PR_ArenaCountGrowth PL_ArenaCountGrowth
  114. #define PR_ArenaCountRelease PL_ArenaCountRelease
  115. #define PR_ArenaCountRetract PL_ArenaCountRetract
  116.  
  117. /* Re: prevent.h->plevent.h */
  118. #define PREvent PLEvent
  119. #define PREventQueue PLEventQueue
  120. #define PR_CreateEventQueue PL_CreateEventQueue
  121. #define PR_DestroyEventQueue PL_DestroyEventQueue
  122. #define PR_GetEventQueueMonitor PL_GetEventQueueMonitor
  123. #define PR_ENTER_EVENT_QUEUE_MONITOR PL_ENTER_EVENT_QUEUE_MONITOR
  124. #define PR_EXIT_EVENT_QUEUE_MONITOR PL_EXIT_EVENT_QUEUE_MONITOR
  125. #define PR_PostEvent PL_PostEvent
  126. #define PR_PostSynchronousEvent PL_PostSynchronousEvent
  127. #define PR_GetEvent PL_GetEvent
  128. #define PR_EventAvailable PL_EventAvailable
  129. #define PREventFunProc PLEventFunProc
  130. #define PR_MapEvents PL_MapEvents
  131. #define PR_RevokeEvents PL_RevokeEvents
  132. #define PR_ProcessPendingEvents PL_ProcessPendingEvents
  133. #define PR_WaitForEvent PL_WaitForEvent
  134. #define PR_EventLoop PL_EventLoop
  135. #define PR_GetEventQueueSelectFD PL_GetEventQueueSelectFD
  136. #define PRHandleEventProc PLHandleEventProc
  137. #define PRDestroyEventProc PLDestroyEventProc
  138. #define PR_InitEvent PL_InitEvent
  139. #define PR_GetEventOwner PL_GetEventOwner
  140. #define PR_HandleEvent PL_HandleEvent
  141. #define PR_DestroyEvent PL_DestroyEvent
  142. #define PR_DequeueEvent PL_DequeueEvent
  143. #define PR_GetMainEventQueue PL_GetMainEventQueue
  144.  
  145. /* Re: prhash.h->plhash.h */
  146. #define PRHashEntry PLHashEntry
  147. #define PRHashTable PLHashTable
  148. #define PRHashNumber PLHashNumber
  149. #define PRHashFunction PLHashFunction
  150. #define PRHashComparator PLHashComparator
  151. #define PRHashEnumerator PLHashEnumerator
  152. #define PRHashAllocOps PLHashAllocOps
  153. #define PR_NewHashTable PL_NewHashTable
  154. #define PR_HashTableDestroy PL_HashTableDestroy
  155. #define PR_HashTableRawLookup PL_HashTableRawLookup
  156. #define PR_HashTableRawAdd PL_HashTableRawAdd
  157. #define PR_HashTableRawRemove PL_HashTableRawRemove
  158. #define PR_HashTableAdd PL_HashTableAdd
  159. #define PR_HashTableRemove PL_HashTableRemove
  160. #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
  161. #define PR_HashTableLookup PL_HashTableLookup
  162. #define PR_HashTableDump PL_HashTableDump
  163. #define PR_HashString PL_HashString
  164. #define PR_CompareStrings PL_CompareStrings
  165. #define PR_CompareValues PL_CompareValues
  166.  
  167. #if defined(XP_MAC)
  168. #ifndef TRUE                /* Mac standard is lower case true */
  169.     #define TRUE 1
  170. #endif
  171. #ifndef FALSE                /* Mac standard is lower case false */
  172.     #define FALSE 0
  173. #endif
  174. #endif
  175.  
  176. #endif /* !defined(PROTYPES_H) */
  177.