Example #1
0
void wait_and_quit() {
	local_message("\npress Enter...");
	getchar();

	output_cleanup();
	exit(1);
}
Example #2
0
static void cleanup_exit(ex_t exitcode, int killfiles) {
    if (fpo) {
	output_cleanup();
    }
    if (killfiles && outfname[0] != '\0') unlink(outfname);
    exit(exitcode);
}
int main( int argc, char **argv )
{
    cairo_surface_t *surface;
    int j;

    surface = output_create_surface (argv [0], WIDTH, HEIGHT);

    fprintf (stderr, "Testing lines...\n");
    test (surface);
    cairo_surface_write_to_png (surface, "lines-out.png");

    for (j = 0; j < NUM_RUNS; j++) {
        int cur = test (surface);
        fprintf (stderr, "\t%d: %d (%.2f ms)\n", j, cur,
                 get_milliseconds (cur));
    }

    cairo_surface_destroy( surface );
    output_cleanup ();
    return 0;
}