Last active
July 12, 2016 04:23
-
-
Save michaelbartnett/0baa5c67f762e39c5bb0718d3388ef66 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| void foo_base() | |
| { | |
| printf("fool\n"); | |
| } | |
| #define FooFunction foo_base |
This file contains hidden or 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 "foo_base.c" | |
| #ifndef FooFunction | |
| #error why is there no FooFunction | |
| #endif | |
| void foo_extended() | |
| { | |
| printf("i pity the "); | |
| FooFunction(); | |
| } | |
| #undef FooFunction | |
| #define FooFunction foo_extended() |
This file contains hidden or 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
| #inlude "foo_base.c" | |
| void doathing() | |
| { | |
| printf("call FooFunction\n"); | |
| FooFunction(); | |
| } |
This file contains hidden or 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 "foo_base.c" // redundant, assume include guards | |
| #include "foo_extended.c" | |
| void doathing2() | |
| { | |
| printf("call FooFunction\n"); | |
| FooFunction(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment