2014-03-10 06:36:28 +04:00
|
|
|
extern char * special_thing;
|
|
|
|
|
2014-03-10 09:37:49 +04:00
|
|
|
char test_module_string[] = "I am a char[] in the module.\n";
|
|
|
|
char * test_module_string_ptr = "I am a char * in the module.\n";
|
2014-03-10 09:31:34 +04:00
|
|
|
|
|
|
|
static int a_function(void (*callback)(char *)) {
|
2014-03-10 09:37:49 +04:00
|
|
|
callback("I am a static function in the module.\n");
|
2014-03-10 06:36:28 +04:00
|
|
|
return 42;
|
|
|
|
}
|
|
|
|
|
|
|
|
int b_function(void (*callback)(char *)) {
|
2014-03-10 09:37:49 +04:00
|
|
|
callback("I am a global function in a module!\n");
|
2014-03-10 06:36:28 +04:00
|
|
|
callback(special_thing);
|
2014-03-10 09:31:34 +04:00
|
|
|
a_function(callback);
|
2014-03-10 09:37:49 +04:00
|
|
|
callback(test_module_string);
|
|
|
|
callback(test_module_string_ptr);
|
2014-03-10 06:36:28 +04:00
|
|
|
return 25;
|
|
|
|
}
|
|
|
|
|