Skip to content

Instantly share code, notes, and snippets.

@mgalgs
Created May 10, 2013 21:05
Show Gist options
  • Save mgalgs/5557407 to your computer and use it in GitHub Desktop.
Save mgalgs/5557407 to your computer and use it in GitHub Desktop.
#include "section_hacking.h"
extern struct formatter_info __start_my_formatters;
extern struct formatter_info __stop_my_formatters;
static void format_all(const char *txt)
{
struct formatter_info *iter = &__start_my_formatters;
for ( ; iter < &__stop_my_formatters; ++iter) {
printf("Formatting with %s: ", iter->name);
iter->fn(txt);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment