Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
4.2 KiB

  1. /*
  2. File: QD3DString.h
  3. Contains: Q3CString methods
  4. Version: Technology: Quickdraw 3D 1.6
  5. Release: QuickTime 7.3
  6. Copyright: (c) 2007 (c) 1995-1999 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://developer.apple.com/bugreporter/
  10. */
  11. #ifndef __QD3DSTRING__
  12. #define __QD3DSTRING__
  13. #ifndef __QD3D__
  14. #include <QD3D.h>
  15. #endif
  16. #if PRAGMA_ONCE
  17. #pragma once
  18. #endif
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #if PRAGMA_IMPORT
  23. #pragma import on
  24. #endif
  25. #if PRAGMA_STRUCT_ALIGN
  26. #pragma options align=power
  27. #elif PRAGMA_STRUCT_PACKPUSH
  28. #pragma pack(push, 2)
  29. #elif PRAGMA_STRUCT_PACK
  30. #pragma pack(2)
  31. #endif
  32. #if PRAGMA_ENUM_ALWAYSINT
  33. #if defined(__fourbyteints__) && !__fourbyteints__
  34. #define __QD3DSTRING__RESTORE_TWOBYTEINTS
  35. #pragma fourbyteints on
  36. #endif
  37. #pragma enumsalwaysint on
  38. #elif PRAGMA_ENUM_OPTIONS
  39. #pragma option enum=int
  40. #elif PRAGMA_ENUM_PACK
  41. #if __option(pack_enums)
  42. #define __QD3DSTRING__RESTORE_PACKED_ENUMS
  43. #pragma options(!pack_enums)
  44. #endif
  45. #endif
  46. /******************************************************************************
  47. ** **
  48. ** String Routines **
  49. ** **
  50. *****************************************************************************/
  51. #if CALL_NOT_IN_CARBON
  52. /*
  53. * Q3String_GetType()
  54. *
  55. * Availability:
  56. * Non-Carbon CFM: not available
  57. * CarbonLib: not available
  58. * Mac OS X: not available
  59. */
  60. EXTERN_API_C( TQ3ObjectType )
  61. Q3String_GetType(TQ3StringObject stringObj);
  62. /******************************************************************************
  63. ** **
  64. ** C String Routines **
  65. ** **
  66. *****************************************************************************/
  67. /*
  68. * Q3CString_New()
  69. *
  70. * Availability:
  71. * Non-Carbon CFM: not available
  72. * CarbonLib: not available
  73. * Mac OS X: not available
  74. */
  75. EXTERN_API_C( TQ3StringObject )
  76. Q3CString_New(const char * str);
  77. /*
  78. * Q3CString_GetLength()
  79. *
  80. * Availability:
  81. * Non-Carbon CFM: not available
  82. * CarbonLib: not available
  83. * Mac OS X: not available
  84. */
  85. EXTERN_API_C( TQ3Status )
  86. Q3CString_GetLength(
  87. TQ3StringObject stringObj,
  88. unsigned long * length);
  89. /*
  90. * Q3CString_SetString()
  91. *
  92. * Availability:
  93. * Non-Carbon CFM: not available
  94. * CarbonLib: not available
  95. * Mac OS X: not available
  96. */
  97. EXTERN_API_C( TQ3Status )
  98. Q3CString_SetString(
  99. TQ3StringObject stringObj,
  100. const char * str);
  101. #endif /* CALL_NOT_IN_CARBON */
  102. #if CALL_NOT_IN_CARBON
  103. /*
  104. * Q3CString_GetString()
  105. *
  106. * Availability:
  107. * Non-Carbon CFM: not available
  108. * CarbonLib: not available
  109. * Mac OS X: not available
  110. */
  111. EXTERN_API_C( TQ3Status )
  112. Q3CString_GetString(
  113. TQ3StringObject stringObj,
  114. char ** str);
  115. /*
  116. * Q3CString_EmptyData()
  117. *
  118. * Availability:
  119. * Non-Carbon CFM: not available
  120. * CarbonLib: not available
  121. * Mac OS X: not available
  122. */
  123. EXTERN_API_C( TQ3Status )
  124. Q3CString_EmptyData(char ** str);
  125. #endif /* CALL_NOT_IN_CARBON */
  126. #if PRAGMA_ENUM_ALWAYSINT
  127. #pragma enumsalwaysint reset
  128. #ifdef __QD3DSTRING__RESTORE_TWOBYTEINTS
  129. #pragma fourbyteints off
  130. #endif
  131. #elif PRAGMA_ENUM_OPTIONS
  132. #pragma option enum=reset
  133. #elif defined(__QD3DSTRING__RESTORE_PACKED_ENUMS)
  134. #pragma options(pack_enums)
  135. #endif
  136. #if PRAGMA_STRUCT_ALIGN
  137. #pragma options align=reset
  138. #elif PRAGMA_STRUCT_PACKPUSH
  139. #pragma pack(pop)
  140. #elif PRAGMA_STRUCT_PACK
  141. #pragma pack()
  142. #endif
  143. #ifdef PRAGMA_IMPORT_OFF
  144. #pragma import off
  145. #elif PRAGMA_IMPORT
  146. #pragma import reset
  147. #endif
  148. #ifdef __cplusplus
  149. }
  150. #endif
  151. #endif /* __QD3DSTRING__ */