ObjFW  Check-in [8a48cff63c]

Overview
Comment:Add OFTLSStreamImplementation to Amiga .library
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | amiga-library
Files: files | file ages | folders
SHA3-256: 8a48cff63c74a69aa0dff5b5bc8a3bff46f7594388fe529a60d4fca0fc2f2779
User & Date: js on 2023-08-30 15:02:14
Other Links: branch diff | manifest | tags
Context
2023-08-30
15:02
Add OFTLSStreamImplementation to Amiga .library Leaf check-in: 8a48cff63c user: js tags: amiga-library
14:51
Move constants for OFSystemInfo+NetworkInterfaces check-in: b97ba53612 user: js tags: amiga-library
Changes

Modified src/OFTLSStream.h from [f204428d75] to [1b138c67b4].

161
162
163
164
165
166
167

168




169
170
171
172
173
174
175
/**
 * @brief The implementation for OFTLSStream to use.
 *
 * This can be set to a class that is always used for OFTLSStream. This is
 * useful to either force a specific implementation or use one that ObjFW does
 * not know about.
 */

extern Class OFTLSStreamImplementation;





/**
 * @brief Returns a string description for the TLS stream error code.
 *
 * @param errorCode The error code to return the description for
 * @return A string description for the TLS stream error code
 */







>

>
>
>
>







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/**
 * @brief The implementation for OFTLSStream to use.
 *
 * This can be set to a class that is always used for OFTLSStream. This is
 * useful to either force a specific implementation or use one that ObjFW does
 * not know about.
 */
#ifndef OF_AMIGAOS
extern Class OFTLSStreamImplementation;
#else
extern Class _Nonnull *_Nullable OFTLSStreamImplementationRef(void);
# define OFTLSStreamImplementation (*OFTLSStreamImplementationRef())
#endif

/**
 * @brief Returns a string description for the TLS stream error code.
 *
 * @param errorCode The error code to return the description for
 * @return A string description for the TLS stream error code
 */

Modified src/OFTLSStream.m from [4de584ae09] to [3d2bc34baf].

24
25
26
27
28
29
30
31




32









33
34
35
36
37
38
39
@interface OFTLSStreamHandshakeDelegate: OFObject <OFTLSStreamDelegate>
{
@public
	bool _done;
	id _exception;
}
@end





Class OFTLSStreamImplementation = Nil;









static const OFRunLoopMode handshakeRunLoopMode =
    @"OFTLSStreamHandshakeRunLoopMode";

/*
 * References to exceptions. This is needed because they are only used by
 * subclasses that are in a different library.
 */








>
>
>
>

>
>
>
>
>
>
>
>
>







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
@interface OFTLSStreamHandshakeDelegate: OFObject <OFTLSStreamDelegate>
{
@public
	bool _done;
	id _exception;
}
@end

#ifdef OF_AMIGAOS
# undef OFTLSStreamImplementation
#endif

Class OFTLSStreamImplementation = Nil;

#ifdef OF_AMIGAOS
Class *
OFTLSStreamImplementationRef(void)
{
	return &OFTLSStreamImplementation;
}
#endif

static const OFRunLoopMode handshakeRunLoopMode =
    @"OFTLSStreamHandshakeRunLoopMode";

/*
 * References to exceptions. This is needed because they are only used by
 * subclasses that are in a different library.
 */

Modified src/amiga-funcarray.inc from [923d61f414] to [bd85bf3a37].

72
73
74
75
76
77
78

79
80
81
82
83
84
85
(CONST_APTR)glue_OFSocketAddressSetAppleTalkNetwork,
(CONST_APTR)glue_OFSocketAddressAppleTalkNetwork,
(CONST_APTR)glue_OFSocketAddressSetAppleTalkNode,
(CONST_APTR)glue_OFSocketAddressAppleTalkNode,
(CONST_APTR)glue_OFSocketAddressSetAppleTalkPort,
(CONST_APTR)glue_OFSocketAddressAppleTalkPort,
(CONST_APTR)glue_OFTLSStreamErrorCodeDescription,

(CONST_APTR)glue_OFStrPTime,
(CONST_APTR)glue_OFStringEncodingParseName,
(CONST_APTR)glue_OFStringEncodingName,
(CONST_APTR)glue_OFUTF16StringLength,
(CONST_APTR)glue_OFUTF32StringLength,
(CONST_APTR)glue_OFZIPArchiveEntryVersionToString,
(CONST_APTR)glue_OFZIPArchiveEntryCompressionMethodName,







