Beispiel #1
0
void
dump_init(void)
{
    if (dump_fn[0]) {
        char *new_dump_fn = get_dump_filename();

#ifdef DUMP_TEXT_LOG
        strncpy(dump_path, new_dump_fn, BUFSIZ-1);
        dump_fp = fopen(new_dump_fn, "w");
        if (!dump_fp) {
            pline("Can't open %s for output.", new_dump_fn);
            pline("Dump file not created.");
        }
#endif
#ifdef DUMP_HTML_LOG
        strncpy(html_dump_path, strcat(new_dump_fn, ".html"), BUFSIZ-1);
        html_dump_fp = fopen(html_dump_path, "w");
        if (!html_dump_fp) {
            pline("Can't open %s for output.", new_dump_fn);
            pline("Html dump file not created.");
        }
#endif
        if (new_dump_fn) free(new_dump_fn);
    }
}
Beispiel #2
0
/** Screenshot of the HTML map. */
int
dump_screenshot(void)
{
    char screenshot[BUFSZ];
    char *filename = get_dump_filename();
    Sprintf(screenshot, "%s_screenshot_%ld_t%ld.html", filename, (long)u.ubirthday, moves);
    if (filename) free(filename);

    html_dump_fp = fopen(screenshot, "w");
    if (!html_dump_fp) {
        pline("Can't open %s for output.", screenshot);
        pline("Screenshot file not created.");
    }

    dump_header_html("Screenshot");
    dump_screen();
    dump_exit();

    return 0;
}
Beispiel #3
0
void pki_x509req::writeDefault(const QString fname)
{
	writeReq(get_dump_filename(fname, ".csr"), true);
}