As seen in the demos, the my_sf_vars.c/h files contain the global pointers for your vars, with the unfortunate side effect of having the vars in two paces. Wouldn't it be great if the user entered everything in one place?
I present the idea of the "c-globals" project. We have a custom file (name.global_vars). The program would read it and then auto-generate name.c and name.h with the correct hdr guards, vars, types, initialised values (Since we can do that with a .c file) and also comments. The user would never look at name.c and name.h directly so the comments are for the name.global_vars file.
Then build scripts (Scons in my case) would see this file, execute the program on the file and make the right files.
As seen in the demos, the
my_sf_vars.c/h
files contain the global pointers for your vars, with the unfortunate side effect of having the vars in two paces. Wouldn't it be great if the user entered everything in one place?I present the idea of the "c-globals" project. We have a custom file (
name.global_vars
). The program would read it and then auto-generatename.c
andname.h
with the correct hdr guards, vars, types, initialised values (Since we can do that with a .c file) and also comments. The user would never look atname.c
andname.h
directly so the comments are for thename.global_vars
file.Then build scripts (Scons in my case) would see this file, execute the program on the file and make the right files.