| 1 | //cxx . . $ `<file>/src/asm/_std.c`/ |
| 2 | // ACME - a crossassembler for producing 6502/65c02/65816 code. |
| 3 | // Copyright (C) 1998-2006 Marco Baye |
| 4 | // Have a look at "acme.c" for further info |
| 5 | // |
| 6 | // Platform specific stuff (in this case, for unknown OSes) |
| 7 | #ifndef platform_C |
| 8 | #define platform_Ccxx . . $ `src/asm/_std.c:8:9`! |
| 9 | |
| 10 | #include <stdlib.h> |
| 11 | #include "dynabuf.h"cxx . . $ `<file>/src/asm/dynabuf.h`/ |
| 12 | |
| 13 | |
| 14 | // Variables |
| 15 | char *AnyOS_lib_prefixcxx . . $ AnyOS_lib_prefix. = NULLcxx . . $ `<external>/16391990256953433862/stddef.h:419:9`!; // header string of library tree |
| 16 | |
| 17 | |
| 18 | // Functions |
| 19 | |
| 20 | // used as PLATFORM_INIT: reads "ACME" environment variable |
| 21 | void AnyOS_entrycxx . . $ AnyOS_entry(49f6e7a06ebc5aa8).(void) { |
| 22 | char *env_var; |
| 23 | |
| 24 | // Find out the path of ACME's library |
| 25 | env_var = getenvcxx . . $ getenv(a8b8e32347182212).("ACME"); |
| 26 | // if environment variable was found, make a copy |
| 27 | if(env_var) { |
| 28 | DYNABUF_CLEARcxx . . $ `src/asm/dynabuf.h:14:9`!(GlobalDynaBuf); |
| 29 | // copy environment variable to global dynamic buffer |
| 30 | DynaBuf_add_stringcxx . . $ DynaBuf_add_string(9294670b9d26a99f).(GlobalDynaBufcxx . . $ GlobalDynaBuf., env_var); |
| 31 | DynaBuf_appendcxx . . $ DynaBuf_append(11d1e1bb7092144).(GlobalDynaBufcxx . . $ GlobalDynaBuf., '/'); // add dir separator |
| 32 | DynaBuf_appendcxx . . $ DynaBuf_append(11d1e1bb7092144).(GlobalDynaBufcxx . . $ GlobalDynaBuf., '\0'); // add terminator |
| 33 | AnyOS_lib_prefixcxx . . $ AnyOS_lib_prefix. = DynaBuf_get_copycxx . . $ DynaBuf_get_copy(d7229e135d075701).(GlobalDynaBufcxx . . $ GlobalDynaBuf.); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | |
| 38 | #endif |