Understanding source code
Hi
I want to read the source code of firestarter firewall. I can't understand the meaning and syntax of the below line: FIRESTARTER_RULES_DIR "/firestarter" it use in many places in code such as this instruction: g_spawn_sync (FIRESTARTER_RULES_DIR "/firestarter", arg, NULL, G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &output,NULL,&retval, &error) please help me thanks |
Just guessing...
It looks like this: Quote:
It will help if you know what the function "g_spawn_sync" does. |
In that case, you will probably see a line like this elsewhere:
#define FIRESTARTER_RULES_DIR "/blah/blah/blah" When the preprocessor runs through the code and sees this: g_spawn_sync (FIRESTARTER_RULES_DIR "/firestarter", It will expand the variable FIRESTARTER_RULES_DIR to obtain: g_spawn_sync ("/blah/blah/blah" "/firestarter", which is equivalent to: g_spawn_sync ("/blah/blah/blah/firestarter", So 'FIRESTARTER_RULES_DIR' is simply a directory path; presumably it holds rules for firestarter. |
thanks for your help
|
All times are GMT -5. The time now is 09:46 AM. |