diff --git a/src/labels.c b/src/labels.c index f75c66f..72ae4ef 100644 --- a/src/labels.c +++ b/src/labels.c @@ -12,8 +12,6 @@ void build_label_table(char label_tokens[][MAX_TOKEN_SIZE], shash_hashtable_t *l { if(label_tokens[token_index][0] == '$') { - printf("Found label: %s\n", label_tokens[token_index]+1); - //Store the adress we are at on the heap, as the hashtable only stores pointers to data unsigned int *heap_pointer_to_adress = malloc(sizeof(instruction_index)); *heap_pointer_to_adress = instruction_index; diff --git a/src/main.c b/src/main.c index f066cb8..14f93b2 100755 --- a/src/main.c +++ b/src/main.c @@ -143,7 +143,6 @@ int main(int argc, char **argv) shash_hashtable_t label_table; shash_init_hashtable(&label_table, LABEL_TABLE_SIZE); build_label_table((char (*)[MAX_TOKEN_SIZE]) label_tokens.buffer, &label_table); - printf("Built label table\n"); dynamic_buffer_t no_label_definition_tokens; @@ -155,7 +154,6 @@ int main(int argc, char **argv) } remove_label_definition_tokens((char (*)[MAX_TOKEN_SIZE]) label_tokens.buffer, &no_label_definition_tokens); - printf("Removed label defintions\n"); free(label_tokens.buffer); // Check if the EIPA Assembly contains errors with the no_label_definition_tokens array @@ -171,7 +169,6 @@ int main(int argc, char **argv) return EXIT_FAILURE; } replace_labels_with_adresses((char (*)[MAX_TOKEN_SIZE]) no_label_definition_tokens.buffer, &tokens, label_table, instruction_informations); - printf("Removed labels\n"); free(no_label_definition_tokens.buffer); // Generate the target code @@ -206,6 +203,8 @@ int main(int argc, char **argv) // Cleanup destroy_instruction_information_hashtable(&instruction_informations); shash_destroy_hashtable(&label_table); + free(target_code.buffer); + free(tokens.buffer); return EXIT_SUCCESS; }