Overview
Comment: | Make of_std{in,out,err} available in Amiga library
This is done by using functions that return a reference to the variable |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | amiga-library |
Files: | files | file ages | folders |
SHA3-256: |
96973340848663c942fa90cc1414a2d6 |
User & Date: | js on 2020-06-21 02:15:26 |
Other Links: | branch diff | manifest | tags |
Context
2020-06-21
| ||
03:02 | Add functions/variables for tests to Amiga library check-in: 9937a79627 user: js tags: amiga-library | |
02:15 | Make of_std{in,out,err} available in Amiga library check-in: 9697334084 user: js tags: amiga-library | |
2020-06-20
| ||
23:16 | Add all public constants to linklib check-in: 547e079e08 user: js tags: amiga-library | |
Changes
Modified src/OFStdIOStream.h from [22e16b8a6e] to [30b6ddea45].
︙ | ︙ | |||
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 | @end #ifdef __cplusplus extern "C" { #endif /*! @file */ /*! * @brief The standard input as an OFStream. */ extern OFStdIOStream *_Nullable of_stdin; /*! * @brief The standard output as an OFStream. */ extern OFStdIOStream *_Nullable of_stdout; /*! * @brief The standard error as an OFStream. */ extern OFStdIOStream *_Nullable of_stderr; /*! * @brief Logs the specified printf-style format to @ref of_stderr. * * This prefixes the output with the date, timestamp, process name and PID and * allows `%@` as a printf-style formatted to print objects. */ | > > > > > > > > > | 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 | @end #ifdef __cplusplus extern "C" { #endif /*! @file */ #ifndef OF_AMIGAOS /*! * @brief The standard input as an OFStream. */ extern OFStdIOStream *_Nullable of_stdin; /*! * @brief The standard output as an OFStream. */ extern OFStdIOStream *_Nullable of_stdout; /*! * @brief The standard error as an OFStream. */ extern OFStdIOStream *_Nullable of_stderr; #else extern OFStdIOStream *_Nonnull *_Nullable of_stdin_ref(void); extern OFStdIOStream *_Nonnull *_Nullable of_stdout_ref(void); extern OFStdIOStream *_Nonnull *_Nullable of_stderr_ref(void); # define of_stdin (*of_stdin_ref()) # define of_stdout (*of_stdout_ref()) # define of_stderr (*of_stderr_ref()) #endif /*! * @brief Logs the specified printf-style format to @ref of_stderr. * * This prefixes the output with the date, timestamp, process name and PID and * allows `%@` as a printf-style formatted to print objects. */ |
︙ | ︙ |
Modified src/OFStdIOStream.m from [3648853d0b] to [acfa5ef390].
︙ | ︙ | |||
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #ifdef OF_WINDOWS void _reference_to_OFWin32ConsoleStdIOStream(void) { [OFWin32ConsoleStdIOStream class]; } #endif OFStdIOStream *of_stdin = nil; OFStdIOStream *of_stdout = nil; OFStdIOStream *of_stderr = nil; #ifdef OF_AMIGAOS OF_DESTRUCTOR() { [of_stdin dealloc]; [of_stdout dealloc]; [of_stderr dealloc]; | > > > > > > > > > > > > > > > > > > > > > > > > > > | 53 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 | #ifdef OF_WINDOWS void _reference_to_OFWin32ConsoleStdIOStream(void) { [OFWin32ConsoleStdIOStream class]; } #endif #ifdef OF_AMIGAOS # undef of_stdin # undef of_stdout # undef of_stderr #endif OFStdIOStream *of_stdin = nil; OFStdIOStream *of_stdout = nil; OFStdIOStream *of_stderr = nil; #ifdef OF_AMIGAOS OFStdIOStream ** of_stdin_ref(void) { return &of_stdin; } OFStdIOStream ** of_stdout_ref(void) { return &of_stdout; } OFStdIOStream ** of_stderr_ref(void) { return &of_stderr; } #endif #ifdef OF_AMIGAOS OF_DESTRUCTOR() { [of_stdin dealloc]; [of_stdout dealloc]; [of_stderr dealloc]; |
︙ | ︙ |
Modified src/amiga-glue.m from [316cef8c1f] to [0f4f4302e3].
︙ | ︙ | |||
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); } void __saveds glue_of_logv PPC_PARAMS(OFConstantString *format, va_list arguments) { M68K_ARG(OFConstantString *, format, a0) M68K_ARG(va_list, arguments, a1) | > > > > > > > > > > > > > > > > > > | 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 | 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(); } OFStdIOStream **__saveds glue_of_stdout_ref(void) { return of_stdout_ref(); } OFStdIOStream **__saveds glue_of_stderr_ref(void) { return of_stderr_ref(); } void __saveds glue_of_logv PPC_PARAMS(OFConstantString *format, va_list arguments) { M68K_ARG(OFConstantString *, format, a0) M68K_ARG(va_list, arguments, a1) |
︙ | ︙ |
Modified src/amiga-library.m from [4003025eaa] to [00ace7a578].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include "config.h" #include <exec/libraries.h> #include <exec/nodes.h> #include <exec/resident.h> #include <proto/exec.h> | > | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #include "config.h" #include <exec/libraries.h> #include <exec/nodes.h> #include <exec/resident.h> #include <proto/exec.h> #import "OFHTTPRequest.h" #import "OFStdIOStream.h" #import "OFString.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) |
︙ | ︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 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); | > > > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | 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 OFStdIOStream **glue_of_stdin_ref(void); extern OFStdIOStream **glue_of_stdout_ref(void); extern OFStdIOStream **glue_of_stderr_ref(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); |
︙ | ︙ | |||
614 615 616 617 618 619 620 621 622 623 624 625 626 627 | (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, | > > > | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | (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_stdin_ref, (CONST_APTR)glue_of_stdout_ref, (CONST_APTR)glue_of_stderr_ref, (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, |
︙ | ︙ |
Modified src/amigaos3.sfd from [e93919c0b0] to [3ca3f88236].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ==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) void glue_of_socket_address_parse_ip(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0) | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ==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) OFStdIOStream *_Nonnull *_Nullable glue_of_stdin_ref(void)() OFStdIOStream *_Nonnull *_Nullable glue_of_stdout_ref(void)() OFStdIOStream *_Nonnull *_Nullable glue_of_stderr_ref(void)() 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) void glue_of_socket_address_parse_ip(of_socket_address_t *_Nonnull address, OFString *IP, uint16_t port)(a0,a1,d0) |
︙ | ︙ |
Modified src/linklib/linklib.m from [6240ed4c29] to [e9e8c52c2c].
︙ | ︙ | |||
393 394 395 396 397 398 399 400 401 402 403 404 405 406 | } 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); } | > > > > > > > > > > > > > > > > > > | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | } size_t of_alignof_type_encoding(const char *type) { return glue_of_alignof_type_encoding(type); } OFStdIOStream ** of_stdin_ref(void) { return glue_of_stdin_ref(); } OFStdIOStream ** of_stdout_ref(void) { return glue_of_stdout_ref(); } OFStdIOStream ** of_stderr_ref(void) { return glue_of_stderr_ref(); } void of_logv(OFConstantString *format, va_list arguments) { glue_of_logv(format, arguments); } |
︙ | ︙ |