Differences From Artifact [0f4f4302e3]:
- File
src/amiga-glue.m
— part of check-in
[9697334084]
at
2020-06-21 02:15:26
on branch amiga-library
— Make of_std{in,out,err} available in Amiga library
This is done by using functions that return a reference to the variable
and defining of_std{in,out,err} to a call into these functions. (user: js, size: 8714) [annotate] [blame] [check-ins using]
To Artifact [93e24e60c7]:
- File src/amiga-glue.m — part of check-in [9937a79627] at 2020-06-21 03:02:25 on branch amiga-library — Add functions/variables for tests to Amiga library (user: js, size: 11007) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #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) | > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include "config.h" #import "OFApplication.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFMethodSignature.h" #import "OFObject.h" #import "OFStdIOStream.h" #import "OFString.h" #import "OFZIPArchiveEntry.h" #import "amiga-library.h" #import "of_strptime.h" #import "pbkdf2.h" #import "platform.h" #import "scrypt.h" #import "socket.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) |
︙ | ︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 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); } OFStdIOStream **__saveds glue_of_stdin_ref(void) { return of_stdin_ref(); } | > > > > > > | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | 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); } uint32_t *__saveds glue_of_hash_seed_ref(void) { return of_hash_seed_ref(); } OFStdIOStream **__saveds glue_of_stdin_ref(void) { return of_stdin_ref(); } |
︙ | ︙ | |||
133 134 135 136 137 138 139 140 141 142 143 144 145 146 | 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); | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 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); } of_string_encoding_t __saveds glue_of_string_parse_encoding PPC_PARAMS(OFString *string) { M68K_ARG(OFString *, string, a0) return of_string_parse_encoding(string); } OFString *__saveds glue_of_string_name_of_encoding PPC_PARAMS(of_string_encoding_t encoding) { M68K_ARG(of_string_encoding_t, encoding, d0) return of_string_name_of_encoding(encoding); } size_t __saveds glue_of_string_utf8_encode PPC_PARAMS(of_unichar_t c, char *UTF8) { M68K_ARG(of_unichar_t, c, d0) M68K_ARG(char *, UTF8, a0) return of_string_utf8_encode(c, UTF8); } ssize_t __saveds glue_of_string_utf8_decode PPC_PARAMS(const char *UTF8, size_t len, of_unichar_t *c) { M68K_ARG(const char *, UTF8, a0) M68K_ARG(size_t, len, d0) M68K_ARG(of_unichar_t *, c, a1) return of_string_utf8_decode(UTF8, len, c); } size_t __saveds glue_of_string_utf16_length PPC_PARAMS(const of_char16_t *string) { M68K_ARG(const of_char16_t *, string, a0) return of_string_utf16_length(string); } size_t __saveds glue_of_string_utf32_length PPC_PARAMS(const of_char32_t *string) { M68K_ARG(const of_char32_t *, string, a0) return of_string_utf32_length(string); } 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); |
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | 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) { | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 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_salsa20_8_core PPC_PARAMS(uint32_t *buffer) { M68K_ARG(uint32_t *, buffer, a0) of_salsa20_8_core(buffer); } void __saveds glue_of_scrypt_block_mix PPC_PARAMS(uint32_t *output, const uint32_t *input, size_t blockSize) { M68K_ARG(uint32_t *, output, a0) M68K_ARG(const uint32_t *, input, a1) M68K_ARG(size_t, blockSize, d0) of_scrypt_block_mix(output, input, blockSize); } void __saveds glue_of_scrypt_romix PPC_PARAMS(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp) { M68K_ARG(uint32_t *, buffer, a0) M68K_ARG(size_t, blockSize, d0) M68K_ARG(size_t, costFactor, d1) M68K_ARG(uint32_t *, tmp, a1) of_scrypt_romix(buffer, blockSize, costFactor, tmp); } 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) { |
︙ | ︙ | |||
203 204 205 206 207 208 209 210 211 212 213 214 215 216 | 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); } 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, a1) | > > > > > > > > > > > > | 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 | 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); } const char *__saveds glue_of_strptime PPC_PARAMS(const char *buf, const char *fmt, struct tm *tm, int16_t *tz) { M68K_ARG(const char *, buf, a0) M68K_ARG(const char *, fmt, a1) M68K_ARG(struct tm *, tm, a2) M68K_ARG(int16_t *, tz, a3) return of_strptime(buf, fmt, tm, tz); } 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, a1) |
︙ | ︙ |