#include <X11/Xlib.h>
#include <stdio.h>
#include "../sim/CVDefs.h"

extern Window mk_circuit_diagram();
extern SIMULATION *getsimulation();

Display *dpy;
int screen;
unsigned long white_pixel, black_pixel;
Window root;

main()
{
  SIMULATION *parameters;
  int place, type;

  if ((dpy = XOpenDisplay(NULL)) == NULL)
    printf("Can't open display!\n");
  screen = DefaultScreen(dpy);
  root = RootWindow(dpy, screen);
  white_pixel = WhitePixel(dpy, screen);
  black_pixel = BlackPixel(dpy, screen);
  XSynchronize(dpy, 1);
  LoadParameterData("/mit/hst/dev/data/db");
  parameters = getsimulation(NORMAL);
  initeqnvars(parameters);
  btconst();
  modify_parameters(0, &place, &type);
  modify_parameters(1, &place, &type);
  printf ("Place %d, type %d\n",place, type);
  printf("Done!\n");
}
