/* 
 * $RCSfile: init.c,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: init.c,v $
 * Revision 1.2  1996/01/31 16:29:53  slm
 * Updated copyright and version.
 *
 * Revision 1.1  1995/07/29  03:03:32  slm
 * Initial revision
 *
 * Revision 1.37.1.1  1994/10/27  22:27:22  hkaram
 * New branch
 *
 * Revision 1.37  1994/02/05  00:07:05  menze
 *   [ 1994/01/14          menze ]
 *   Moved rom initialization stuff to pi/initrom.c
 */

#include <ctype.h>
#include "process.h"
#include "upi.h"
#include "xk_debug.h"
#include "event_i.h"
#include "event.h"
#include "machine.h"
#include "compose.h"
#include "platform.h"
#include "prottbl.h"
#include "x_util.h"
#include "netmask.h"
#include "rom.h"

int globalArgc;
char **globalArgv;

int	traceinit;


static void	pgraphStub( Event, void * );


static void
pgraphStub(ev, arg)
    Event	ev;
    VOID 	*arg;
{
    build_pgraph();
}


int
main( int argc, char *argv[] )
{
    setbuf(stdout, 0);
    globalArgc = argc;
    globalArgv = argv;
    
    LWP_Init();			/* cjt */
    
    xError("x-kernel initializes");
    xTraceInit();
    initRom();
    map_init();
    /* msgInit(); */
    evInit();
    init_clock((long)(EVENT_INTERVAL/1000));
    netMaskInit();
    prottbl_init();
    upiInit();
    xMallocInit();
    build_pgraph_dev();
    evDetach( evSchedule( pgraphStub, 0, 0 ) );
    
    return 0;
}


