static char *SccsId = "@(#)comp_event.c 4.1 (TU-Delft) 05/24/90";
/**********************************************************

Name/Version      : makevln/4.1

Language          : C
Operating system  : UNIX SYSTEM V
Host machine      : HP9000

Author(s)         : J. Annevelink
Creation date     : 18-May-1983
Modified by       : S. de Graaf
Modification date : 29-Jan-1987


        Delft University of Technology
        Department of Electrical Engineering
        Network Theory Section
        Mekelweg 4 - P.O.Box 5031
        2600 GA DELFT
        The Netherlands

        Phone : 015 - 786234

        COPYRIGHT (C) 1987 , All rights reserved
**********************************************************/
#include "incl.h"

comp_events (event1, event2)
struct event_rec *event1, *event2;
{
/*
** compare two events with respect to xl, yb and chk_type
*/
    register int i;

    if ((i = event1 -> xl - event2 -> xl)) return (i);

    if ((i = event1 -> yb - event2 -> yb)) return (i);

    if (event1 -> attr_no == 0) {
	if (event2 -> attr_no != 0) return (-1);
    }
    else {
	if (event2 -> attr_no == 0) return (1);
    }

    return (0);
}
