Created
February 15, 2012 14:23
-
-
Save sw17ch/1836072 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
#include "interface.h" | |
void initialize(void) | |
{ | |
puts("Common Initialize\n"); | |
#if defined(PLATFORM_A) | |
puts("Initialize A\n"); | |
#elif defined(PLATFORM_B) | |
puts("Initialize B\n"); | |
#else | |
#error "Invalid platform." | |
#endif | |
} | |
void do_stuff(void) | |
{ | |
puts("Common Do Stuff\n"); | |
#if defined(PLATFORM_A) | |
puts("Do Stuff A\n"); | |
#elif defined(PLATFORM_B) | |
puts("Do Stuff B\n"); | |
#else | |
#error "Invalid platform." | |
#endif | |
} | |
void cleanup(void) | |
{ | |
puts("Common Cleanup\n"); | |
#if defined(PLATFORM_A) | |
puts("Cleanup A\n"); | |
#elif defined(PLATFORM_B) | |
puts("Cleanup B\n"); | |
#else | |
#error "Invalid platform." | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment