Overview
Comment: | Add Amiga library glue for all functions |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | amiga-library |
Files: | files | file ages | folders |
SHA3-256: |
4aa3be08a9627d72b58f4c8a7217fe03 |
User & Date: | js on 2020-06-20 17:20:08 |
Other Links: | branch diff | manifest | tags |
Context
2020-06-20
| ||
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 | |
16:38 | OFStdIOStream: Add of_logv() check-in: 343501981b user: js tags: amiga-library | |
Changes
Modified src/amiga-glue.m from [c28d6d3ae5] to [c40fe5f0d2].
︙ | ︙ | |||
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "amiga-library.h" #import "platform.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) # define M68K_ARG OF_M68K_ARG #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) | > > > > > > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFApplication.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFMethodSignature.h" #import "OFStdIOStream.h" #import "OFZIPArchiveEntry.h" #import "amiga-library.h" #import "pbkdf2.h" #import "platform.h" #import "scrypt.h" #import "socket.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) # define M68K_ARG OF_M68K_ARG #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) |
︙ | ︙ | |||
44 45 46 47 48 49 50 | { M68K_ARG(unsigned int, version, d0) M68K_ARG(struct of_libc *, libc, a0) M68K_ARG(FILE **, sF, a1) return of_init(version, libc, sF); } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 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 | { M68K_ARG(unsigned int, version, d0) M68K_ARG(struct of_libc *, libc, a0) M68K_ARG(FILE **, sF, a1) return of_init(version, libc, sF); } int __saveds glue_of_application_main PPC_PARAMS(int *argc, char ***argv, id <OFApplicationDelegate> delegate) { M68K_ARG(int *, argc, a0) M68K_ARG(char ***, argv, a1) M68K_ARG(id <OFApplicationDelegate>, delegate, a2) return of_application_main(argc, argv, delegate); } const char *__saveds glue_of_http_request_method_to_string PPC_PARAMS( of_http_request_method_t method) { M68K_ARG(of_http_request_method_t, method, d0) return of_http_request_method_to_string(method); } of_http_request_method_t __saveds glue_of_http_request_method_from_string PPC_PARAMS(OFString *string) { M68K_ARG(OFString *, string, a0) return of_http_request_method_from_string(string); } OFString *__saveds glue_of_http_status_code_to_string PPC_PARAMS(short code) { M68K_ARG(short, code, d0) return of_http_status_code_to_string(code); } size_t __saveds glue_of_sizeof_type_encoding PPC_PARAMS(const char *type) { M68K_ARG(const char *, type, a0) return of_sizeof_type_encoding(type); } size_t __saveds glue_of_alignof_type_encoding PPC_PARAMS(const char *type) { M68K_ARG(const char *, type, a0) return of_alignof_type_encoding(type); } void __saveds glue_of_logv PPC_PARAMS(OFConstantString *format, va_list arguments) { M68K_ARG(OFConstantString *, format, a0) M68K_ARG(va_list, arguments, a1) of_logv(format, arguments); } OFString *__saveds glue_of_zip_archive_entry_version_to_string PPC_PARAMS(uint16_t version) { M68K_ARG(uint16_t, version, d0) return of_zip_archive_entry_version_to_string(version); } OFString *__saveds glue_of_zip_archive_entry_compression_method_to_string PPC_PARAMS( uint16_t compressionMethod) { M68K_ARG(uint16_t, compressionMethod, d0) return of_zip_archive_entry_compression_method_to_string( compressionMethod); } size_t __saveds glue_of_zip_archive_entry_extra_field_find PPC_PARAMS(OFData *extraField, uint16_t tag, uint16_t *size) { M68K_ARG(OFData *, extraField, a0) M68K_ARG(uint16_t, tag, d0) M68K_ARG(uint16_t *, size, a1) return of_zip_archive_entry_extra_field_find(extraField, tag, size); } void __saveds glue_of_pbkdf2 PPC_PARAMS(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) { M68K_ARG(OFHMAC *, HMAC, a0) M68K_ARG(size_t, iterations, d0) M68K_ARG(const unsigned char *, salt, a1) M68K_ARG(size_t, saltLength, d1) M68K_ARG(const char *, password, a2) M68K_ARG(size_t, passwordLength, d2) M68K_ARG(unsigned char *, key, a3) M68K_ARG(size_t, keyLength, d3) M68K_ARG(bool, allowsSwappableMemory, d4) of_pbkdf2(HMAC, iterations, salt, saltLength, password, passwordLength, key, keyLength, allowsSwappableMemory); } void __saveds glue_of_scrypt PPC_PARAMS(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) { M68K_ARG(size_t, blockSize, d0) M68K_ARG(size_t, costFactor, d1) M68K_ARG(size_t, parallelization, d2) M68K_ARG(const unsigned char *, salt, a0) M68K_ARG(size_t, saltLength, d3) M68K_ARG(const char *, password, a1) M68K_ARG(size_t, passwordLength, d4) M68K_ARG(unsigned char *, key, a2) 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) { M68K_ARG(OFString *, IP, a0) M68K_ARG(uint16_t, port, d0) return 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) { M68K_ARG(OFString *, IP, a0) M68K_ARG(uint16_t, port, d0) return 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) { M68K_ARG(OFString *, IP, a0) M68K_ARG(uint16_t, port, d0) return 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) { M68K_ARG(const unsigned char *, node, a0) M68K_ARG(uint32_t, network, d0) M68K_ARG(uint16_t, port, d1) return 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) M68K_ARG(const of_socket_address_t *, address2, a1) return of_socket_address_equal(address1, address2); } uint32_t __saveds glue_of_socket_address_hash PPC_PARAMS(const of_socket_address_t *address) { M68K_ARG(const of_socket_address_t *, address, a0) return of_socket_address_hash(address); } OFString *__saveds glue_of_socket_address_ip_string PPC_PARAMS(const of_socket_address_t *address, uint16_t *port) { M68K_ARG(const of_socket_address_t *, address, a0) M68K_ARG(uint16_t *, port, a1) return of_socket_address_ip_string(address, port); } void __saveds glue_of_socket_address_set_port PPC_PARAMS(of_socket_address_t *address, uint16_t port) { M68K_ARG(of_socket_address_t *, address, a0) M68K_ARG(uint16_t, port, d0) of_socket_address_set_port(address, port); } uint16_t __saveds glue_of_socket_address_get_port PPC_PARAMS(const of_socket_address_t *address) { M68K_ARG(const of_socket_address_t *, address, a0) return of_socket_address_get_port(address); } void __saveds glue_of_socket_address_set_ipx_network PPC_PARAMS(of_socket_address_t *address, uint32_t network) { M68K_ARG(of_socket_address_t *, address, a0) M68K_ARG(uint32_t, network, d0) of_socket_address_set_ipx_network(address, network); } uint32_t __saveds glue_of_socket_address_get_ipx_network PPC_PARAMS( const of_socket_address_t *address) { M68K_ARG(const of_socket_address_t *, address, a0) return of_socket_address_get_ipx_network(address); } void __saveds glue_of_socket_address_set_ipx_node PPC_PARAMS(of_socket_address_t *address, const unsigned char *node) { M68K_ARG(of_socket_address_t *, address, a0) M68K_ARG(const unsigned char *, node, a1) of_socket_address_set_ipx_node(address, node); } void __saveds glue_of_socket_address_get_ipx_node PPC_PARAMS( const of_socket_address_t *address, unsigned char *node) { M68K_ARG(const of_socket_address_t *, address, a0) M68K_ARG(unsigned char *, node, a1) of_socket_address_get_ipx_node(address, node); } |
Modified src/amiga-library.m from [10ce293790] to [4003025eaa].
︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include "config.h" #include <exec/libraries.h> #include <exec/nodes.h> #include <exec/resident.h> #include <proto/exec.h> #import "amiga-library.h" #import "macros.h" #define CONCAT_VERSION2(major, minor) #major "." #minor #define CONCAT_VERSION(major, minor) CONCAT_VERSION2(major, minor) #define VERSION_STRING CONCAT_VERSION(OBJFW_LIB_MAJOR, OBJFW_LIB_MINOR) #if defined(OF_AMIGAOS_M68K) # define DATA_OFFSET 0x7FFE | > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include "config.h" #include <exec/libraries.h> #include <exec/nodes.h> #include <exec/resident.h> #include <proto/exec.h> #import "OFString.h" #import "OFHTTPRequest.h" #import "amiga-library.h" #import "macros.h" #import "socket.h" #define CONCAT_VERSION2(major, minor) #major "." #minor #define CONCAT_VERSION(major, minor) CONCAT_VERSION2(major, minor) #define VERSION_STRING CONCAT_VERSION(OBJFW_LIB_MAJOR, OBJFW_LIB_MINOR) #if defined(OF_AMIGAOS_M68K) # define DATA_OFFSET 0x7FFE |
︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | extern const void *_EH_FRAME_BEGINS__; extern void *_EH_FRAME_OBJECTS__; extern void __register_frame_info(const void *, void *); extern void *__deregister_frame_info(const void *); #endif extern bool glue_of_init(void); #ifdef OF_AMIGAOS_M68K void __init_eh(void) { /* Taken care of by of_init() */ } | > > > > > > > > > > > > > > > > > > > > > > > > > | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | extern const void *_EH_FRAME_BEGINS__; extern void *_EH_FRAME_OBJECTS__; extern void __register_frame_info(const void *, void *); extern void *__deregister_frame_info(const void *); #endif extern bool glue_of_init(void); extern int glue_of_application_main(void); extern const char *glue_of_http_request_method_to_string(void); extern of_http_request_method_t glue_of_http_request_method_from_string(void); extern OFString *glue_of_http_status_code_to_string(void); extern size_t glue_of_sizeof_type_encoding(void); extern size_t glue_of_alignof_type_encoding(void); extern void glue_of_logv(void); extern OFString *glue_of_zip_archive_entry_version_to_string(void); extern OFString *glue_of_zip_archive_entry_compression_method_to_string(void); extern size_t glue_of_zip_archive_entry_extra_field_find(void); extern void glue_of_pbkdf2(void); extern void glue_of_scrypt(void); extern of_socket_address_t glue_of_socket_address_parse_ip(void); extern of_socket_address_t glue_of_socket_address_parse_ipv4(void); extern of_socket_address_t glue_of_socket_address_parse_ipv6(void); extern of_socket_address_t glue_of_socket_address_ipx(void); extern bool glue_of_socket_address_equal(void); extern uint32_t glue_of_socket_address_hash(void); extern OFString *glue_of_socket_address_ip_string(void); extern void glue_of_socket_address_set_port(void); extern uint16_t glue_of_socket_address_get_port(void); extern void glue_of_socket_address_set_ipx_network(void); extern uint32_t glue_of_socket_address_get_ipx_network(void); extern void glue_of_socket_address_set_ipx_node(void); extern void glue_of_socket_address_get_ipx_node(void); #ifdef OF_AMIGAOS_M68K void __init_eh(void) { /* Taken care of by of_init() */ } |
︙ | ︙ | |||
579 580 581 582 583 584 585 586 587 588 589 590 591 592 | (CONST_APTR)lib_expunge, (CONST_APTR)lib_null, #ifdef OF_MORPHOS (CONST_APTR)-1, (CONST_APTR)FUNCARRAY_32BIT_SYSTEMV, #endif (CONST_APTR)glue_of_init, #ifdef OF_MORPHOS (CONST_APTR)FUNCARRAY_END #endif }; #pragma GCC diagnostic pop static struct { | > > > > > > > > > > > > > > > > > > > > > > > > > | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | (CONST_APTR)lib_expunge, (CONST_APTR)lib_null, #ifdef OF_MORPHOS (CONST_APTR)-1, (CONST_APTR)FUNCARRAY_32BIT_SYSTEMV, #endif (CONST_APTR)glue_of_init, (CONST_APTR)glue_of_application_main, (CONST_APTR)glue_of_http_request_method_to_string, (CONST_APTR)glue_of_http_request_method_from_string, (CONST_APTR)glue_of_http_status_code_to_string, (CONST_APTR)glue_of_sizeof_type_encoding, (CONST_APTR)glue_of_alignof_type_encoding, (CONST_APTR)glue_of_logv, (CONST_APTR)glue_of_zip_archive_entry_version_to_string, (CONST_APTR)glue_of_zip_archive_entry_compression_method_to_string, (CONST_APTR)glue_of_zip_archive_entry_extra_field_find, (CONST_APTR)glue_of_pbkdf2, (CONST_APTR)glue_of_scrypt, (CONST_APTR)glue_of_socket_address_parse_ip, (CONST_APTR)glue_of_socket_address_parse_ipv4, (CONST_APTR)glue_of_socket_address_parse_ipv6, (CONST_APTR)glue_of_socket_address_ipx, (CONST_APTR)glue_of_socket_address_equal, (CONST_APTR)glue_of_socket_address_hash, (CONST_APTR)glue_of_socket_address_ip_string, (CONST_APTR)glue_of_socket_address_set_port, (CONST_APTR)glue_of_socket_address_get_port, (CONST_APTR)glue_of_socket_address_set_ipx_network, (CONST_APTR)glue_of_socket_address_get_ipx_network, (CONST_APTR)glue_of_socket_address_set_ipx_node, (CONST_APTR)glue_of_socket_address_get_ipx_node, #ifdef OF_MORPHOS (CONST_APTR)FUNCARRAY_END #endif }; #pragma GCC diagnostic pop static struct { |
︙ | ︙ |
Modified src/amigaos3.sfd from [ba007648e9] to [ad47ddf47b].
1 2 3 4 5 6 7 8 9 10 11 12 13 | ==base _ObjFWBase ==basetype struct Library * ==libname objfw68k.library ==bias 30 ==public * The following function is only for the linklib. bool glue_of_init(unsigned int version, struct of_libc *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)(d0,a0,a1) int glue_of_application_main(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate)(a0,a1,a2) const char *_Nullable glue_of_http_request_method_to_string(of_http_request_method_t method)(d0) of_http_request_method_t glue_of_http_request_method_from_string(OFString *string)(a0) OFString *_Nonnull glue_of_http_status_code_to_string(short code)(d0) size_t glue_of_sizeof_type_encoding(const char *type)(a0) size_t glue_of_alignof_type_encoding(const char *type)(a0) | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ==base _ObjFWBase ==basetype struct Library * ==libname objfw68k.library ==bias 30 ==public * The following function is only for the linklib. bool glue_of_init(unsigned int version, struct of_libc *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)(d0,a0,a1) int glue_of_application_main(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate)(a0,a1,a2) const char *_Nullable glue_of_http_request_method_to_string(of_http_request_method_t method)(d0) of_http_request_method_t glue_of_http_request_method_from_string(OFString *string)(a0) OFString *_Nonnull glue_of_http_status_code_to_string(short code)(d0) size_t glue_of_sizeof_type_encoding(const char *type)(a0) 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) |
︙ | ︙ |