예제 #1
0
int exc_handler (word exc_no, word cs, word ip, word error)
{   
    push(exc_no);
    push(cs);
    push(ip);
    push(error);    /* No problem !! Turbo C is smart than me. ip_high is just two bytes away from ip_low, it knows !! */
    return one_word("##EXC_HANDLER");  /* execute the given word */
}
예제 #2
0
void menu_enter(){

    ///\fn void menu_enter()
    ///\brief Selectarea optiunii.
    ///
    ///Implementarea selectarii dorite in cadrul unei optiunilor din menu.


    system("cls");
    // se ia fiecare caz de meniu si fiecare caz de element de meniu in parte.

    switch(current_menu){
        // main menu
        case 0 : {
            switch (highlighted_item){
                case 0 : {//input one word
                    one_word();
                    break;
                }
                case 1 : {//From file
                    from_file();
                    break;
                }
                case 2 : {//Live
                    live_input();
                    break;
                }
                case 3 : {//options-menu
                    current_menu = 1;
                    highlighted_item = 0;
                    break;
                }
                case 4 : {//Exit
                    printf("\n\n\tGood bye!");
                    Sleep(750);
                    exit(0);
                    break;
                }
            }
            break;
        }

        //options-menu
        case 1 : {
            switch (highlighted_item){
                case 0 : {//Update words apparitions
                    update_app_words();
                    break;
                }
                case 1 : {//Insert an word to dictionary
                    insert_word();
                    break;
                }
                case 2 : {//Delete an word from dictionary
                    delete_word();
                    break;
                }
                case 3 : {//Reset dictionary
                    reset_dict();
                    break;
                }
                case 4 : {//Build dictionary from file
                    build_dict();
                    break;
                }
                case 5 : {//Add words to dictionary from file
                    update_words();
                    break;
                }
                case 6 : {//select_suggestions_funcition
                    current_menu = 2;
                    highlighted_item = sugg_funct;
                    break;
                }
                case 7 : {//back
                    current_menu = 0;
                    highlighted_item = 0;
                    break;
                }
            }
            break;
        }

        //select suggestion functions
        case 2 : {
            switch (highlighted_item){
                case 0 : {//leven
                    sugg_funct = 0;
                    break;
                }
                case 1 : {//leven 2.0
                    sugg_funct = 1;
                    break;
                }
                case 2 : {//back
                    current_menu = 1;
                    highlighted_item = 0;
                    break;
                }
            }
        }
    }
    print_menu();
    Sleep(50);
}