From f2f155744a357bf8eda0acac5407b9475c9d90af Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sat, 5 Oct 2024 23:04:35 +0100 Subject: [PATCH] Declare external functions for termcolour and commander in the headers --- src/common/shell/commander/commander.c | 1 - src/common/shell/commander/commander.h | 3 +++ src/common/shell/termcolour/termcolour.c | 2 -- src/common/shell/termcolour/termcolour.h | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/shell/commander/commander.c b/src/common/shell/commander/commander.c index 5c7a6ed..9ad69b5 100644 --- a/src/common/shell/commander/commander.c +++ b/src/common/shell/commander/commander.c @@ -15,7 +15,6 @@ internal inline CMDResult execute_command(const char *cmd, CMDOutHandling out_ha u64 buf_size); internal inline CMDError get_command_output(FILE *fp, CMDOutHandling out_handling, char *out_buf, u64 buf_size); -extern CMDError get_output_status(FILE *fp, i32 *status_out); CMDResult run_command(CMDOutHandling out_handling, char *out_buf, u64 buf_size, ...) { va_list args; diff --git a/src/common/shell/commander/commander.h b/src/common/shell/commander/commander.h index f301d24..31c686d 100644 --- a/src/common/shell/commander/commander.h +++ b/src/common/shell/commander/commander.h @@ -4,6 +4,7 @@ #include "aliases.h" #include "commander_output.h" #include +#include #include #ifdef __cplusplus @@ -16,6 +17,8 @@ BEGIN_C_LINKAGE CMDResult run_command(CMDOutHandling out_handling, char *out_buf, u64 buf_size, ...); +external CMDError get_output_status(FILE *fp, i32 *status_out); + #ifdef __cplusplus END_C_LINKAGE #endif // __cplusplus diff --git a/src/common/shell/termcolour/termcolour.c b/src/common/shell/termcolour/termcolour.c index 0a439c2..471e671 100644 --- a/src/common/shell/termcolour/termcolour.c +++ b/src/common/shell/termcolour/termcolour.c @@ -1,8 +1,6 @@ #include "termcolour.h" #include "terminal_colours.h" -extern void print_coloured_text(const char *text, TerminalColour colour); - void wapp_shell_termcolour_print_text(const char *text, TerminalColour colour) { if (colour < WAPP_TERM_COLOUR_FG_BLACK || colour > WAPP_TERM_COLOUR_FG_BR_WHITE) { return; diff --git a/src/common/shell/termcolour/termcolour.h b/src/common/shell/termcolour/termcolour.h index 5943883..5090f19 100644 --- a/src/common/shell/termcolour/termcolour.h +++ b/src/common/shell/termcolour/termcolour.h @@ -1,6 +1,7 @@ #ifndef TERM_COLOUR_H #define TERM_COLOUR_H +#include "aliases.h" #include "terminal_colours.h" #ifdef __cplusplus @@ -10,6 +11,8 @@ BEGIN_C_LINKAGE void wapp_shell_termcolour_print_text(const char *text, TerminalColour colour); void wapp_shell_termcolour_clear_colour(void); +external void print_coloured_text(const char *text, TerminalColour colour); + #ifdef __cplusplus END_C_LINKAGE #endif // __cplusplus