static void stash_select(struct view *view, struct line *line) { main_select(view, line); string_format(view->env->stash, "stash@{%d}", line->lineno - 1); string_copy(view->ref, view->env->stash); }
int main(void) { int x1=0; char *menu[]={"1.한글 타자연습","2.영문 타자연습", "3.테트리스", "4.끝내기"}; char ch; int color[]={9,10,11,12,13,14}; int ccur=0; int time1; int time2; noCursor(); Func_table(); Func_JDT(color[ccur]); Menu_print(menu,x1, 4); time1=GetTickCount(); while(1) { time2=GetTickCount(); if(time2-time1>1000){ if(ccur==5) ccur=0; ccur++; Func_JDT(color[ccur]); time1=GetTickCount(); } if(kbhit()) { ch=getch(); if(ch==-32 || ch==ENTER || ch==ESC) { if(ch!=ENTER && ch!=ESC) ch=getch(); switch(ch) { case UP: if(x1>0) x1--; break; case DOWN: if(x1<3) x1++; break; case ENTER: main_select(x1); Func_table(); Func_JDT(color[ccur]); break; case ESC: cls(); return 0; } Menu_print(menu,x1, 4); } } } }