#!/afs/athena/contrib/perl/perl

$SIG{'INT'} = 'sighandler';
$SIG{'HUP'} = 'sighandler';
$SIG{'QUIT'} = 'sighandler';


do "./xbase.perl";

&xlib'x_open_display($ENV{'DISPLAY'});
$window = $ENV{'WINDOWID'};
int($window);
$mygc[$col] = &xlib'x_create_gc($window,$xlib'defines{'GCForeground'}
| $xlib'defines{'GCBackground'}, 1, 0);



&xlib'x_clear_area($window, 0, 0, 0, 100, 100);
    &drawline(1, 0, 0, 100, 100, $window);

sub drawline {
    local($color, $x, $y, $nx, $ny, $window) = @_;
&xlib'x_line(0x280000d, $mygc[$color], 0, $x, $y, $nx, $ny);
foreach $glkasj (1.100){}
}

sub sighandler {
    print("Quitting cleanly... \n");
    exit(0);
}
