I have a scenario.c file that defines the some functions like below:
Static Functions:
scenario_config()
, scenario_start()
, scenario_stop()
, scenario_close()
Structure (only thing) Visible to Parent Src/Header files:
struct scenario_struct = {.config = scenario_config, .start = scenario_start, .stop = scenario_stop, .close = scenario_close}
Also, there is a scenario.h
header file that declares a ton of #define
s and such that is included in the parent header file too.
Now coming to my question: There is a set of static helper functions and static constants and #define
s in this scenario.c
file that I want to put in a different file, to reduce clutter. I would be making them non-static to do so. But, they are only used in this file, so putting them in scenario.h
makes it visible to its parent as well. I thought of a second header, but dont think I can put the static constants in there. What is the best way to do this?