static void cb_ts_edit() { #if 0 #if UNIX if (inmd[default_input_method].method_type==method_type_TSIN) { char tt[512]; sprintf(tt, "( cd ~/.gcin && "GCIN_BIN_DIR"/tsd2a32 %s > tmpfile && %s tmpfile && "GCIN_BIN_DIR"/tsa2d32 tmpfile %s) &", tsin32_f, utf8_edit, tsin32_f); dbg("exec %s\n", tt); system(tt); } else { char tt[512]; sprintf(tt, GCIN_SCRIPT_DIR"/tsin-gtab-edit %s", inmd[default_input_method].filename); system(tt); } #else if (inmd[default_input_method].method_type==method_type_TSIN) win32exec_script("ts-edit.bat", tsin32_f); else { win32exec_script("ts-gtab-edit.bat", inmd[default_input_method].filename); } #endif #else #if UNIX system(GCIN_BIN_DIR"/ts-edit"); #else win32exec("ts-edit.exe"); #endif #endif }
static gboolean cb_gtab_edit_append( GtkWidget *widget, GdkEvent *event, gpointer data ) { load_gtab_list(FALSE); char *fname = inmd[default_input_method].filename; if (!fname) return TRUE; char append_fname[128]; #if UNIX sprintf(append_fname, "~/.gcin/%s.append", fname); char prepare[128]; sprintf(prepare, GCIN_SCRIPT_DIR"/gtab.append_prepare %s", append_fname); system(prepare); char exec[128]; sprintf(exec, "%s %s", utf8_edit, append_fname); dbg("exec %s\n", exec); system(exec); #else strcat(strcpy(append_fname, fname), ".append"); char user_fname[512]; get_gcin_user_fname(append_fname, user_fname); if (GetFileAttributesA(user_fname) == INVALID_FILE_ATTRIBUTES) win32exec_script("gtab.append_prepare.bat", user_fname); else { win32exec_script("utf8-edit.bat", user_fname); } #endif return TRUE; }
static void cb_symbol_table() { char tt[512]; #if UNIX sprintf(tt, "( cd ~/.gcin && %s symbol-table ) &", utf8_edit); system(tt); #else char fname[512]; get_gcin_user_fname("symbol-table", fname); win32exec_script("utf8-edit.bat", fname); #endif }
static void cb_alt_shift() { #if UNIX char tt[512]; sprintf(tt, "( cd ~/.gcin && %s phrase.table ) &", utf8_edit); system(tt); #else char fname[512]; get_gcin_user_fname("phrase.table", fname); win32exec_script("utf8-edit.bat", fname); #endif }
static void cb_ts_import_sys() { #if UNIX char tt[512]; sprintf(tt, "cd ~/.gcin && "GCIN_BIN_DIR"/tsd2a32 %s > tmpfile && "GCIN_BIN_DIR"/tsd2a32 %s/%s >> tmpfile && "GCIN_BIN_DIR"/tsa2d32 tmpfile", tsin32_f, GCIN_TABLE_DIR, tsin32_f); dbg("exec %s\n", tt); system(tt); #else win32exec_script("ts-import-sys.bat", tsin32_f); #endif }