/* * Copyright 2018 Oticon A/S * * SPDX-License-Identifier: Apache-2.0 */ #include #include #include #include #include #include "bs_cmd_line.h" #include "bs_tracing.h" #include "bs_types.h" #include "bs_utils.h" #include "bs_oswrap.h" /* * A default executable name and a post help message * We define empty ones in case the component does not care to do so * But normally a component would redefine these */ char executable_name[] __attribute__((weak)) =""; void __attribute__((weak)) component_print_post_help() { fprintf(stdout, "\n"); } static char empty_string[] =""; static char *overriden_executable_name = NULL; static char *trace_prefix = empty_string; static void (*post_help)(void) = component_print_post_help; /* * Dynamically override the component post help function */ void bs_override_post_help(void (*new_f)(void)) { post_help = new_f; } /** * Check if is the option