R
Ravi Uday
Hi,
I have a strange problem. I would appreciate if someone can give me a
way to implement/solve my problem.
I am using a third party tool which has C-implementation defined but
to a minimum. It uses some kind of a 'interpreter' thing so features
like - vsprintf, variadic functions, 'function pointers' are NOT
supported by it.
I have a function/script which is called when a system 'crash' is
occured. It is called CleanUpScript(). It can be called from any
function.
void main_function ()
{
...
...
if ( crash )
CleanUpScript ();
}
void another_fn()
{
...
...
if ( crash )
CleanUpScript ();
}
void CleanUpScript()
{
.../* free resources..etc..*/
...
main_function ();/* call the function which triggerd CleanUpScript
function*/
}
At the end of CleanUpScript() i need to call the function from which
CleanUpScript was called. It can be any function. How do i do that ?
One way to implement was using 'Function Pointers' or by using
LookUpTable, but since function pointers itself are *not* supported
here, is there any other way to do this.
Please help.
- Ravi
I have a strange problem. I would appreciate if someone can give me a
way to implement/solve my problem.
I am using a third party tool which has C-implementation defined but
to a minimum. It uses some kind of a 'interpreter' thing so features
like - vsprintf, variadic functions, 'function pointers' are NOT
supported by it.
I have a function/script which is called when a system 'crash' is
occured. It is called CleanUpScript(). It can be called from any
function.
void main_function ()
{
...
...
if ( crash )
CleanUpScript ();
}
void another_fn()
{
...
...
if ( crash )
CleanUpScript ();
}
void CleanUpScript()
{
.../* free resources..etc..*/
...
main_function ();/* call the function which triggerd CleanUpScript
function*/
}
At the end of CleanUpScript() i need to call the function from which
CleanUpScript was called. It can be any function. How do i do that ?
One way to implement was using 'Function Pointers' or by using
LookUpTable, but since function pointers itself are *not* supported
here, is there any other way to do this.
Please help.
- Ravi