Created
August 19, 2009 19:10
-
-
Save mheffner/170594 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* filea.c */ | |
#include <stdio.h> | |
/* Include public API definitions. */ | |
#include "ab.h" | |
/* Function provided by fileb.c */ | |
int b_getval_super_secret(void); | |
/* Simple function internal to this file only. */ | |
static int | |
a_internal_getval(void) | |
{ | |
return 3; | |
} | |
/* Exported API function. */ | |
const char *ab_get_string(void) __attribute__ ((visibility ("default") )); | |
const char * | |
ab_get_string(void) | |
{ | |
static char buf[64]; | |
snprintf(buf, sizeof(buf), "A val: %d, B val: %d", | |
a_internal_getval(), | |
b_getval_super_secret()); | |
return buf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment