ObjFW  Check-in [1ec05804b0]

Overview
Comment:Add all functions to linklib

Also contains a workaround for Amiga library functions not being able to
return structs.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: 1ec05804b05d0627f95e92e6f874e33cb99df196805e82cb65a5e0889f28a485
User & Date: js on 2020-06-20 21:54:52
Other Links: branch diff | manifest | tags
Context
2020-06-20
22:57
linklib: Add __objc_class_name_* for all classes check-in: c6b4d71087 user: js tags: amiga-library
21:54
Add all functions to linklib check-in: 1ec05804b0 user: js tags: amiga-library
17:20
Add Amiga library glue for all functions check-in: 4aa3be08a9 user: js tags: amiga-library
Changes

Modified src/amiga-glue.m from [c40fe5f0d2] to [316cef8c1f].

186
187
188
189
190
191
192
193
194



195

196

197
198
199

200
201
202
203



204

205

206
207
208

209
210
211
212



213

214

215
216
217

218
219
220
221
222



223

224

225
226
227
228

229
230
231
232
233
234
235
186
187
188
189
190
191
192


193
194
195
196
197

198
199
200

201
202
203


204
205
206
207
208

209
210
211

212
213
214


215
216
217
218
219

220
221
222

223
224
225



226
227
228
229
230

231
232
233
234

235
236
237
238
239
240
241
242







-
-
+
+
+

+
-
+


-
+


-
-
+
+
+

+
-
+


-
+


-
-
+
+
+

+
-
+


-
+


-
-
-
+
+
+

+
-
+



-
+







	M68K_ARG(size_t, keyLength, d5)
	M68K_ARG(bool, allowsSwappableMemory, d6)

	of_scrypt(blockSize, costFactor, parallelization, salt, saltLength,
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

of_socket_address_t __saveds
glue_of_socket_address_parse_ip PPC_PARAMS(OFString *IP, uint16_t port)
void __saveds
glue_of_socket_address_parse_ip PPC_PARAMS(of_socket_address_t *address,
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(uint16_t, port, d0)

	return of_socket_address_parse_ip(IP, port);
	*address = of_socket_address_parse_ip(IP, port);
}

of_socket_address_t __saveds
glue_of_socket_address_parse_ipv4 PPC_PARAMS(OFString *IP, uint16_t port)
void __saveds
glue_of_socket_address_parse_ipv4 PPC_PARAMS(of_socket_address_t *address,
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(uint16_t, port, d0)

	return of_socket_address_parse_ipv4(IP, port);
	*address = of_socket_address_parse_ipv4(IP, port);
}

of_socket_address_t __saveds
glue_of_socket_address_parse_ipv6 PPC_PARAMS(OFString *IP, uint16_t port)
void __saveds
glue_of_socket_address_parse_ipv6 PPC_PARAMS(of_socket_address_t *address,
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(uint16_t, port, d0)

	return of_socket_address_parse_ipv6(IP, port);
	*address = of_socket_address_parse_ipv6(IP, port);
}

of_socket_address_t __saveds
glue_of_socket_address_ipx PPC_PARAMS(const unsigned char *node,
    uint32_t network, uint16_t port)
void __saveds
glue_of_socket_address_ipx PPC_PARAMS(of_socket_address_t *address,
    const unsigned char *node, uint32_t network, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(const unsigned char *, node, a0)
	M68K_ARG(const unsigned char *, node, a1)
	M68K_ARG(uint32_t, network, d0)
	M68K_ARG(uint16_t, port, d1)

	return of_socket_address_ipx(node, network, port);
	*address = of_socket_address_ipx(node, network, port);
}

bool __saveds
glue_of_socket_address_equal PPC_PARAMS(const of_socket_address_t *address1,
    const of_socket_address_t *address2)
{
	M68K_ARG(const of_socket_address_t *, address1, a0)

Modified src/amigaos3.sfd from [ad47ddf47b] to [e93919c0b0].

13
14
15
16
17
18
19
20
21
22
23




24
25
26
27
28
29
30
13
14
15
16
17
18
19




20
21
22
23
24
25
26
27
28
29
30







-
-
-
-
+
+
+
+







size_t glue_of_alignof_type_encoding(const char *type)(a0)
void glue_of_logv(OFConstantString *format, va_list arguments)(a0,a1)
OFString *_Nonnull glue_of_zip_archive_entry_version_to_string(uint16_t version)(d0)
OFString *_Nonnull glue_of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod)(d0)
size_t glue_of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size)(a0,d0,a1)
void glue_of_pbkdf2(OFHMAC *HMAC, size_t iterations, const unsigned char *salt, size_t saltLength, const char *password, size_t passwordLength, unsigned char *key, size_t keyLength, bool allowsSwappableMemory)(a0,d0,a1,d1,a2,d2,a3,d3,d4)
void glue_of_scrypt(size_t blockSize, size_t costFactor, size_t parallelization, const unsigned char *salt, size_t saltLength, const char *password, size_t passwordLength, unsigned char *key, size_t keyLength, bool allowsSwappableMemory)(d0,d1,d2,a0,d3,a1,d4,a2,d5,d6)
of_socket_address_t glue_of_socket_address_parse_ip(OFString *IP, uint16_t port)(a0,d0)
of_socket_address_t glue_of_socket_address_parse_ipv4(OFString *IP, uint16_t port)(a0,d0)
of_socket_address_t glue_of_socket_address_parse_ipv6(OFString *IP, uint16_t port)(a0,d0)
of_socket_address_t glue_of_socket_address_ipx(const unsigned char *_Nonnull node, uint32_t network, uint16_t port)(a0,d0,d1)
void glue_of_socket_address_parse_ip(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_parse_ipv4(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_parse_ipv6(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0)
void glue_of_socket_address_ipx(of_socket_address_t *_Nonnull address, const unsigned char *_Nonnull node, uint32_t network, uint16_t port)(a0,a1,d0,d1)
bool glue_of_socket_address_equal(const of_socket_address_t *_Nonnull address1, const of_socket_address_t *_Nonnull address2)(a0,a1)
uint32_t glue_of_socket_address_hash(const of_socket_address_t *_Nonnull address)(a0)
OFString *_Nonnull glue_of_socket_address_ip_string(const of_socket_address_t *_Nonnull address, uint16_t *_Nullable port)(a0,a1)
void glue_of_socket_address_set_port(of_socket_address_t *_Nonnull address, uint16_t port)(a0,d0)
uint16_t glue_of_socket_address_get_port(const of_socket_address_t *_Nonnull address)(a0)
void glue_of_socket_address_set_ipx_network(of_socket_address_t *_Nonnull address, uint32_t network)(a0,d0)
uint32_t glue_of_socket_address_get_ipx_network(const of_socket_address_t *_Nonnull address)(a0)

Modified src/linklib/linklib.m from [c9930b8ec0] to [35f4fabad7].

158
159
160
161
162
163
164





















































































































































































158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

DESTRUCTOR_P(ObjFW, 4000)
{
	dtor();
}
#endif

int
of_application_main(int *argc, char ***argv,
    id <OFApplicationDelegate> delegate)
{
	return glue_of_application_main(argc, argv, delegate);
}

const char *
of_http_request_method_to_string(of_http_request_method_t method)
{
	return glue_of_http_request_method_to_string(method);
}

of_http_request_method_t
of_http_request_method_from_string(OFString *string)
{
	return glue_of_http_request_method_from_string(string);
}

OFString *
of_http_status_code_to_string(short code)
{
	return glue_of_http_status_code_to_string(code);
}

size_t
of_sizeof_type_encoding(const char *type)
{
	return glue_of_sizeof_type_encoding(type);
}

size_t
of_alignof_type_encoding(const char *type)
{
	return glue_of_alignof_type_encoding(type);
}

void
of_logv(OFConstantString *format, va_list arguments)
{
	glue_of_logv(format, arguments);
}

OFString *
of_zip_archive_entry_version_to_string(uint16_t version)
{
	return glue_of_zip_archive_entry_version_to_string(version);
}

OFString *
of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod)
{
	return glue_of_zip_archive_entry_compression_method_to_string(
	    compressionMethod);
}

size_t
of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag,
    uint16_t *size)
{
	return glue_of_zip_archive_entry_extra_field_find(
	    extraField, tag, size);
}

void
of_pbkdf2(OFHMAC *HMAC, size_t iterations, const unsigned char *salt,
    size_t saltLength, const char *password, size_t passwordLength,
    unsigned char *key, size_t keyLength, bool allowsSwappableMemory)
{
	glue_of_pbkdf2(HMAC, iterations, salt, saltLength,
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

void
of_scrypt(size_t blockSize, size_t costFactor, size_t parallelization,
    const unsigned char *salt, size_t saltLength, const char *password,
    size_t passwordLength, unsigned char *key, size_t keyLength,
    bool allowsSwappableMemory)
{
	glue_of_scrypt(blockSize, costFactor, parallelization, salt, saltLength,
	    password, passwordLength, key, keyLength, allowsSwappableMemory);
}

of_socket_address_t
of_socket_address_parse_ip(OFString *IP, uint16_t port)
{
	of_socket_address_t address;

	glue_of_socket_address_parse_ip(&address, IP, port);

	return address;
}

of_socket_address_t
of_socket_address_parse_ipv4(OFString *IP, uint16_t port)
{
	of_socket_address_t address;

	glue_of_socket_address_parse_ipv4(&address, IP, port);

	return address;
}

of_socket_address_t
of_socket_address_parse_ipv6(OFString *IP, uint16_t port)
{
	of_socket_address_t address;

	glue_of_socket_address_parse_ipv6(&address, IP, port);

	return address;
}

of_socket_address_t
of_socket_address_ipx(const unsigned char *node, uint32_t network,
    uint16_t port)
{
	of_socket_address_t address;

	glue_of_socket_address_ipx(&address, node, network, port);

	return address;
}

bool
of_socket_address_equal(const of_socket_address_t *address1,
    const of_socket_address_t *address2)
{
	return glue_of_socket_address_equal(address1, address2);
}

uint32_t
of_socket_address_hash(const of_socket_address_t *address)
{
	return glue_of_socket_address_hash(address);
}

OFString *
of_socket_address_ip_string(const of_socket_address_t *address, uint16_t *port)
{
	return glue_of_socket_address_ip_string(address, port);
}

void
of_socket_address_set_port(of_socket_address_t *address, uint16_t port)
{
	glue_of_socket_address_set_port(address, port);
}

uint16_t
of_socket_address_get_port(const of_socket_address_t *address)
{
	return glue_of_socket_address_get_port(address);
}

void
of_socket_address_set_ipx_network(of_socket_address_t *address,
    uint32_t network)
{
	glue_of_socket_address_set_ipx_network(address, network);
}

uint32_t
of_socket_address_get_ipx_network(const of_socket_address_t *address)
{
	return glue_of_socket_address_get_ipx_network(address);
}

void
of_socket_address_set_ipx_node(of_socket_address_t *address,
    const unsigned char *node)
{
	glue_of_socket_address_set_ipx_node(address, node);
}

void
of_socket_address_get_ipx_node(const of_socket_address_t *address,
    unsigned char *node)
{
	glue_of_socket_address_get_ipx_node(address, node);
}