>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
(CONST_APTR)glue_OFSocketAddressSetAppleTalkNetwork,
(CONST_APTR)glue_OFSocketAddressAppleTalkNetwork,
(CONST_APTR)glue_OFSocketAddressSetAppleTalkNode,
(CONST_APTR)glue_OFSocketAddressAppleTalkNode,
(CONST_APTR)glue_OFSocketAddressSetAppleTalkPort,
(CONST_APTR)glue_OFSocketAddressAppleTalkPort,
(CONST_APTR)glue_OFTLSStreamErrorCodeDescription,
(CONST_APTR)glue_OFTLSStreamImplementationRef,
(CONST_APTR)glue_OFStrPTime,
(CONST_APTR)glue_OFStringEncodingParseName,
(CONST_APTR)glue_OFStringEncodingName,
(CONST_APTR)glue_OFUTF16StringLength,
(CONST_APTR)glue_OFUTF32StringLength,
(CONST_APTR)glue_OFZIPArchiveEntryVersionToString,
(CONST_APTR)glue_OFZIPArchiveEntryCompressionMethodName,

Modified src/amiga-glue.h from [945e9dddfc] to [267e5b58f8].

102
103
104
105
106
107
108

109
110
111
112
113
114
115
extern void glue_OFSocketAddressSetAppleTalkNetwork PPC_PARAMS(OFSocketAddress *address, uint16_t network);
extern uint16_t glue_OFSocketAddressAppleTalkNetwork PPC_PARAMS(const OFSocketAddress *address);
extern void glue_OFSocketAddressSetAppleTalkNode PPC_PARAMS(OFSocketAddress *address, uint8_t node);
extern uint8_t glue_OFSocketAddressAppleTalkNode PPC_PARAMS(const OFSocketAddress *address);
extern void glue_OFSocketAddressSetAppleTalkPort PPC_PARAMS(OFSocketAddress *address, uint8_t port);
extern uint8_t glue_OFSocketAddressAppleTalkPort PPC_PARAMS(const OFSocketAddress *address);
extern OFString *glue_OFTLSStreamErrorCodeDescription PPC_PARAMS(OFTLSStreamErrorCode errorCode);

extern const char *_Nullable glue_OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz);
extern OFStringEncoding glue_OFStringEncodingParseName PPC_PARAMS(OFString *string);
extern OFString *_Nullable glue_OFStringEncodingName PPC_PARAMS(OFStringEncoding encoding);
extern size_t glue_OFUTF16StringLength PPC_PARAMS(const OFChar16 *string);
extern size_t glue_OFUTF32StringLength PPC_PARAMS(const OFChar32 *string);
extern OFString *_Nonnull glue_OFZIPArchiveEntryVersionToString PPC_PARAMS(uint16_t version);
extern OFString *_Nonnull glue_OFZIPArchiveEntryCompressionMethodName PPC_PARAMS(OFZIPArchiveEntryCompressionMethod compressionMethod);







>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
extern void glue_OFSocketAddressSetAppleTalkNetwork PPC_PARAMS(OFSocketAddress *address, uint16_t network);
extern uint16_t glue_OFSocketAddressAppleTalkNetwork PPC_PARAMS(const OFSocketAddress *address);
extern void glue_OFSocketAddressSetAppleTalkNode PPC_PARAMS(OFSocketAddress *address, uint8_t node);
extern uint8_t glue_OFSocketAddressAppleTalkNode PPC_PARAMS(const OFSocketAddress *address);
extern void glue_OFSocketAddressSetAppleTalkPort PPC_PARAMS(OFSocketAddress *address, uint8_t port);
extern uint8_t glue_OFSocketAddressAppleTalkPort PPC_PARAMS(const OFSocketAddress *address);
extern OFString *glue_OFTLSStreamErrorCodeDescription PPC_PARAMS(OFTLSStreamErrorCode errorCode);
extern Class _Nonnull *_Nullable glue_OFTLSStreamImplementationRef(void);
extern const char *_Nullable glue_OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz);
extern OFStringEncoding glue_OFStringEncodingParseName PPC_PARAMS(OFString *string);
extern OFString *_Nullable glue_OFStringEncodingName PPC_PARAMS(OFStringEncoding encoding);
extern size_t glue_OFUTF16StringLength PPC_PARAMS(const OFChar16 *string);
extern size_t glue_OFUTF32StringLength PPC_PARAMS(const OFChar32 *string);
extern OFString *_Nonnull glue_OFZIPArchiveEntryVersionToString PPC_PARAMS(uint16_t version);
extern OFString *_Nonnull glue_OFZIPArchiveEntryCompressionMethodName PPC_PARAMS(OFZIPArchiveEntryCompressionMethod compressionMethod);

Modified src/amiga-glue.m from [fee19f4e49] to [71598db593].

532
533
534
535
536
537
538






539
540
541
542
543
544
545
OFString * __saveds
glue_OFTLSStreamErrorCodeDescription PPC_PARAMS(OFTLSStreamErrorCode errorCode)
{
	M68K_ARG(OFTLSStreamErrorCode, errorCode, d0)

	return OFTLSStreamErrorCodeDescription(errorCode);
}







const char *_Nullable __saveds
glue_OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
	M68K_ARG(const char *, buffer, a0)
	M68K_ARG(const char *, format, a1)
	M68K_ARG(struct tm *, tm, a2)







>
>
>
>
>
>







532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
OFString * __saveds
glue_OFTLSStreamErrorCodeDescription PPC_PARAMS(OFTLSStreamErrorCode errorCode)
{
	M68K_ARG(OFTLSStreamErrorCode, errorCode, d0)

	return OFTLSStreamErrorCodeDescription(errorCode);
}

Class _Nonnull *_Nullable __saveds
glue_OFTLSStreamImplementationRef(void)
{
	return OFTLSStreamImplementationRef();
}

const char *_Nullable __saveds
glue_OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
	M68K_ARG(const char *, buffer, a0)
	M68K_ARG(const char *, format, a1)
	M68K_ARG(struct tm *, tm, a2)

Modified src/amiga-library.xml from [30dcb00c87] to [7343a4f13e].

222
223
224
225
226
227
228


229
230
231
232
233
234
235
  <function name='OFSocketAddressAppleTalkPort' return-type='uint8_t'>
    <argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
  </function>
  <include>OFTLSStream.h</include>
  <function name='OFTLSStreamErrorCodeDescription' return-type='OFString *'>
    <argument name='errorCode' type='OFTLSStreamErrorCode' m68k-reg='d0'/>
  </function>


  <!-- Only for tests. -->
  <include>OFStrPTime.h</include>
  <function name='OFStrPTime' return-type='const char *_Nullable'>
    <argument name='buffer' type='const char *' m68k-reg='a0'/>
    <argument name='format' type='const char *' m68k-reg='a1'/>
    <argument name='tm' type='struct tm *' m68k-reg='a2'/>
    <argument name='tz' type='int16_t *_Nullable' m68k-reg='a3'/>







>
>







222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
  <function name='OFSocketAddressAppleTalkPort' return-type='uint8_t'>
    <argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
  </function>
  <include>OFTLSStream.h</include>
  <function name='OFTLSStreamErrorCodeDescription' return-type='OFString *'>
    <argument name='errorCode' type='OFTLSStreamErrorCode' m68k-reg='d0'/>
  </function>
  <function name='OFTLSStreamImplementationRef'
            return-type='Class _Nonnull *_Nullable'/>
  <!-- Only for tests. -->
  <include>OFStrPTime.h</include>
  <function name='OFStrPTime' return-type='const char *_Nullable'>
    <argument name='buffer' type='const char *' m68k-reg='a0'/>
    <argument name='format' type='const char *' m68k-reg='a1'/>
    <argument name='tm' type='struct tm *' m68k-reg='a2'/>
    <argument name='tz' type='int16_t *_Nullable' m68k-reg='a3'/>

Modified src/linklib/linklib.m from [f7daaf212a] to [73ee29d98b].

1075
1076
1077
1078
1079
1080
1081

















1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *(*)(OFTLSStreamErrorCode))*(void **)(((uintptr_t)ObjFWBase) - 388))(errorCode);
#endif
}


















const char *_Nullable
OFStrPTime(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((const char *_Nullable (*)(const char *__asm__("a0"), const char *__asm__("a1"), struct tm *__asm__("a2"), int16_t *_Nullable __asm__("a3")))(((uintptr_t)ObjFWBase) - 396))(buffer, format, tm, tz);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((const char *_Nullable (*)(const char *, const char *, struct tm *, int16_t *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 394))(buffer, format, tm, tz);
#endif
}

OFStringEncoding
OFStringEncodingParseName(OFString *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFStringEncoding (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 402))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFStringEncoding (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 400))(string);
#endif
}

