Update copyright year in documentation and adjust formatting for symbol table output
h3rald h3rald@h3rald.com
Wed, 02 Apr 2025 16:21:22 +0200
2 files changed,
8 insertions(+),
17 deletions(-)
M
src/main.c
→
src/main.c
@@ -214,7 +214,7 @@ void hex_print_help()
{ printf(" _*_ _\n" " / \\hex\\*\n" - " *\\_/_/_/ v%s - (c) 2024 Fabio Cevasco\n" + " *\\_/_/_/ v%s - (c) 2024-2025 Fabio Cevasco\n" " * \n", HEX_VERSION); printf("\n"@@ -237,7 +237,7 @@ {
printf("\n" " _*_ _\n" " / \\hex\\*\n" - " *\\_/_/_/ v%s - (c) 2024 Fabio Cevasco\n" + " *\\_/_/_/ v%s - (c) 2024-2025 Fabio Cevasco\n" " * \n", HEX_VERSION); printf("\n"@@ -259,9 +259,9 @@ "\n"
" Oh, and of course all integers are in hexadecimal format! ;)\n" "\n" "SYMBOLS\n" - " +---------+----------------------------+-------------------------------------------------+\n" - " | Symbol | Input -> Output | Description |\n" - " +---------+----------------------------+-------------------------------------------------+\n"); + " +---------+----------------------------+--------------------------------------------------------------------+\n" + " | Symbol | Input -> Output | Description |\n" + " +---------+----------------------------+--------------------------------------------------------------------+\n"); for (size_t i = 0; i < docs->size; i++) { printf(" | ");@@ -271,10 +271,10 @@ hex_lpad(docs->entries[i]->input, 15);
printf(" -> "); hex_rpad(docs->entries[i]->output, 7); printf(" | "); - hex_rpad(docs->entries[i]->description, 47); + hex_rpad(docs->entries[i]->description, 66); printf(" |\n"); } - printf(" +---------+----------------------------+-------------------------------------------------+\n"); + printf(" +---------+----------------------------+--------------------------------------------------------------------+\n"); } int hex_write_bytecode_file(hex_context_t *ctx, char *filename, uint8_t *bytecode, size_t size)
M
src/stack.c
→
src/stack.c
@@ -270,16 +270,7 @@ break;
case HEX_TYPE_NATIVE_SYMBOL: case HEX_TYPE_USER_SYMBOL: - if (item->token) - { - // TODO: Cannot free the token here, as it may be shared with other items - // Need to implement a reference counting mechanism for symbols - /* - hex_debug_item(ctx, "FREE", item); - hex_free_token(item->token); - item->token = NULL; // Prevent double free - */ - } + // Cannot "free" symbols because we are not keeping track of how many times they are referenced. break; default: