int main(int argc, char **argv) { signal(SIGINT, fatal_handler); signal(SIGPIPE, fatal_handler); gtk_init(&argc, &argv); gdk_init(&argc, &argv); /*gdk_imlib_init();*/ ng_init(); gtk_main(); exit(0); }
t_stat ng_reset(DEVICE *dptr) { DEVICE *dptr2; t_stat r; if (dptr->flags & DEV_DIS) { sim_cancel (dptr->units); return auto_config ("NG", (dptr->flags & DEV_DIS) ? 0 : 1);; } dptr2 = find_dev ("VT"); if ((dptr2 != NULL) && !(dptr2->flags & DEV_DIS)) { dptr->flags |= DEV_DIS; return sim_messagef (SCPE_NOFNC, "NG and VT device can't both be enabled\n"); } dptr2 = find_dev ("CH"); if ((dptr2 != NULL) && !(dptr2->flags & DEV_DIS)) { dptr->flags |= DEV_DIS; return sim_messagef (SCPE_ALATT, "NG device in conflict with CH.\n"); } r = auto_config ("NG", (dptr->flags & DEV_DIS) ? 0 : 1);; if (r != SCPE_OK) { dptr->flags |= DEV_DIS; return r; } if (!ng_inited && !ng_init(dptr, DEB_TRC)) return sim_messagef (SCPE_ALATT, "Display already in use.\n"); ng_inited = TRUE; CLR_INT (NG); ng_unit.wait = 100; sim_activate (dptr->units, 1); set_cmd (0, "DZ DISABLED"); /* Conflict with NG. */ set_cmd (0, "HK DISABLED"); /* Conflict with RF. */ vid_register_quit_callback (&ng_quit_callback); return SCPE_OK; }