Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include "common.h"
#include "interface.h"
void initialize(void)
{
common_initialize();
puts("Initialize B\n");
}
#include <stdio.h>
#include "common.h"
#include "interface.h"
void initialize(void)
{
common_initialize();
puts("Initialize A\n");
}
#ifndef __INTERFACE__
#define __INTERFACE__
void initialize(void);
void do_stuff(void);
void cleanup(void);
#endif /* __INTERFACE__ */
#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");
@sw17ch
sw17ch / bad_way.c
Created February 15, 2012 04:28
bad_way.c
#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");