...
| Code Block | ||
|---|---|---|
| ||
/* sets some internal state in the library */
extern int setfile(FILE *file);
/* performs some action using the file passed earlier */
extern int usefile();
static FILE *myFile;
int setfile(const FILE *file) {
myFile = file;
return 0;
}
int usefile() {
/* perform some action here */
return 0;
}
|
...