OFString *_Nullable
OFStringEncodingName(OFStringEncoding encoding)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nullable (*)(OFStringEncoding __asm__("d0")))(((uintptr_t)ObjFWBase) - 408))(encoding);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nullable (*)(OFStringEncoding))*(void **)(((uintptr_t)ObjFWBase) - 406))(encoding);
#endif
}

size_t
OFUTF16StringLength(const OFChar16 *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const OFChar16 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 414))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar16 *))*(void **)(((uintptr_t)ObjFWBase) - 412))(string);
#endif
}

size_t
OFUTF32StringLength(const OFChar32 *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const OFChar32 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 420))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar32 *))*(void **)(((uintptr_t)ObjFWBase) - 418))(string);
#endif
}

OFString *_Nonnull
OFZIPArchiveEntryVersionToString(uint16_t version)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 426))(version);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 424))(version);
#endif
}

OFString *_Nonnull
OFZIPArchiveEntryCompressionMethodName(OFZIPArchiveEntryCompressionMethod compressionMethod)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod __asm__("d0")))(((uintptr_t)ObjFWBase) - 432))(compressionMethod);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod))*(void **)(((uintptr_t)ObjFWBase) - 430))(compressionMethod);
#endif
}

size_t
OFZIPArchiveEntryExtraFieldFind(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(OFData *__asm__("a0"), OFZIPArchiveEntryExtraFieldTag __asm__("d0"), uint16_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 438))(extraField, tag, size);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(OFData *, OFZIPArchiveEntryExtraFieldTag, uint16_t *))*(void **)(((uintptr_t)ObjFWBase) - 436))(extraField, tag, size);
#endif
}







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







|






|









|






|









|






|









|






|









|






|









|






|









|






|









|






|


1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *(*)(OFTLSStreamErrorCode))*(void **)(((uintptr_t)ObjFWBase) - 388))(errorCode);
#endif
}

Class _Nonnull *_Nullable
OFTLSStreamImplementationRef()
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((Class _Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 396))();
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((Class _Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 394))();
#endif
}

const char *_Nullable
OFStrPTime(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((const char *_Nullable (*)(const char *__asm__("a0"), const char *__asm__("a1"), struct tm *__asm__("a2"), int16_t *_Nullable __asm__("a3")))(((uintptr_t)ObjFWBase) - 402))(buffer, format, tm, tz);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((const char *_Nullable (*)(const char *, const char *, struct tm *, int16_t *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 400))(buffer, format, tm, tz);
#endif
}

OFStringEncoding
OFStringEncodingParseName(OFString *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFStringEncoding (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 408))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFStringEncoding (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 406))(string);
#endif
}

OFString *_Nullable
OFStringEncodingName(OFStringEncoding encoding)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nullable (*)(OFStringEncoding __asm__("d0")))(((uintptr_t)ObjFWBase) - 414))(encoding);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nullable (*)(OFStringEncoding))*(void **)(((uintptr_t)ObjFWBase) - 412))(encoding);
#endif
}

size_t
OFUTF16StringLength(const OFChar16 *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const OFChar16 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 420))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar16 *))*(void **)(((uintptr_t)ObjFWBase) - 418))(string);
#endif
}

size_t
OFUTF32StringLength(const OFChar32 *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const OFChar32 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 426))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar32 *))*(void **)(((uintptr_t)ObjFWBase) - 424))(string);
#endif
}

OFString *_Nonnull
OFZIPArchiveEntryVersionToString(uint16_t version)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 432))(version);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 430))(version);
#endif
}

OFString *_Nonnull
OFZIPArchiveEntryCompressionMethodName(OFZIPArchiveEntryCompressionMethod compressionMethod)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod __asm__("d0")))(((uintptr_t)ObjFWBase) - 438))(compressionMethod);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod))*(void **)(((uintptr_t)ObjFWBase) - 436))(compressionMethod);
#endif
}

size_t
OFZIPArchiveEntryExtraFieldFind(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(OFData *__asm__("a0"), OFZIPArchiveEntryExtraFieldTag __asm__("d0"), uint16_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 444))(extraField, tag, size);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(OFData *, OFZIPArchiveEntryExtraFieldTag, uint16_t *))*(void **)(((uintptr_t)ObjFWBase) - 442))(extraField, tag, size);
#endif
}