diff -r b3f24e23bc25 -r bf54085ce341 src/c2html.c --- a/src/c2html.c Wed Aug 31 12:58:48 2016 +0200 +++ b/src/c2html.c Wed Aug 31 14:41:56 2016 +0200 @@ -27,47 +27,21 @@ * */ -#include - #include "c2html.h" -#include "highlighter.h" #include "ucx/list.h" - -static int appendfile(const char *filename, FILE *fout, - char *copybuf, size_t copybuflen, const char *errmsg) { - FILE *headerfile = fopen(filename, "r"); - if (!headerfile) { - perror(errmsg); - if (fout != stdout) { - fclose(fout); - } - return 1; - } - ucx_stream_copy(headerfile, fout, - (read_func) fread, (write_func) fwrite, - copybuf, copybuflen, (size_t)-1); - fclose(headerfile); - return 0; -} +#include "ucx/utils.h" -static void printhelp() { - printf("Formats source code using HTML.\n\nUsage:\n" - " c2html [Options] FILE\n\n" - " Options:\n" - " -h Prints this help message\n" - " -j Highlight Java instead of C source code\n" - " -o Output file (stdout, if not specified)\n" - " -H Prepend header file\n" - " -F