int main(int argc, char **args) { RAND = ((int)time(NULL))%10; init_console(); init_buffer(); init_clipboard(); if (argc > 1) { FILENAME = (unsigned char *)malloc(256*sizeof(char)); strcpy((char *)FILENAME, args[1]); file_to_buffer(); } else { MAX_VPOS = 1; } while (RUN) { redraw_screen(); #ifdef DEBUG_MODE printf("%d", INPUT_KEY); #endif INPUT_KEY = _getch(); process_key(); } DestroyAndExit("Exiting..."); return 0; }
KPROXY_API f8_bool kproxy_init(int leakDetect) { ITcpAdapter *a; _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); _CrtSetBreakAlloc(leakDetect); /* initialize and start kernel */ ex_init(); /* KERN_F_ENABLE_INPUT */ x_buffer = (char *)__malloc__(LARGE_BUF_SIZE); x_buf_len = LARGE_BUF_SIZE; b_ShellExit = __false; __new__(ITcpAdapter, a); proxy_adapter = __ucast__(ITcpAdapter, IKAdapter, a); sections = ke_get_blk(proxy_adapter->kernel, 0); assert(sections->uuid == BLK_ID_ROOT); create_resource(§ions->uuid); create_f8_uuid(§ions->h.uuid); create_resource(§ions->h.uuid); memset(fileName, 0 , sizeof(fileName)); g_shell = shell_create(commands); reset_reg_map(); init_blklib(); init_clipboard(); g_bDirty = __false; init_network(RTK_INIT_AS_SERVER, 0); vbus = connect_vbus(0xf8, VBUS_CONNECT_AS_SERVER, sr, 0); return __true; }
void init_subsystems(){ init_cal(); init_cli_macro(); init_clipboard(); init_commandline(); init_evilloop(); init_exec_cmd(); init_expanded(); init_file(); init_file_ascii(); init_file_help(); init_file_hnb(); init_file_html(); init_file_opml(); init_file_ps(); init_file_xml(); init_go(); init_insertbelow(); init_keepstate(); init_mem(); init_movenode(); init_nodetest(); init_outdent_indent(); init_prefs(); init_query(); init_quit(); init_remove(); init_search(); init_sort(); init_spell(); init_stats(); init_tree_todo(); init_ui_binding(); init_ui_cli(); init_ui_draw(); init_ui_edit(); init_ui_menu(); init_ui_overlay(); init_ui_style(); }
void nt_init(void) { #ifdef SECURE_CD { char temp[512]; extern char gcurr_drive; if(!GetCurrentDirectory(512,temp)) ExitProcess((DWORD)-1); gcurr_drive=temp[0]; } #endif SECURE_CD init_stdio(); nt_init_signals(); nt_term_init(); init_hb_subst(); setlocale(LC_ALL,""); init_shell_dll(); init_plister(); fork_init(); init_clipboard(); return; }