/* file: view.c
 *
 * Draw Three-link snake: no dynamics
 *
 * Program by:
 *
 * Prof. William W. Armstrong,
 * Department of Computing Science,
 * The University of Alberta,
 * Edmonton, Alberta,
 * Canada,
 * T6G 2H1
 * 
 * Copyright (c) 1989 William W. Armstrong
 *
 * Permission is hereby granted for personal, non-commercial,
 * reproduction and use of this program provided that this notice
 * is included in any material copied from it.
 * The author assumes no responsibility for damages resulting from
 * the use of this software however caused.
 * 
 */

#include <stdio.h>

#include <math.h>
/* #include <device.h> commented out PAF 5/24/91 */

int	numlinks ;
int	threeview ;

main( argc, argv)
int	argc ;
char	*argv[] ;
{
short	dev ;
int	i ;

    threeview = 0;
    dev = 'a' ;
    numlinks = 3 ;
    jrngraphinit();
    if( argc > 2 )
	for( i = 1 ; i < argc ; i++ )
	{
	    while( dev != 'q' )
	    {
		if( qtest() && KEYBD == qread( &dev ) && dev == 'g' )
		    drawjournal( argv[i] );
	    }
	    dev = 'a' ;
	}
    else
    if( argc == 2 )
    {
	drawjournal( argv[1] );
	sleep( 3 );
    }
    else
    if( argc == 1 )
    {
	drawjournal( 0 );
	sleep( 3 );
    }
    jrngraphend();
}
