void gp_init(void) { #ifdef USE_DEFAULT_PATHS /* load the environmental variables */ gp_header_path = getenv("GPUTILS_HEADER_PATH"); gp_lkr_path = getenv("GPUTILS_LKR_PATH"); gp_lib_path = getenv("GPUTILS_LIB_PATH"); #ifndef HAVE_DOS_BASED_FILE_SYSTEM if (gp_header_path == NULL) { gp_header_path = GP_Strdup(HEADER_PATH); } if (gp_lkr_path == NULL) { gp_lkr_path = GP_Strdup(LKR_PATH); } if (gp_lib_path == NULL) { gp_lib_path = GP_Strdup(LIB_PATH); } #endif #else gp_header_path = NULL; gp_lkr_path = NULL; gp_lib_path = NULL; #endif }
static void _store_symbol_name(MemByte_t *Mb, const char *Name) { if ((Name != NULL) && (*Name != '\0')) { Mb->symbol_name = GP_Strdup(Name); } }
void symbol_list_add_symbol(const symbol_t *Symbol, const char *Name, unsigned int Symbol_number, int Section_number, unsigned int Base_class, unsigned int Byte_address) { symbol_node_t *node; if (state.pass != 1) { return; } node = (symbol_node_t *)gp_list_node_append(&state.obj.symbol_fifo, gp_list_node_new(sizeof(symbol_node_t))); node->symbol = Symbol; node->name = GP_Strdup(Name); node->symbol_number = Symbol_number; node->section_number = Section_number; node->base_class = Base_class; node->byte_address = Byte_address; }