/*
 * X11 Utility functions
 */

#include <stdio.h>
#include "ux11.h"
#include "ux11_internal.h"

Display *ux11_open_display(argc, argv)
int argc;
char *argv[];
/* Looks for -display option */
{
    Display *disp;
    char *disp_name;

    disp = XOpenDisplay(disp_name = ux11_get_value(argc, argv, "-display", ""));
    if (!disp) {
	fprintf(stderr, "%s: cannot open display `%s'\n", argv[0], disp_name);
	abort();
    }
    return disp;
}
