R
r.roest
Hi,
I'm looking for a way to fill static vars from a different c-file.
Here is what I want to do:
file1.c
static DEBUG
calling function X using DEBUG to display information
calling function Y using DEBUG to display information
file2.c
static DEBUG
calling function X using DEBUG to display information
calling function Y using DEBUG to display information
main.c
load and reload ini file to set DEBUG for file1.c to true and for
file2.c to false
This is a existing system which I'm profiling to optimize the system
so I'm limited in the way of changing things. Right now the main.c
reads all ini files into a balanced tree and function X parses the
tree to check the values.
Filling static vars is just one method I'm thinking about.
Is there a way to execute a function once per source file (this could
set the var)..
Anyone have a suggestion ??
Kind regards,
Ronald
I'm looking for a way to fill static vars from a different c-file.
Here is what I want to do:
file1.c
static DEBUG
calling function X using DEBUG to display information
calling function Y using DEBUG to display information
file2.c
static DEBUG
calling function X using DEBUG to display information
calling function Y using DEBUG to display information
main.c
load and reload ini file to set DEBUG for file1.c to true and for
file2.c to false
This is a existing system which I'm profiling to optimize the system
so I'm limited in the way of changing things. Right now the main.c
reads all ini files into a balanced tree and function X parses the
tree to check the values.
Filling static vars is just one method I'm thinking about.
Is there a way to execute a function once per source file (this could
set the var)..
Anyone have a suggestion ??
Kind regards,
Ronald