Created
October 25, 2013 17:36
-
-
Save streamer45/7158670 to your computer and use it in GitHub Desktop.
codegen madness lol
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
[streamer45@archlinux gen]$ ./codegen ../../../lib/krad_transponder/ "" "info" enum | |
enum { | |
KR_ADAPTER_INFO, | |
KR_ADAPTER_PATH_INFO | |
}; | |
[streamer45@archlinux gen]$ ./codegen ../../../lib/krad_compositor/ "" "info" enum | |
enum { | |
KR_SPRITE_INFO, | |
KR_TEXT_INFO, | |
KR_VECTOR_INFO, | |
KR_COMPOSITOR_PATH_INFO | |
}; | |
[streamer45@archlinux gen]$ ./codegen ../../../lib/krad_transponder/ "" "info" ebml/array_func | |
int whatever_info_to_ebml_func(char *ebml, uber_St st, max) { | |
const int to_ebml_func[2] = { kr_adapter_info_to_ebml, kr_adapter_path_info_to_ebml}; | |
return to_ebml_func[st->st_type](ebml, st->st, max); | |
} | |
[streamer45@archlinux gen]$ ./codegen ../../../lib/krad_compositor/ "" "info" ebml/array_func | |
int whatever_info_to_ebml_func(char *ebml, uber_St st, max) { | |
const int to_ebml_func[4] = { kr_sprite_info_to_ebml, kr_text_info_to_ebml, kr_vector_info_to_ebml, kr_compositor_path_info_to_ebml}; | |
return to_ebml_func[st->st_type](ebml, st->st, max); | |
} | |
[streamer45@archlinux gen]$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment