#include #include #include "htpl_driver.h" static time_t start_time; static void start(FILE* out) { start_time = time(0); fprintf(out, "//The file has been generated by %s at %s", getprogname(), ctime(&start_time)); fprintf(out, "//DO NOT EDIT!\n"); fprintf(out, "#include \n"); } static void finish_header(FILE* hout, FILE* out) { //out header if(hout) { fprintf(hout, "//The file has been generated by %s at %s", getprogname(), ctime(&start_time)); fprintf(hout, "//DO NOT EDIT!\n"); fprintf(hout, "void %s%s(",funcprefix, funcname); if(tplargs) fprintf(hout, "%s", tplargs); fprintf(hout, ");\n"); } fprintf(out, "void %s%s(",funcprefix, funcname); if(tplargs) fprintf(out, "%s", tplargs); fprintf(out, ") {\n"); } static void out_static_block(FILE* out, const char* text, int textlen) { fprintf(out, "\tfwrite(\""); int i; const char* cp = text; for(i=0; i