예제 #1
0
// given a "pretty" render name, return the corresponding class
FileRenderer *FileRenderList::find_pretty_name(const char *pretty) {
    int i;
    for (i=0; i<renderList.num(); i++) {
        if (!strcmp(pretty_name(i), pretty)) {
            return renderList.data(i);
        }
    }
    return NULL;
}
예제 #2
0
static void write_header(char *filename)
{
	static unsigned short first_file = 1;
	static char *last = NULL;

	if (last != filename) {
		fprintf(stdout, "%s==> %s <==\n", (first_file ? "" : "\n"), pretty_name(filename));
		fflush(stdout);		/* Make sure the header is printed before the content */
	}

	first_file = 0;
	last = filename;
}