void *make_graph_copy(void *graph) { unsigned short i; t_scope *d_buff; t_scope *d_buff_copy; i = 0; d_buff = graph; while (d_buff != NULL) { if (i == 0) d_buff_copy = init_scope(d_buff->scope); else append_scope(d_buff_copy, d_buff->scope); d_buff = d_buff->next; i++; } return (d_buff_copy); }
int main(int argc,char **argv) { INFO(char *dbg="Main(init): "); native_startup(argc, argv); /*** init modules ***/ INFO(printf("%sSharedMemory\n",dbg)); init_sharedmem(&dope); INFO(printf("%sTimer\n",dbg)); init_timer(&dope); INFO(printf("%sTick\n",dbg)); init_tick(&dope); INFO(printf("%sRelax\n",dbg)); init_relax(&dope); INFO(printf("%sKeymap\n",dbg)); init_keymap(&dope); INFO(printf("%sThread\n",dbg)); init_thread(&dope); INFO(printf("%sCache\n",dbg)); init_cache(&dope); INFO(printf("%sHashTable\n",dbg)); init_hashtable(&dope); INFO(printf("%sApplication Manager\n",dbg)); init_appman(&dope); INFO(printf("%sTokenizer\n",dbg)); init_tokenizer(&dope); INFO(printf("%sMessenger\n",dbg)); init_messenger(&dope); INFO(printf("%sScript\n",dbg)); init_script(&dope); INFO(printf("%sClipping\n",dbg)); init_clipping(&dope); INFO(printf("%sScreen Driver\n",dbg)); init_scrdrv(&dope); INFO(printf("%sInput\n",dbg)); init_input(&dope); INFO(printf("%sViewManager\n",dbg)); init_viewman(&dope); INFO(printf("%sConvertFNT\n",dbg)); init_conv_fnt(&dope); INFO(printf("%sFontManager\n",dbg)); init_fontman(&dope); INFO(printf("%sGfxScreen16\n",dbg)); init_gfxscr16(&dope); INFO(printf("%sGfxImage16\n",dbg)); init_gfximg16(&dope); INFO(printf("%sGfxImage32\n",dbg)); init_gfximg32(&dope); INFO(printf("%sGfxImageYUV420\n",dbg)); init_gfximgyuv420(&dope); INFO(printf("%sGfx\n",dbg)); init_gfx(&dope); INFO(printf("%sRedrawManager\n",dbg)); init_redraw(&dope); INFO(printf("%sUserState\n",dbg)); init_userstate(&dope); INFO(printf("%sWidgetManager\n",dbg)); init_widman(&dope); INFO(printf("%sScope\n",dbg)); init_scope(&dope); INFO(printf("%sButton\n",dbg)); init_button(&dope); INFO(printf("%sEntry\n",dbg)); init_entry(&dope); INFO(printf("%sVariable\n",dbg)); init_variable(&dope); INFO(printf("%sLabel\n",dbg)); init_label(&dope); INFO(printf("%sLoadDisplay\n",dbg)); init_loaddisplay(&dope); INFO(printf("%sBackground\n",dbg)); init_background(&dope); INFO(printf("%sScrollbar\n",dbg)); init_scrollbar(&dope); INFO(printf("%sScale\n",dbg)); init_scale(&dope); INFO(printf("%sFrame\n",dbg)); init_frame(&dope); INFO(printf("%sContainer\n",dbg)); init_container(&dope); INFO(printf("%sGrid\n",dbg)); init_grid(&dope); INFO(printf("%sWinLayout\n",dbg)); init_winlayout(&dope); INFO(printf("%sWindow\n",dbg)); init_window(&dope); INFO(printf("%sScreen\n",dbg)); init_screen(&dope); INFO(printf("%sScheduler\n",dbg)); if (config_don_scheduler) { // init_don_scheduler(&dope); printf("NOOOOOOOOOOOOOOOOOOO\n"); } else init_simple_scheduler(&dope); INFO(printf("%sVScreenServer\n",dbg)); init_vscr_server(&dope); INFO(printf("%sVScreen\n",dbg)); init_vscreen(&dope); INFO(printf("%sVTextScreen\n",dbg)); init_vtextscreen(&dope); INFO(printf("%sServer\n",dbg)); init_server(&dope); INFO(printf("%screate screen\n",dbg)); { static GFX_CONTAINER *scr_ds; gfx = pool_get("Gfx 1.0"); screen = pool_get("Screen 1.0"); userstate = pool_get("UserState 1.0"); scr_ds = gfx->alloc_scr("default"); curr_scr = screen->create(); curr_scr->scr->set_gfx(curr_scr, scr_ds); userstate->set_max_mx(gfx->get_width(scr_ds)); userstate->set_max_my(gfx->get_height(scr_ds)); } INFO(printf("%sstarting server\n",dbg)); if ((server = pool_get("Server 1.0"))) server->start(); INFO(printf("%sstarting scheduler\n",dbg)); if ((sched = pool_get("Scheduler 1.0"))) sched->process_mainloop(); return 0; }