Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Features » Vocabulary/Source/main
Vocabulary/Source/main
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1996-03 B.adf » Features |
Filename: | Vocabulary/Source/main |
Read OK: | ✔ |
File size: | 2C03 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
/* Title: vocab * * Purpose: A vocab VOCABULARY TESTER */ #include "inc.h" /********************************* CONSTANTS ********************************/ /* Menu items */ #define vocab_menu_info 1 #define vocab_menu_restart 2 #define vocab_menu_show_wrong_answers 3 #define vocab_menu_edit_words 4 #define vocab_menu_options 5 #define vocab_menu_quit 6 #define wrong_menu_clear 1 #define wrong_menu_delete 2 #define wrong_menu_save 3 #define edit_menu_clear 1 #define edit_menu_insert 2 #define edit_menu_delete 3 #define edit_menu_save 4 extern int loader(void); int dn; int wn; int n; extern int option1; extern int ins; extern void vocab_info_about_program(void); extern void vocab_iconclick(wimp_i icon); extern void m_handler(dbox m1, void *handle); extern void wrong_handler(dbox wrong1, void *handle); extern void edit_handler(dbox edit1, void *handle); extern void options_handler(dbox options1, void *handle); extern void options_window(void); extern void drawbox(void); extern void mchkmsg(wimp_eventstr *e, void *handle); extern void edelete_window(void); extern void wdelete_window(void); extern void einsert_window(void); extern void winsert_window(void); extern void schange_english(void); extern void schange_german(void); extern void schange_title(void); extern void schange_subtitle(void); extern void schange_title(void); extern void schange_language(void); extern void schange_wrong_word_english(void); extern void schange_wrong_word_german(void); extern void getnew_edit(void); extern void redraw_edit(void); extern void redraw_wrong(void); extern void edit_delete(void); extern void edit_insert(void); extern void wrong_delete(void); char temp_dn[50]; char temp_ins[50]; extern int csound; extern int wsound; /******************************** GLOBAL DATA *******************************/ /* The top of the menu tree */ menu vocab_menu; menu wrong_menu; menu edit_menu; menu edelete_menu; menu wdelete_menu; menu insert_menu; int position; int i; int num; int quest; int addon1; int addon2; int now=0; char message[60]; char userger[50]; char usereng[50]; char wrong_word_english[170][40]; char wrong_word_german[170][40]; char tosave_english[170][40]; char tosave_german[170][40]; char tosave_wrong_word_english[170][40]; char tosave_wrong_word_german[170][40]; char tosave_title[50]; char tosave_language[50]; char tosave_subtitle[50]; char title[70]; char subtitle[70]; char ans[70]; char german[170][40]; char english[170][40]; char file_to_load[50]; char language[70]; dbox m; /* Dialogue box handle */ dbox info; /* Dialogue box handle */ dbox score; dbox edit; dbox wrong; dbox options; /***************************** WINDOW FUNCTIONS *****************************/ void get_new_n(void) { n = 149; while(strcmp(german[n],"")==0 && strcmp(english[n],"")==0) { n--; } n++; } void kill_gaps(void) { int be=0; get_new_n(); while (be<n) { if (strcmp(german[be],"")!=0 && strcmp(english[be],"")!=0) { strcpy(german[dn],german[dn+1]); strcpy(english[dn],english[dn+1]); } be++; } } void restart(void) { i=0; num=0; quest=0; dbox_hide(m); drawbox(); dbox_showstatic(m); dbox_setfield(m,2,""); dbox_hide(edit); } BOOL esaver(char *filename, void *handle) { FILE *fp; int lop; char send[135]; getnew_edit(); schange_english(); schange_german(); schange_title(); schange_language(); schange_subtitle(); /*kill_gaps();*/ handle=handle; strcpy(file_to_load,filename); fp=fopen(file_to_load,"w"); lop=0; if (strcmp(title,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_title); } if (strcmp(subtitle,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_subtitle); } if (strcmp(language,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_language); } for (lop=0;lop<150;lop++) { fprintf (fp,"%s %s\n",tosave_german[lop],tosave_english[lop]); } fclose(fp); sprintf(send,"settype %s DF1",file_to_load); os_cli(send); return TRUE; } BOOL wsaver(char *filename, void *handle) { FILE *fp; int b; char send[135]; schange_wrong_word_german(); schange_wrong_word_english(); schange_title(); schange_language(); schange_subtitle(); handle=handle; strcpy(file_to_load,filename); fp=fopen(file_to_load,"w"); b=0; if (strcmp(title,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_title); } if (strcmp(subtitle,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_subtitle); } if (strcmp(language,"")==0) { fprintf (fp,"%s\n","*"); } else { fprintf (fp,"%s\n",tosave_language); } for (b=0;b<150;b++) { fprintf (fp,"%s %s\n",tosave_wrong_word_german[b], tosave_wrong_word_english[b]); } fclose(fp); sprintf(send,"settype %s DF1",file_to_load); os_cli(send); return TRUE; } /*--- Event handler for the menu. ---*/ void vocab_menuproc(void *handle, char *hit) { int ab; handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case vocab_menu_info: vocab_info_about_program(); break; case vocab_menu_restart: if (now==1) { dbox_setnumeric(options,2,1); dbox_setnumeric(options,1,0); dbox_setnumeric(options,4,1); dbox_setnumeric(options,6,1); now=0; } get_new_n(); restart(); break; case vocab_menu_show_wrong_answers: dbox_showstatic(wrong); redraw_wrong(); break; case vocab_menu_edit_words: dbox_showstatic(edit); dbox_hide(m); redraw_edit(); break; case vocab_menu_options: options_window(); break; case vocab_menu_quit: /*wimp_releaseinterface ();*/ /* Exit from the program. The wimp gets rid of the window and icon */ ab = dboxquery("Are you sure you want to quit?"); if (ab == 1) { exit(0); } else { return; } } } void wrong_menuproc(void *handle, char *hit) { int jk; handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case 1: jk = dboxquery("Are you sure you want to clear?"); if (jk == 1) { memset(wrong_word_german,0,6800); memset(wrong_word_english,0,6800); } else { return; } wn=0; redraw_wrong(); break; case 2: wrong_delete(); redraw_wrong(); break; case 3: saveas(0xDF1,file_to_load,0,wsaver,0,0,0); break; } } void edit_menuproc(void *handle, char *hit) { int pe; handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case 1: pe = dboxquery("Are you sure you want to clear?"); if (pe==1) { memset(german,0,6800); memset(english,0,6800); strcpy(title,""); strcpy(language,""); strcpy(subtitle,""); redraw_edit(); } else { return; } break; case 2: getnew_edit(); edit_insert(); redraw_edit(); break; case 3: edit_delete(); redraw_edit(); break; case 4: saveas(0xDF1,file_to_load,0,esaver,0,0,0); break; } } void edelete_menuproc(void *handle, char *hit) { handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case 1: edit_delete(); break; } } void insert_menuproc(void *handle, char *hit) { handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case 1: edit_insert(); redraw_edit(); break; } } void wdelete_menuproc(void *handle, char *hit) { handle = handle; /* We don't need handle: this stops compiler warning */ /* Find which menu item was hit and take action as appropriate */ switch (hit[0]) { case 1: wrong_delete(); redraw_wrong(); break; } } /****************************** INITIALISATION ******************************/ /*--- Initialise the program, returning TRUE if it was all OK. ---*/ static BOOL vocab_initialise(void) { /* RISC_OSlib initialisation */ wimpt_init("vocab");/* Main Wimp initialisation */ res_init("vocab"); /* Resources */ resspr_init(); /* Application sprites */ template_init(); /* Templates */ dbox_init(); /* Dialogue boxes */ /* Create the menu tree */ if (vocab_menu = menu_new("Vocab", ">Info|Restart,Show Wrong Answers...,Edit Words...,Options...|Quit"), vocab_menu == NULL) return FALSE; /* Menu create failed */ if (wrong_menu = menu_new("Wrong Words", "CLEAR,Delete|>Save"), wrong_menu == NULL) return FALSE; /* Menu create failed */ if (edit_menu = menu_new("Edit Words", "CLEAR,Insert,Delete|>Save"), edit_menu == NULL) return FALSE; /* Menu create failed */ if (edelete_menu = menu_new("Delete No.", "ABC"), edelete_menu == NULL) return FALSE; /* Menu create failed */ if (wdelete_menu = menu_new("Delete No.", "ABC"), wdelete_menu == NULL) return FALSE; /* Menu create failed */ if (insert_menu = menu_new("Insert No.", "ABC"), insert_menu == NULL) return FALSE; /* Menu create failed */ menu_submenu(edit_menu,3,edelete_menu); menu_submenu(wrong_menu,2,wdelete_menu); menu_submenu(edit_menu,2,insert_menu); win_register_event_handler(win_ICONBARLOAD, mchkmsg,0); /* Set up the icon on the icon bar, and declare its event handlers */ baricon("!vocab", (int)resspr_area(), vocab_iconclick); if (!event_attachmenu(win_ICONBAR, vocab_menu, vocab_menuproc, 0)) return FALSE; /* Unable to attach menu */ menu_make_writeable(edelete_menu,1,temp_dn,10,""); menu_make_writeable(wdelete_menu,1,temp_dn,10,""); menu_make_writeable(insert_menu,1,temp_ins,10,""); if (m = dbox_new("m"), m != NULL); { dbox_eventhandler(m,m_handler,0); } if (options = dbox_new("OPT"), options != NULL); { dbox_eventhandler(options,options_handler,0); } if (wrong = dbox_new("wrong"), wrong != NULL); { dbox_eventhandler(wrong,wrong_handler,0); if (!event_attachmenu(dbox_syshandle(wrong),wrong_menu,wrong_menuproc, 0)) return FALSE; /* Unable to attach menu */ } if (edit = dbox_new("edit"), edit != NULL); { dbox_eventhandler(edit,edit_handler,0); if (!event_attachmenu(dbox_syshandle(edit),edit_menu,edit_menuproc, 0)) return FALSE; /* Unable to attach menu */ } /*wimpt_complain (wimp_claiminterface ()); */ /* All went ok */ return TRUE; } /******************************* MAIN PROGRAM ********************************/ /*--- Main entry point. ---*/ int main() { strcpy(language,"<None>"); /* strcpy(file_to_load,"<obey$Dir>.words"); */ csound=1; wsound=1; now=1; if (vocab_initialise()) { /* The main event loop */ while (TRUE) event_process(); } return 0; }
00000000 2f 2a 20 54 69 74 6c 65 3a 20 20 20 20 20 76 6f |/* Title: vo| 00000010 63 61 62 0a 20 2a 0a 20 2a 20 50 75 72 70 6f 73 |cab. *. * Purpos| 00000020 65 3a 20 41 20 76 6f 63 61 62 20 56 4f 43 41 42 |e: A vocab VOCAB| 00000030 55 4c 41 52 59 20 54 45 53 54 45 52 0a 20 2a 2f |ULARY TESTER. */| 00000040 0a 0a 0a 23 69 6e 63 6c 75 64 65 20 22 69 6e 63 |...#include "inc| 00000050 2e 68 22 0a 0a 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |.h"../**********| 00000060 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000070 2a 2a 2a 2a 2a 2a 2a 20 43 4f 4e 53 54 41 4e 54 |******* CONSTANT| 00000080 53 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |S **************| 00000090 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000000a0 2a 2a 2f 0a 0a 2f 2a 20 4d 65 6e 75 20 69 74 65 |**/../* Menu ite| 000000b0 6d 73 20 2a 2f 0a 23 64 65 66 69 6e 65 20 76 6f |ms */.#define vo| 000000c0 63 61 62 5f 6d 65 6e 75 5f 69 6e 66 6f 20 20 20 |cab_menu_info | 000000d0 20 20 20 20 20 31 0a 23 64 65 66 69 6e 65 20 76 | 1.#define v| 000000e0 6f 63 61 62 5f 6d 65 6e 75 5f 72 65 73 74 61 72 |ocab_menu_restar| 000000f0 74 20 20 20 20 20 32 0a 23 64 65 66 69 6e 65 20 |t 2.#define | 00000100 76 6f 63 61 62 5f 6d 65 6e 75 5f 73 68 6f 77 5f |vocab_menu_show_| 00000110 77 72 6f 6e 67 5f 61 6e 73 77 65 72 73 20 33 0a |wrong_answers 3.| 00000120 23 64 65 66 69 6e 65 20 76 6f 63 61 62 5f 6d 65 |#define vocab_me| 00000130 6e 75 5f 65 64 69 74 5f 77 6f 72 64 73 20 20 34 |nu_edit_words 4| 00000140 0a 23 64 65 66 69 6e 65 20 76 6f 63 61 62 5f 6d |.#define vocab_m| 00000150 65 6e 75 5f 6f 70 74 69 6f 6e 73 20 20 20 20 20 |enu_options | 00000160 35 0a 23 64 65 66 69 6e 65 20 76 6f 63 61 62 5f |5.#define vocab_| 00000170 6d 65 6e 75 5f 71 75 69 74 20 20 20 20 20 20 20 |menu_quit | 00000180 20 36 0a 0a 23 64 65 66 69 6e 65 20 77 72 6f 6e | 6..#define wron| 00000190 67 5f 6d 65 6e 75 5f 63 6c 65 61 72 20 20 20 20 |g_menu_clear | 000001a0 20 31 0a 23 64 65 66 69 6e 65 20 77 72 6f 6e 67 | 1.#define wrong| 000001b0 5f 6d 65 6e 75 5f 64 65 6c 65 74 65 20 20 20 20 |_menu_delete | 000001c0 32 0a 23 64 65 66 69 6e 65 20 77 72 6f 6e 67 5f |2.#define wrong_| 000001d0 6d 65 6e 75 5f 73 61 76 65 20 20 20 20 20 20 33 |menu_save 3| 000001e0 0a 0a 23 64 65 66 69 6e 65 20 65 64 69 74 5f 6d |..#define edit_m| 000001f0 65 6e 75 5f 63 6c 65 61 72 20 20 20 20 20 20 31 |enu_clear 1| 00000200 0a 23 64 65 66 69 6e 65 20 65 64 69 74 5f 6d 65 |.#define edit_me| 00000210 6e 75 5f 69 6e 73 65 72 74 20 20 20 20 20 32 0a |nu_insert 2.| 00000220 23 64 65 66 69 6e 65 20 65 64 69 74 5f 6d 65 6e |#define edit_men| 00000230 75 5f 64 65 6c 65 74 65 20 20 20 20 20 33 0a 23 |u_delete 3.#| 00000240 64 65 66 69 6e 65 20 65 64 69 74 5f 6d 65 6e 75 |define edit_menu| 00000250 5f 73 61 76 65 20 20 20 20 20 20 20 34 0a 0a 0a |_save 4...| 00000260 0a 0a 65 78 74 65 72 6e 20 69 6e 74 20 6c 6f 61 |..extern int loa| 00000270 64 65 72 28 76 6f 69 64 29 3b 0a 69 6e 74 20 64 |der(void);.int d| 00000280 6e 3b 0a 69 6e 74 20 77 6e 3b 0a 69 6e 74 20 6e |n;.int wn;.int n| 00000290 3b 0a 65 78 74 65 72 6e 20 69 6e 74 20 6f 70 74 |;.extern int opt| 000002a0 69 6f 6e 31 3b 0a 65 78 74 65 72 6e 20 69 6e 74 |ion1;.extern int| 000002b0 20 69 6e 73 3b 0a 0a 0a 65 78 74 65 72 6e 20 76 | ins;...extern v| 000002c0 6f 69 64 20 76 6f 63 61 62 5f 69 6e 66 6f 5f 61 |oid vocab_info_a| 000002d0 62 6f 75 74 5f 70 72 6f 67 72 61 6d 28 76 6f 69 |bout_program(voi| 000002e0 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 |d);.extern void | 000002f0 76 6f 63 61 62 5f 69 63 6f 6e 63 6c 69 63 6b 28 |vocab_iconclick(| 00000300 77 69 6d 70 5f 69 20 69 63 6f 6e 29 3b 0a 65 78 |wimp_i icon);.ex| 00000310 74 65 72 6e 20 76 6f 69 64 20 6d 5f 68 61 6e 64 |tern void m_hand| 00000320 6c 65 72 28 64 62 6f 78 20 6d 31 2c 20 76 6f 69 |ler(dbox m1, voi| 00000330 64 20 2a 68 61 6e 64 6c 65 29 3b 0a 65 78 74 65 |d *handle);.exte| 00000340 72 6e 20 76 6f 69 64 20 77 72 6f 6e 67 5f 68 61 |rn void wrong_ha| 00000350 6e 64 6c 65 72 28 64 62 6f 78 20 77 72 6f 6e 67 |ndler(dbox wrong| 00000360 31 2c 20 76 6f 69 64 20 2a 68 61 6e 64 6c 65 29 |1, void *handle)| 00000370 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 65 64 |;.extern void ed| 00000380 69 74 5f 68 61 6e 64 6c 65 72 28 64 62 6f 78 20 |it_handler(dbox | 00000390 65 64 69 74 31 2c 20 76 6f 69 64 20 2a 68 61 6e |edit1, void *han| 000003a0 64 6c 65 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 |dle);.extern voi| 000003b0 64 20 6f 70 74 69 6f 6e 73 5f 68 61 6e 64 6c 65 |d options_handle| 000003c0 72 28 64 62 6f 78 20 6f 70 74 69 6f 6e 73 31 2c |r(dbox options1,| 000003d0 20 76 6f 69 64 20 2a 68 61 6e 64 6c 65 29 3b 0a | void *handle);.| 000003e0 65 78 74 65 72 6e 20 76 6f 69 64 20 6f 70 74 69 |extern void opti| 000003f0 6f 6e 73 5f 77 69 6e 64 6f 77 28 76 6f 69 64 29 |ons_window(void)| 00000400 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 64 72 |;.extern void dr| 00000410 61 77 62 6f 78 28 76 6f 69 64 29 3b 0a 65 78 74 |awbox(void);.ext| 00000420 65 72 6e 20 76 6f 69 64 20 6d 63 68 6b 6d 73 67 |ern void mchkmsg| 00000430 28 77 69 6d 70 5f 65 76 65 6e 74 73 74 72 20 2a |(wimp_eventstr *| 00000440 65 2c 20 76 6f 69 64 20 2a 68 61 6e 64 6c 65 29 |e, void *handle)| 00000450 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 65 64 |;.extern void ed| 00000460 65 6c 65 74 65 5f 77 69 6e 64 6f 77 28 76 6f 69 |elete_window(voi| 00000470 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 |d);.extern void | 00000480 77 64 65 6c 65 74 65 5f 77 69 6e 64 6f 77 28 76 |wdelete_window(v| 00000490 6f 69 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 |oid);.extern voi| 000004a0 64 20 65 69 6e 73 65 72 74 5f 77 69 6e 64 6f 77 |d einsert_window| 000004b0 28 76 6f 69 64 29 3b 0a 65 78 74 65 72 6e 20 76 |(void);.extern v| 000004c0 6f 69 64 20 77 69 6e 73 65 72 74 5f 77 69 6e 64 |oid winsert_wind| 000004d0 6f 77 28 76 6f 69 64 29 3b 0a 65 78 74 65 72 6e |ow(void);.extern| 000004e0 20 76 6f 69 64 20 73 63 68 61 6e 67 65 5f 65 6e | void schange_en| 000004f0 67 6c 69 73 68 28 76 6f 69 64 29 3b 0a 65 78 74 |glish(void);.ext| 00000500 65 72 6e 20 76 6f 69 64 20 73 63 68 61 6e 67 65 |ern void schange| 00000510 5f 67 65 72 6d 61 6e 28 76 6f 69 64 29 3b 0a 65 |_german(void);.e| 00000520 78 74 65 72 6e 20 76 6f 69 64 20 73 63 68 61 6e |xtern void schan| 00000530 67 65 5f 74 69 74 6c 65 28 76 6f 69 64 29 3b 0a |ge_title(void);.| 00000540 65 78 74 65 72 6e 20 76 6f 69 64 20 73 63 68 61 |extern void scha| 00000550 6e 67 65 5f 73 75 62 74 69 74 6c 65 28 76 6f 69 |nge_subtitle(voi| 00000560 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 |d);.extern void | 00000570 73 63 68 61 6e 67 65 5f 74 69 74 6c 65 28 76 6f |schange_title(vo| 00000580 69 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 |id);.extern void| 00000590 20 73 63 68 61 6e 67 65 5f 6c 61 6e 67 75 61 67 | schange_languag| 000005a0 65 28 76 6f 69 64 29 3b 0a 65 78 74 65 72 6e 20 |e(void);.extern | 000005b0 76 6f 69 64 20 73 63 68 61 6e 67 65 5f 77 72 6f |void schange_wro| 000005c0 6e 67 5f 77 6f 72 64 5f 65 6e 67 6c 69 73 68 28 |ng_word_english(| 000005d0 76 6f 69 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f |void);.extern vo| 000005e0 69 64 20 73 63 68 61 6e 67 65 5f 77 72 6f 6e 67 |id schange_wrong| 000005f0 5f 77 6f 72 64 5f 67 65 72 6d 61 6e 28 76 6f 69 |_word_german(voi| 00000600 64 29 3b 0a 0a 0a 65 78 74 65 72 6e 20 76 6f 69 |d);...extern voi| 00000610 64 20 67 65 74 6e 65 77 5f 65 64 69 74 28 76 6f |d getnew_edit(vo| 00000620 69 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 |id);.extern void| 00000630 20 72 65 64 72 61 77 5f 65 64 69 74 28 76 6f 69 | redraw_edit(voi| 00000640 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 |d);.extern void | 00000650 72 65 64 72 61 77 5f 77 72 6f 6e 67 28 76 6f 69 |redraw_wrong(voi| 00000660 64 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 |d);.extern void | 00000670 65 64 69 74 5f 64 65 6c 65 74 65 28 76 6f 69 64 |edit_delete(void| 00000680 29 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 65 |);.extern void e| 00000690 64 69 74 5f 69 6e 73 65 72 74 28 76 6f 69 64 29 |dit_insert(void)| 000006a0 3b 0a 65 78 74 65 72 6e 20 76 6f 69 64 20 77 72 |;.extern void wr| 000006b0 6f 6e 67 5f 64 65 6c 65 74 65 28 76 6f 69 64 29 |ong_delete(void)| 000006c0 3b 0a 63 68 61 72 20 74 65 6d 70 5f 64 6e 5b 35 |;.char temp_dn[5| 000006d0 30 5d 3b 0a 63 68 61 72 20 74 65 6d 70 5f 69 6e |0];.char temp_in| 000006e0 73 5b 35 30 5d 3b 0a 0a 65 78 74 65 72 6e 20 69 |s[50];..extern i| 000006f0 6e 74 20 63 73 6f 75 6e 64 3b 0a 65 78 74 65 72 |nt csound;.exter| 00000700 6e 20 69 6e 74 20 77 73 6f 75 6e 64 3b 0a 0a 2f |n int wsound;../| 00000710 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| * 00000730 20 47 4c 4f 42 41 4c 20 44 41 54 41 20 2a 2a 2a | GLOBAL DATA ***| 00000740 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000750 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0a 0a 2f |************/../| 00000760 2a 20 54 68 65 20 74 6f 70 20 6f 66 20 74 68 65 |* The top of the| 00000770 20 6d 65 6e 75 20 74 72 65 65 20 2a 2f 0a 6d 65 | menu tree */.me| 00000780 6e 75 20 76 6f 63 61 62 5f 6d 65 6e 75 3b 0a 6d |nu vocab_menu;.m| 00000790 65 6e 75 20 77 72 6f 6e 67 5f 6d 65 6e 75 3b 0a |enu wrong_menu;.| 000007a0 6d 65 6e 75 20 65 64 69 74 5f 6d 65 6e 75 3b 0a |menu edit_menu;.| 000007b0 6d 65 6e 75 20 65 64 65 6c 65 74 65 5f 6d 65 6e |menu edelete_men| 000007c0 75 3b 0a 6d 65 6e 75 20 77 64 65 6c 65 74 65 5f |u;.menu wdelete_| 000007d0 6d 65 6e 75 3b 0a 6d 65 6e 75 20 69 6e 73 65 72 |menu;.menu inser| 000007e0 74 5f 6d 65 6e 75 3b 0a 0a 0a 69 6e 74 20 70 6f |t_menu;...int po| 000007f0 73 69 74 69 6f 6e 3b 0a 69 6e 74 20 69 3b 0a 69 |sition;.int i;.i| 00000800 6e 74 20 6e 75 6d 3b 0a 69 6e 74 20 71 75 65 73 |nt num;.int ques| 00000810 74 3b 0a 69 6e 74 20 61 64 64 6f 6e 31 3b 0a 69 |t;.int addon1;.i| 00000820 6e 74 20 61 64 64 6f 6e 32 3b 0a 69 6e 74 20 6e |nt addon2;.int n| 00000830 6f 77 3d 30 3b 0a 0a 63 68 61 72 20 6d 65 73 73 |ow=0;..char mess| 00000840 61 67 65 5b 36 30 5d 3b 0a 63 68 61 72 20 75 73 |age[60];.char us| 00000850 65 72 67 65 72 5b 35 30 5d 3b 0a 63 68 61 72 20 |erger[50];.char | 00000860 75 73 65 72 65 6e 67 5b 35 30 5d 3b 0a 63 68 61 |usereng[50];.cha| 00000870 72 20 77 72 6f 6e 67 5f 77 6f 72 64 5f 65 6e 67 |r wrong_word_eng| 00000880 6c 69 73 68 5b 31 37 30 5d 5b 34 30 5d 3b 0a 63 |lish[170][40];.c| 00000890 68 61 72 20 77 72 6f 6e 67 5f 77 6f 72 64 5f 67 |har wrong_word_g| 000008a0 65 72 6d 61 6e 5b 31 37 30 5d 5b 34 30 5d 3b 0a |erman[170][40];.| 000008b0 0a 63 68 61 72 20 74 6f 73 61 76 65 5f 65 6e 67 |.char tosave_eng| 000008c0 6c 69 73 68 5b 31 37 30 5d 5b 34 30 5d 3b 0a 63 |lish[170][40];.c| 000008d0 68 61 72 20 74 6f 73 61 76 65 5f 67 65 72 6d 61 |har tosave_germa| 000008e0 6e 5b 31 37 30 5d 5b 34 30 5d 3b 0a 63 68 61 72 |n[170][40];.char| 000008f0 20 74 6f 73 61 76 65 5f 77 72 6f 6e 67 5f 77 6f | tosave_wrong_wo| 00000900 72 64 5f 65 6e 67 6c 69 73 68 5b 31 37 30 5d 5b |rd_english[170][| 00000910 34 30 5d 3b 0a 63 68 61 72 20 74 6f 73 61 76 65 |40];.char tosave| 00000920 5f 77 72 6f 6e 67 5f 77 6f 72 64 5f 67 65 72 6d |_wrong_word_germ| 00000930 61 6e 5b 31 37 30 5d 5b 34 30 5d 3b 0a 63 68 61 |an[170][40];.cha| 00000940 72 20 74 6f 73 61 76 65 5f 74 69 74 6c 65 5b 35 |r tosave_title[5| 00000950 30 5d 3b 0a 63 68 61 72 20 74 6f 73 61 76 65 5f |0];.char tosave_| 00000960 6c 61 6e 67 75 61 67 65 5b 35 30 5d 3b 0a 63 68 |language[50];.ch| 00000970 61 72 20 74 6f 73 61 76 65 5f 73 75 62 74 69 74 |ar tosave_subtit| 00000980 6c 65 5b 35 30 5d 3b 0a 63 68 61 72 20 74 69 74 |le[50];.char tit| 00000990 6c 65 5b 37 30 5d 3b 0a 63 68 61 72 20 73 75 62 |le[70];.char sub| 000009a0 74 69 74 6c 65 5b 37 30 5d 3b 0a 63 68 61 72 20 |title[70];.char | 000009b0 61 6e 73 5b 37 30 5d 3b 0a 63 68 61 72 20 67 65 |ans[70];.char ge| 000009c0 72 6d 61 6e 5b 31 37 30 5d 5b 34 30 5d 3b 0a 63 |rman[170][40];.c| 000009d0 68 61 72 20 65 6e 67 6c 69 73 68 5b 31 37 30 5d |har english[170]| 000009e0 5b 34 30 5d 3b 0a 63 68 61 72 20 66 69 6c 65 5f |[40];.char file_| 000009f0 74 6f 5f 6c 6f 61 64 5b 35 30 5d 3b 0a 63 68 61 |to_load[50];.cha| 00000a00 72 20 6c 61 6e 67 75 61 67 65 5b 37 30 5d 3b 0a |r language[70];.| 00000a10 0a 64 62 6f 78 20 20 6d 3b 20 20 2f 2a 20 44 69 |.dbox m; /* Di| 00000a20 61 6c 6f 67 75 65 20 62 6f 78 20 68 61 6e 64 6c |alogue box handl| 00000a30 65 20 2a 2f 0a 64 62 6f 78 20 20 69 6e 66 6f 3b |e */.dbox info;| 00000a40 20 20 2f 2a 20 44 69 61 6c 6f 67 75 65 20 62 6f | /* Dialogue bo| 00000a50 78 20 68 61 6e 64 6c 65 20 2a 2f 0a 64 62 6f 78 |x handle */.dbox| 00000a60 20 73 63 6f 72 65 3b 0a 0a 0a 0a 0a 64 62 6f 78 | score;.....dbox| 00000a70 20 65 64 69 74 3b 0a 64 62 6f 78 20 77 72 6f 6e | edit;.dbox wron| 00000a80 67 3b 0a 64 62 6f 78 20 6f 70 74 69 6f 6e 73 3b |g;.dbox options;| 00000a90 0a 0a 0a 0a 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..../***********| 00000aa0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000ab0 2a 2a 20 57 49 4e 44 4f 57 20 46 55 4e 43 54 49 |** WINDOW FUNCTI| 00000ac0 4f 4e 53 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |ONS ************| 00000ad0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000ae0 2a 2f 0a 0a 76 6f 69 64 20 67 65 74 5f 6e 65 77 |*/..void get_new| 00000af0 5f 6e 28 76 6f 69 64 29 0a 7b 0a 20 20 20 20 6e |_n(void).{. n| 00000b00 20 3d 20 31 34 39 3b 0a 20 20 20 20 77 68 69 6c | = 149;. whil| 00000b10 65 28 73 74 72 63 6d 70 28 67 65 72 6d 61 6e 5b |e(strcmp(german[| 00000b20 6e 5d 2c 22 22 29 3d 3d 30 20 26 26 20 73 74 72 |n],"")==0 && str| 00000b30 63 6d 70 28 65 6e 67 6c 69 73 68 5b 6e 5d 2c 22 |cmp(english[n],"| 00000b40 22 29 3d 3d 30 29 0a 20 20 20 20 7b 0a 20 20 20 |")==0). {. | 00000b50 20 6e 2d 2d 3b 0a 20 20 20 20 7d 0a 20 20 20 20 | n--;. }. | 00000b60 6e 2b 2b 3b 0a 7d 0a 0a 0a 0a 0a 76 6f 69 64 20 |n++;.}.....void | 00000b70 6b 69 6c 6c 5f 67 61 70 73 28 76 6f 69 64 29 0a |kill_gaps(void).| 00000b80 7b 0a 69 6e 74 20 62 65 3d 30 3b 0a 0a 67 65 74 |{.int be=0;..get| 00000b90 5f 6e 65 77 5f 6e 28 29 3b 0a 0a 0a 20 20 20 20 |_new_n();... | 00000ba0 77 68 69 6c 65 20 28 62 65 3c 6e 29 0a 20 20 20 |while (be<n). | 00000bb0 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 73 | {. if (s| 00000bc0 74 72 63 6d 70 28 67 65 72 6d 61 6e 5b 62 65 5d |trcmp(german[be]| 00000bd0 2c 22 22 29 21 3d 30 20 26 26 20 73 74 72 63 6d |,"")!=0 && strcm| 00000be0 70 28 65 6e 67 6c 69 73 68 5b 62 65 5d 2c 22 22 |p(english[be],""| 00000bf0 29 21 3d 30 29 0a 20 20 20 20 20 20 20 20 7b 0a |)!=0). {.| 00000c00 20 20 20 20 20 20 20 20 73 74 72 63 70 79 28 67 | strcpy(g| 00000c10 65 72 6d 61 6e 5b 64 6e 5d 2c 67 65 72 6d 61 6e |erman[dn],german| 00000c20 5b 64 6e 2b 31 5d 29 3b 0a 20 20 20 20 20 20 20 |[dn+1]);. | 00000c30 20 73 74 72 63 70 79 28 65 6e 67 6c 69 73 68 5b | strcpy(english[| 00000c40 64 6e 5d 2c 65 6e 67 6c 69 73 68 5b 64 6e 2b 31 |dn],english[dn+1| 00000c50 5d 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 |]);. }.. | 00000c60 20 20 20 62 65 2b 2b 3b 0a 20 20 20 20 7d 0a 0a | be++;. }..| 00000c70 0a 0a 0a 7d 0a 0a 0a 0a 76 6f 69 64 20 72 65 73 |...}....void res| 00000c80 74 61 72 74 28 76 6f 69 64 29 0a 7b 0a 69 3d 30 |tart(void).{.i=0| 00000c90 3b 0a 6e 75 6d 3d 30 3b 0a 71 75 65 73 74 3d 30 |;.num=0;.quest=0| 00000ca0 3b 0a 64 62 6f 78 5f 68 69 64 65 28 6d 29 3b 0a |;.dbox_hide(m);.| 00000cb0 0a 64 72 61 77 62 6f 78 28 29 3b 0a 64 62 6f 78 |.drawbox();.dbox| 00000cc0 5f 73 68 6f 77 73 74 61 74 69 63 28 6d 29 3b 0a |_showstatic(m);.| 00000cd0 64 62 6f 78 5f 73 65 74 66 69 65 6c 64 28 6d 2c |dbox_setfield(m,| 00000ce0 32 2c 22 22 29 3b 0a 64 62 6f 78 5f 68 69 64 65 |2,"");.dbox_hide| 00000cf0 28 65 64 69 74 29 3b 0a 7d 0a 0a 42 4f 4f 4c 20 |(edit);.}..BOOL | 00000d00 65 73 61 76 65 72 28 63 68 61 72 20 2a 66 69 6c |esaver(char *fil| 00000d10 65 6e 61 6d 65 2c 20 76 6f 69 64 20 2a 68 61 6e |ename, void *han| 00000d20 64 6c 65 29 0a 7b 0a 0a 0a 46 49 4c 45 20 2a 66 |dle).{...FILE *f| 00000d30 70 3b 0a 0a 69 6e 74 20 6c 6f 70 3b 0a 63 68 61 |p;..int lop;.cha| 00000d40 72 20 73 65 6e 64 5b 31 33 35 5d 3b 0a 67 65 74 |r send[135];.get| 00000d50 6e 65 77 5f 65 64 69 74 28 29 3b 0a 73 63 68 61 |new_edit();.scha| 00000d60 6e 67 65 5f 65 6e 67 6c 69 73 68 28 29 3b 0a 73 |nge_english();.s| 00000d70 63 68 61 6e 67 65 5f 67 65 72 6d 61 6e 28 29 3b |change_german();| 00000d80 0a 73 63 68 61 6e 67 65 5f 74 69 74 6c 65 28 29 |.schange_title()| 00000d90 3b 0a 73 63 68 61 6e 67 65 5f 6c 61 6e 67 75 61 |;.schange_langua| 00000da0 67 65 28 29 3b 0a 73 63 68 61 6e 67 65 5f 73 75 |ge();.schange_su| 00000db0 62 74 69 74 6c 65 28 29 3b 0a 0a 2f 2a 6b 69 6c |btitle();../*kil| 00000dc0 6c 5f 67 61 70 73 28 29 3b 2a 2f 0a 0a 68 61 6e |l_gaps();*/..han| 00000dd0 64 6c 65 3d 68 61 6e 64 6c 65 3b 0a 73 74 72 63 |dle=handle;.strc| 00000de0 70 79 28 66 69 6c 65 5f 74 6f 5f 6c 6f 61 64 2c |py(file_to_load,| 00000df0 66 69 6c 65 6e 61 6d 65 29 3b 0a 66 70 3d 66 6f |filename);.fp=fo| 00000e00 70 65 6e 28 66 69 6c 65 5f 74 6f 5f 6c 6f 61 64 |pen(file_to_load| 00000e10 2c 22 77 22 29 3b 0a 6c 6f 70 3d 30 3b 0a 0a 69 |,"w");.lop=0;..i| 00000e20 66 20 28 73 74 72 63 6d 70 28 74 69 74 6c 65 2c |f (strcmp(title,| 00000e30 22 22 29 3d 3d 30 29 0a 7b 0a 66 70 72 69 6e 74 |"")==0).{.fprint| 00000e40 66 20 28 66 70 2c 22 25 73 5c 6e 22 2c 22 2a 22 |f (fp,"%s\n","*"| 00000e50 29 3b 0a 7d 0a 65 6c 73 65 0a 7b 0a 66 70 72 69 |);.}.else.{.fpri| 00000e60 6e 74 66 20 28 66 70 2c 22 25 73 5c 6e 22 2c 74 |ntf (fp,"%s\n",t| 00000e70 6f 73 61 76 65 5f 74 69 74 6c 65 29 3b 0a 7d 0a |osave_title);.}.| 00000e80 0a 0a 69 66 20 28 73 74 72 63 6d 70 28 73 75 62 |..if (strcmp(sub| 00000e90 74 69 74 6c 65 2c 22 22 29 3d 3d 30 29 0a 7b 0a |title,"")==0).{.| 00000ea0 66 70 72 69 6e 74 66 20 28 66 70 2c 22 25 73 5c |fprintf (fp,"%s\| 00000eb0 6e 22 2c 22 2a 22 29 3b 0a 7d 0a 65 6c 73 65 0a |n","*");.}.else.| 00000ec0 7b 0a 66 70 72 69 6e 74 66 20 28 66 70 2c 22 25 |{.fprintf (fp,"%| 00000ed0 73 5c 6e 22 2c 74 6f 73 61 76 65 5f 73 75 62 74 |s\n",tosave_subt| 00000ee0 69 74 6c 65 29 3b 0a 7d 0a 0a 0a 69 66 20 28 73 |itle);.}...if (s| 00000ef0 74 72 63 6d 70 28 6c 61 6e 67 75 61 67 65 2c 22 |trcmp(language,"| 00000f00 22 29 3d 3d 30 29 0a 7b 0a 66 70 72 69 6e 74 66 |")==0).{.fprintf| 00000f10 20 28 66 70 2c 22 25 73 5c 6e 22 2c 22 2a 22 29 | (fp,"%s\n","*")| 00000f20 3b 0a 7d 0a 65 6c 73 65 0a 7b 0a 66 70 72 69 6e |;.}.else.{.fprin| 00000f30 74 66 20 28 66 70 2c 22 25 73 5c 6e 22 2c 74 6f |tf (fp,"%s\n",to| 00000f40 73 61 76 65 5f 6c 61 6e 67 75 61 67 65 29 3b 0a |save_language);.| 00000f50 7d 0a 0a 66 6f 72 20 28 6c 6f 70 3d 30 3b 6c 6f |}..for (lop=0;lo| 00000f60 70 3c 31 35 30 3b 6c 6f 70 2b 2b 29 0a 0a 20 20 |p<150;lop++).. | 00000f70 20 20 7b 0a 0a 20 20 20 20 66 70 72 69 6e 74 66 | {.. fprintf| 00000f80 20 28 66 70 2c 22 25 73 20 25 73 5c 6e 22 2c 74 | (fp,"%s %s\n",t| 00000f90 6f 73 61 76 65 5f 67 65 72 6d 61 6e 5b 6c 6f 70 |osave_german[lop| 00000fa0 5d 2c 74 6f 73 61 76 65 5f 65 6e 67 6c 69 73 68 |],tosave_english| 00000fb0 5b 6c 6f 70 5d 29 3b 0a 0a 20 20 0a 20 20 20 20 |[lop]);.. . | 00000fc0 7d 0a 0a 66 63 6c 6f 73 65 28 66 70 29 3b 0a 73 |}..fclose(fp);.s| 00000fd0 70 72 69 6e 74 66 28 73 65 6e 64 2c 22 73 65 74 |printf(send,"set| 00000fe0 74 79 70 65 20 25 73 20 44 46 31 22 2c 66 69 6c |type %s DF1",fil| 00000ff0 65 5f 74 6f 5f 6c 6f 61 64 29 3b 0a 6f 73 5f 63 |e_to_load);.os_c| 00001000 6c 69 28 73 65 6e 64 29 3b 0a 72 65 74 75 72 6e |li(send);.return| 00001010 20 54 52 55 45 3b 0a 7d 0a 0a 0a 42 4f 4f 4c 20 | TRUE;.}...BOOL | 00001020 77 73 61 76 65 72 28 63 68 61 72 20 2a 66 69 6c |wsaver(char *fil| 00001030 65 6e 61 6d 65 2c 20 76 6f 69 64 20 2a 68 61 6e |ename, void *han| 00001040 64 6c 65 29 0a 7b 0a 0a 0a 46 49 4c 45 20 2a 66 |dle).{...FILE *f| 00001050 70 3b 0a 0a 69 6e 74 20 62 3b 0a 63 68 61 72 20 |p;..int b;.char | 00001060 73 65 6e 64 5b 31 33 35 5d 3b 0a 0a 73 63 68 61 |send[135];..scha| 00001070 6e 67 65 5f 77 72 6f 6e 67 5f 77 6f 72 64 5f 67 |nge_wrong_word_g| 00001080 65 72 6d 61 6e 28 29 3b 0a 73 63 68 61 6e 67 65 |erman();.schange| 00001090 5f 77 72 6f 6e 67 5f 77 6f 72 64 5f 65 6e 67 6c |_wrong_word_engl| 000010a0 69 73 68 28 29 3b 0a 0a 0a 73 63 68 61 6e 67 65 |ish();...schange| 000010b0 5f 74 69 74 6c 65 28 29 3b 0a 73 63 68 61 6e 67 |_title();.schang| 000010c0 65 5f 6c 61 6e 67 75 61 67 65 28 29 3b 0a 73 63 |e_language();.sc| 000010d0 68 61 6e 67 65 5f 73 75 62 74 69 74 6c 65 28 29 |hange_subtitle()| 000010e0 3b 0a 68 61 6e 64 6c 65 3d 68 61 6e 64 6c 65 3b |;.handle=handle;| 000010f0 0a 73 74 72 63 70 79 28 66 69 6c 65 5f 74 6f 5f |.strcpy(file_to_| 00001100 6c 6f 61 64 2c 66 69 6c 65 6e 61 6d 65 29 3b 0a |load,filename);.| 00001110 66 70 3d 66 6f 70 65 6e 28 66 69 6c 65 5f 74 6f |fp=fopen(file_to| 00001120 5f 6c 6f 61 64 2c 22 77 22 29 3b 0a 62 3d 30 3b |_load,"w");.b=0;| 00001130 0a 0a 0a 69 66 20 28 73 74 72 63 6d 70 28 74 69 |...if (strcmp(ti| 00001140 74 6c 65 2c 22 22 29 3d 3d 30 29 0a 7b 0a 66 70 |tle,"")==0).{.fp| 00001150 72 69 6e 74 66 20 28 66 70 2c 22 25 73 5c 6e 22 |rintf (fp,"%s\n"| 00001160 2c 22 2a 22 29 3b 0a 7d 0a 65 6c 73 65 0a 7b 0a |,"*");.}.else.{.| 00001170 66 70 72 69 6e 74 66 20 28 66 70 2c 22 25 73 5c |fprintf (fp,"%s\| 00001180 6e 22 2c 74 6f 73 61 76 65 5f 74 69 74 6c 65 29 |n",tosave_title)| 00001190 3b 0a 7d 0a 0a 0a 69 66 20 28 73 74 72 63 6d 70 |;.}...if (strcmp| 000011a0 28 73 75 62 74 69 74 6c 65 2c 22 22 29 3d 3d 30 |(subtitle,"")==0| 000011b0 29 0a 7b 0a 66 70 72 69 6e 74 66 20 28 66 70 2c |).{.fprintf (fp,| 000011c0 22 25 73 5c 6e 22 2c 22 2a 22 29 3b 0a 7d 0a 65 |"%s\n","*");.}.e| 000011d0 6c 73 65 0a 7b 0a 66 70 72 69 6e 74 66 20 28 66 |lse.{.fprintf (f| 000011e0 70 2c 22 25 73 5c 6e 22 2c 74 6f 73 61 76 65 5f |p,"%s\n",tosave_| 000011f0 73 75 62 74 69 74 6c 65 29 3b 0a 7d 0a 0a 0a 69 |subtitle);.}...i| 00001200 66 20 28 73 74 72 63 6d 70 28 6c 61 6e 67 75 61 |f (strcmp(langua| 00001210 67 65 2c 22 22 29 3d 3d 30 29 0a 7b 0a 66 70 72 |ge,"")==0).{.fpr| 00001220 69 6e 74 66 20 28 66 70 2c 22 25 73 5c 6e 22 2c |intf (fp,"%s\n",| 00001230 22 2a 22 29 3b 0a 7d 0a 65 6c 73 65 0a 7b 0a 66 |"*");.}.else.{.f| 00001240 70 72 69 6e 74 66 20 28 66 70 2c 22 25 73 5c 6e |printf (fp,"%s\n| 00001250 22 2c 74 6f 73 61 76 65 5f 6c 61 6e 67 75 61 67 |",tosave_languag| 00001260 65 29 3b 0a 7d 0a 0a 0a 66 6f 72 20 28 62 3d 30 |e);.}...for (b=0| 00001270 3b 62 3c 31 35 30 3b 62 2b 2b 29 0a 20 20 20 20 |;b<150;b++). | 00001280 7b 0a 20 20 20 20 66 70 72 69 6e 74 66 20 28 66 |{. fprintf (f| 00001290 70 2c 22 25 73 20 25 73 5c 6e 22 2c 74 6f 73 61 |p,"%s %s\n",tosa| 000012a0 76 65 5f 77 72 6f 6e 67 5f 77 6f 72 64 5f 67 65 |ve_wrong_word_ge| 000012b0 72 6d 61 6e 5b 62 5d 2c 20 74 6f 73 61 76 65 5f |rman[b], tosave_| 000012c0 77 72 6f 6e 67 5f 77 6f 72 64 5f 65 6e 67 6c 69 |wrong_word_engli| 000012d0 73 68 5b 62 5d 29 3b 0a 20 20 20 20 7d 0a 66 63 |sh[b]);. }.fc| 000012e0 6c 6f 73 65 28 66 70 29 3b 0a 73 70 72 69 6e 74 |lose(fp);.sprint| 000012f0 66 28 73 65 6e 64 2c 22 73 65 74 74 79 70 65 20 |f(send,"settype | 00001300 25 73 20 44 46 31 22 2c 66 69 6c 65 5f 74 6f 5f |%s DF1",file_to_| 00001310 6c 6f 61 64 29 3b 0a 6f 73 5f 63 6c 69 28 73 65 |load);.os_cli(se| 00001320 6e 64 29 3b 0a 72 65 74 75 72 6e 20 54 52 55 45 |nd);.return TRUE| 00001330 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 2f 2a 2d 2d 2d 20 |;.}......./*--- | 00001340 45 76 65 6e 74 20 68 61 6e 64 6c 65 72 20 66 6f |Event handler fo| 00001350 72 20 74 68 65 20 6d 65 6e 75 2e 20 2d 2d 2d 2a |r the menu. ---*| 00001360 2f 0a 76 6f 69 64 20 76 6f 63 61 62 5f 6d 65 6e |/.void vocab_men| 00001370 75 70 72 6f 63 28 76 6f 69 64 20 2a 68 61 6e 64 |uproc(void *hand| 00001380 6c 65 2c 20 63 68 61 72 20 2a 68 69 74 29 0a 7b |le, char *hit).{| 00001390 0a 69 6e 74 20 61 62 3b 0a 0a 20 68 61 6e 64 6c |.int ab;.. handl| 000013a0 65 20 3d 20 68 61 6e 64 6c 65 3b 20 2f 2a 20 57 |e = handle; /* W| 000013b0 65 20 64 6f 6e 27 74 20 6e 65 65 64 20 68 61 6e |e don't need han| 000013c0 64 6c 65 3a 20 74 68 69 73 20 73 74 6f 70 73 20 |dle: this stops | 000013d0 63 6f 6d 70 69 6c 65 72 20 77 61 72 6e 69 6e 67 |compiler warning| 000013e0 20 2a 2f 0a 0a 20 20 2f 2a 20 46 69 6e 64 20 77 | */.. /* Find w| 000013f0 68 69 63 68 20 6d 65 6e 75 20 69 74 65 6d 20 77 |hich menu item w| 00001400 61 73 20 68 69 74 20 61 6e 64 20 74 61 6b 65 20 |as hit and take | 00001410 61 63 74 69 6f 6e 20 61 73 20 61 70 70 72 6f 70 |action as approp| 00001420 72 69 61 74 65 20 2a 2f 0a 20 20 73 77 69 74 63 |riate */. switc| 00001430 68 20 28 68 69 74 5b 30 5d 29 0a 20 20 7b 0a 20 |h (hit[0]). {. | 00001440 20 20 20 63 61 73 65 20 76 6f 63 61 62 5f 6d 65 | case vocab_me| 00001450 6e 75 5f 69 6e 66 6f 3a 0a 20 20 20 20 20 20 76 |nu_info:. v| 00001460 6f 63 61 62 5f 69 6e 66 6f 5f 61 62 6f 75 74 5f |ocab_info_about_| 00001470 70 72 6f 67 72 61 6d 28 29 3b 0a 20 20 20 20 20 |program();. | 00001480 20 62 72 65 61 6b 3b 0a 0a 20 20 20 20 63 61 73 | break;.. cas| 00001490 65 20 76 6f 63 61 62 5f 6d 65 6e 75 5f 72 65 73 |e vocab_menu_res| 000014a0 74 61 72 74 3a 0a 20 20 0a 20 69 66 20 28 6e 6f |tart:. . if (no| 000014b0 77 3d 3d 31 29 0a 20 20 20 7b 0a 20 20 20 64 62 |w==1). {. db| 000014c0 6f 78 5f 73 65 74 6e 75 6d 65 72 69 63 28 6f 70 |ox_setnumeric(op| 000014d0 74 69 6f 6e 73 2c 32 2c 31 29 3b 0a 20 20 20 64 |tions,2,1);. d| 000014e0 62 6f 78 5f 73 65 74 6e 75 6d 65 72 69 63 28 6f |box_setnumeric(o| 000014f0 70 74 69 6f 6e 73 2c 31 2c 30 29 3b 0a 20 20 20 |ptions,1,0);. | 00001500 64 62 6f 78 5f 73 65 74 6e 75 6d 65 72 69 63 28 |dbox_setnumeric(| 00001510 6f 70 74 69 6f 6e 73 2c 34 2c 31 29 3b 0a 20 20 |options,4,1);. | 00001520 20 64 62 6f 78 5f 73 65 74 6e 75 6d 65 72 69 63 | dbox_setnumeric| 00001530 28 6f 70 74 69 6f 6e 73 2c 36 2c 31 29 3b 20 0a |(options,6,1); .| 00001540 20 20 20 6e 6f 77 3d 30 3b 0a 20 20 20 7d 0a 20 | now=0;. }. | 00001550 20 20 20 20 20 67 65 74 5f 6e 65 77 5f 6e 28 29 | get_new_n()| 00001560 3b 0a 20 20 20 20 20 20 72 65 73 74 61 72 74 28 |;. restart(| 00001570 29 3b 0a 20 20 20 20 20 20 62 72 65 61 6b 3b 0a |);. break;.| 00001580 0a 20 20 20 20 63 61 73 65 20 76 6f 63 61 62 5f |. case vocab_| 00001590 6d 65 6e 75 5f 73 68 6f 77 5f 77 72 6f 6e 67 5f |menu_show_wrong_| 000015a0 61 6e 73 77 65 72 73 3a 0a 20 20 20 20 20 20 64 |answers:. d| 000015b0 62 6f 78 5f 73 68 6f 77 73 74 61 74 69 63 28 77 |box_showstatic(w| 000015c0 72 6f 6e 67 29 3b 0a 20 20 20 20 20 20 72 65 64 |rong);. red| 000015d0 72 61 77 5f 77 72 6f 6e 67 28 29 3b 0a 20 20 20 |raw_wrong();. | 000015e0 20 20 20 62 72 65 61 6b 3b 0a 0a 20 20 20 20 63 | break;.. c| 000015f0 61 73 65 20 76 6f 63 61 62 5f 6d 65 6e 75 5f 65 |ase vocab_menu_e| 00001600 64 69 74 5f 77 6f 72 64 73 3a 0a 20 20 20 20 20 |dit_words:. | 00001610 20 64 62 6f 78 5f 73 68 6f 77 73 74 61 74 69 63 | dbox_showstatic| 00001620 28 65 64 69 74 29 3b 0a 20 20 20 20 20 20 64 62 |(edit);. db| 00001630 6f 78 5f 68 69 64 65 28 6d 29 3b 0a 20 20 20 20 |ox_hide(m);. | 00001640 20 20 72 65 64 72 61 77 5f 65 64 69 74 28 29 3b | redraw_edit();| 00001650 0a 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 0a 20 |. break;.. | 00001660 20 20 20 63 61 73 65 20 76 6f 63 61 62 5f 6d 65 | case vocab_me| 00001670 6e 75 5f 6f 70 74 69 6f 6e 73 3a 0a 20 20 20 20 |nu_options:. | 00001680 20 20 6f 70 74 69 6f 6e 73 5f 77 69 6e 64 6f 77 | options_window| 00001690 28 29 3b 0a 20 20 20 20 20 20 62 72 65 61 6b 3b |();. break;| 000016a0 0a 0a 20 20 20 20 63 61 73 65 20 76 6f 63 61 62 |.. case vocab| 000016b0 5f 6d 65 6e 75 5f 71 75 69 74 3a 0a 2f 2a 77 69 |_menu_quit:./*wi| 000016c0 6d 70 5f 72 65 6c 65 61 73 65 69 6e 74 65 72 66 |mp_releaseinterf| 000016d0 61 63 65 20 28 29 3b 2a 2f 0a 0a 20 20 20 20 20 |ace ();*/.. | 000016e0 20 2f 2a 20 45 78 69 74 20 66 72 6f 6d 20 74 68 | /* Exit from th| 000016f0 65 20 70 72 6f 67 72 61 6d 2e 20 54 68 65 20 77 |e program. The w| 00001700 69 6d 70 20 67 65 74 73 20 72 69 64 20 6f 66 20 |imp gets rid of | 00001710 74 68 65 20 77 69 6e 64 6f 77 20 61 6e 64 20 69 |the window and i| 00001720 63 6f 6e 20 2a 2f 0a 0a 20 20 20 61 62 20 3d 20 |con */.. ab = | 00001730 64 62 6f 78 71 75 65 72 79 28 22 41 72 65 20 79 |dboxquery("Are y| 00001740 6f 75 20 73 75 72 65 20 79 6f 75 20 77 61 6e 74 |ou sure you want| 00001750 20 74 6f 20 71 75 69 74 3f 22 29 3b 0a 20 20 20 | to quit?");. | 00001760 69 66 20 28 61 62 20 3d 3d 20 31 29 0a 20 20 20 |if (ab == 1). | 00001770 7b 0a 20 20 20 65 78 69 74 28 30 29 3b 0a 20 20 |{. exit(0);. | 00001780 20 7d 0a 20 20 20 65 6c 73 65 0a 20 20 20 7b 0a | }. else. {.| 00001790 20 20 20 72 65 74 75 72 6e 3b 0a 20 20 20 7d 0a | return;. }.| 000017a0 0a 0a 20 20 7d 0a 7d 0a 0a 76 6f 69 64 20 77 72 |.. }.}..void wr| 000017b0 6f 6e 67 5f 6d 65 6e 75 70 72 6f 63 28 76 6f 69 |ong_menuproc(voi| 000017c0 64 20 2a 68 61 6e 64 6c 65 2c 20 63 68 61 72 20 |d *handle, char | 000017d0 2a 68 69 74 29 0a 7b 0a 69 6e 74 20 6a 6b 3b 0a |*hit).{.int jk;.| 000017e0 20 20 68 61 6e 64 6c 65 20 3d 20 68 61 6e 64 6c | handle = handl| 000017f0 65 3b 20 2f 2a 20 57 65 20 64 6f 6e 27 74 20 6e |e; /* We don't n| 00001800 65 65 64 20 68 61 6e 64 6c 65 3a 20 74 68 69 73 |eed handle: this| 00001810 20 73 74 6f 70 73 20 63 6f 6d 70 69 6c 65 72 20 | stops compiler | 00001820 77 61 72 6e 69 6e 67 20 2a 2f 0a 0a 20 20 2f 2a |warning */.. /*| 00001830 20 46 69 6e 64 20 77 68 69 63 68 20 6d 65 6e 75 | Find which menu| 00001840 20 69 74 65 6d 20 77 61 73 20 68 69 74 20 61 6e | item was hit an| 00001850 64 20 74 61 6b 65 20 61 63 74 69 6f 6e 20 61 73 |d take action as| 00001860 20 61 70 70 72 6f 70 72 69 61 74 65 20 2a 2f 0a | appropriate */.| 00001870 20 20 73 77 69 74 63 68 20 28 68 69 74 5b 30 5d | switch (hit[0]| 00001880 29 0a 20 20 7b 0a 20 20 20 20 63 61 73 65 20 31 |). {. case 1| 00001890 3a 0a 20 20 20 20 20 20 6a 6b 20 3d 20 64 62 6f |:. jk = dbo| 000018a0 78 71 75 65 72 79 28 22 41 72 65 20 79 6f 75 20 |xquery("Are you | 000018b0 73 75 72 65 20 79 6f 75 20 77 61 6e 74 20 74 6f |sure you want to| 000018c0 20 63 6c 65 61 72 3f 22 29 3b 0a 20 20 20 20 20 | clear?");. | 000018d0 20 69 66 20 28 6a 6b 20 3d 3d 20 31 29 0a 20 20 | if (jk == 1). | 000018e0 20 20 20 20 7b 0a 20 20 20 20 20 20 6d 65 6d 73 | {. mems| 000018f0 65 74 28 77 72 6f 6e 67 5f 77 6f 72 64 5f 67 65 |et(wrong_word_ge| 00001900 72 6d 61 6e 2c 30 2c 36 38 30 30 29 3b 0a 20 20 |rman,0,6800);. | 00001910 20 20 20 20 6d 65 6d 73 65 74 28 77 72 6f 6e 67 | memset(wrong| 00001920 5f 77 6f 72 64 5f 65 6e 67 6c 69 73 68 2c 30 2c |_word_english,0,| 00001930 36 38 30 30 29 3b 0a 20 20 20 20 20 20 7d 0a 20 |6800);. }. | 00001940 20 20 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 | else. | 00001950 7b 0a 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0a |{. return;.| 00001960 20 20 20 20 20 20 7d 0a 0a 0a 20 20 20 20 20 20 | }... | 00001970 77 6e 3d 30 3b 0a 20 20 20 20 20 20 72 65 64 72 |wn=0;. redr| 00001980 61 77 5f 77 72 6f 6e 67 28 29 3b 0a 20 20 20 20 |aw_wrong();. | 00001990 20 20 62 72 65 61 6b 3b 0a 0a 20 20 20 20 63 61 | break;.. ca| 000019a0 73 65 20 32 3a 0a 20 20 20 20 20 20 77 72 6f 6e |se 2:. wron| 000019b0 67 5f 64 65 6c 65 74 65 28 29 3b 0a 20 20 20 20 |g_delete();. | 000019c0 20 20 72 65 64 72 61 77 5f 77 72 6f 6e 67 28 29 | redraw_wrong()| 000019d0 3b 0a 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 0a |;. break;..| 000019e0 20 20 20 20 63 61 73 65 20 33 3a 0a 20 20 20 20 | case 3:. | 000019f0 20 20 73 61 76 65 61 73 28 30 78 44 46 31 2c 66 | saveas(0xDF1,f| 00001a00 69 6c 65 5f 74 6f 5f 6c 6f 61 64 2c 30 2c 77 73 |ile_to_load,0,ws| 00001a10 61 76 65 72 2c 30 2c 30 2c 30 29 3b 0a 20 20 20 |aver,0,0,0);. | 00001a20 20 20 20 62 72 65 61 6b 3b 0a 20 20 7d 0a 7d 0a | break;. }.}.| 00001a30 0a 76 6f 69 64 20 65 64 69 74 5f 6d 65 6e 75 70 |.void edit_menup| 00001a40 72 6f 63 28 76 6f 69 64 20 2a 68 61 6e 64 6c 65 |roc(void *handle| 00001a50 2c 20 63 68 61 72 20 2a 68 69 74 29 0a 7b 0a 69 |, char *hit).{.i| 00001a60 6e 74 20 70 65 3b 0a 0a 20 20 68 61 6e 64 6c 65 |nt pe;.. handle| 00001a70 20 3d 20 68 61 6e 64 6c 65 3b 20 2f 2a 20 57 65 | = handle; /* We| 00001a80 20 64 6f 6e 27 74 20 6e 65 65 64 20 68 61 6e 64 | don't need hand| 00001a90 6c 65 3a 20 74 68 69 73 20 73 74 6f 70 73 20 63 |le: this stops c| 00001aa0 6f 6d 70 69 6c 65 72 20 77 61 72 6e 69 6e 67 20 |ompiler warning | 00001ab0 2a 2f 0a 0a 20 20 2f 2a 20 46 69 6e 64 20 77 68 |*/.. /* Find wh| 00001ac0 69 63 68 20 6d 65 6e 75 20 69 74 65 6d 20 77 61 |ich menu item wa| 00001ad0 73 20 68 69 74 20 61 6e 64 20 74 61 6b 65 20 61 |s hit and take a| 00001ae0 63 74 69 6f 6e 20 61 73 20 61 70 70 72 6f 70 72 |ction as appropr| 00001af0 69 61 74 65 20 2a 2f 0a 20 20 73 77 69 74 63 68 |iate */. switch| 00001b00 20 28 68 69 74 5b 30 5d 29 0a 20 20 7b 0a 20 20 | (hit[0]). {. | 00001b10 20 20 63 61 73 65 20 31 3a 0a 20 20 20 70 65 20 | case 1:. pe | 00001b20 3d 20 64 62 6f 78 71 75 65 72 79 28 22 41 72 65 |= dboxquery("Are| 00001b30 20 79 6f 75 20 73 75 72 65 20 79 6f 75 20 77 61 | you sure you wa| 00001b40 6e 74 20 74 6f 20 63 6c 65 61 72 3f 22 29 3b 0a |nt to clear?");.| 00001b50 20 20 20 69 66 20 28 70 65 3d 3d 31 29 0a 20 20 | if (pe==1). | 00001b60 20 7b 0a 20 20 20 20 20 20 6d 65 6d 73 65 74 28 | {. memset(| 00001b70 67 65 72 6d 61 6e 2c 30 2c 36 38 30 30 29 3b 0a |german,0,6800);.| 00001b80 20 20 20 20 20 20 6d 65 6d 73 65 74 28 65 6e 67 | memset(eng| 00001b90 6c 69 73 68 2c 30 2c 36 38 30 30 29 3b 0a 20 20 |lish,0,6800);. | 00001ba0 20 20 20 20 73 74 72 63 70 79 28 74 69 74 6c 65 | strcpy(title| 00001bb0 2c 22 22 29 3b 0a 20 20 20 20 20 20 73 74 72 63 |,"");. strc| 00001bc0 70 79 28 6c 61 6e 67 75 61 67 65 2c 22 22 29 3b |py(language,"");| 00001bd0 0a 20 20 20 20 20 20 73 74 72 63 70 79 28 73 75 |. strcpy(su| 00001be0 62 74 69 74 6c 65 2c 22 22 29 3b 0a 20 20 20 20 |btitle,"");. | 00001bf0 20 20 72 65 64 72 61 77 5f 65 64 69 74 28 29 3b | redraw_edit();| 00001c00 0a 0a 20 20 20 20 7d 0a 20 20 20 20 65 6c 73 65 |.. }. else| 00001c10 0a 20 20 20 20 7b 0a 20 20 20 20 72 65 74 75 72 |. {. retur| 00001c20 6e 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 62 72 |n;. }.. br| 00001c30 65 61 6b 3b 0a 0a 20 20 20 20 63 61 73 65 20 32 |eak;.. case 2| 00001c40 3a 0a 20 20 20 20 20 67 65 74 6e 65 77 5f 65 64 |:. getnew_ed| 00001c50 69 74 28 29 3b 0a 20 20 20 20 20 65 64 69 74 5f |it();. edit_| 00001c60 69 6e 73 65 72 74 28 29 3b 0a 20 20 20 20 20 72 |insert();. r| 00001c70 65 64 72 61 77 5f 65 64 69 74 28 29 3b 0a 20 20 |edraw_edit();. | 00001c80 20 20 20 20 62 72 65 61 6b 3b 0a 0a 20 20 20 20 | break;.. | 00001c90 63 61 73 65 20 33 3a 0a 20 20 20 20 20 65 64 69 |case 3:. edi| 00001ca0 74 5f 64 65 6c 65 74 65 28 29 3b 0a 20 20 20 20 |t_delete();. | 00001cb0 20 72 65 64 72 61 77 5f 65 64 69 74 28 29 3b 0a | redraw_edit();.| 00001cc0 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 0a 20 63 | break;.. c| 00001cd0 61 73 65 20 34 3a 0a 20 20 20 20 20 20 73 61 76 |ase 4:. sav| 00001ce0 65 61 73 28 30 78 44 46 31 2c 66 69 6c 65 5f 74 |eas(0xDF1,file_t| 00001cf0 6f 5f 6c 6f 61 64 2c 30 2c 65 73 61 76 65 72 2c |o_load,0,esaver,| 00001d00 30 2c 30 2c 30 29 3b 0a 20 20 20 20 20 20 62 72 |0,0,0);. br| 00001d10 65 61 6b 3b 0a 20 20 7d 0a 7d 0a 0a 76 6f 69 64 |eak;. }.}..void| 00001d20 20 65 64 65 6c 65 74 65 5f 6d 65 6e 75 70 72 6f | edelete_menupro| 00001d30 63 28 76 6f 69 64 20 2a 68 61 6e 64 6c 65 2c 20 |c(void *handle, | 00001d40 63 68 61 72 20 2a 68 69 74 29 0a 7b 0a 0a 0a 20 |char *hit).{... | 00001d50 20 68 61 6e 64 6c 65 20 3d 20 68 61 6e 64 6c 65 | handle = handle| 00001d60 3b 20 2f 2a 20 57 65 20 64 6f 6e 27 74 20 6e 65 |; /* We don't ne| 00001d70 65 64 20 68 61 6e 64 6c 65 3a 20 74 68 69 73 20 |ed handle: this | 00001d80 73 74 6f 70 73 20 63 6f 6d 70 69 6c 65 72 20 77 |stops compiler w| 00001d90 61 72 6e 69 6e 67 20 2a 2f 0a 0a 20 20 2f 2a 20 |arning */.. /* | 00001da0 46 69 6e 64 20 77 68 69 63 68 20 6d 65 6e 75 20 |Find which menu | 00001db0 69 74 65 6d 20 77 61 73 20 68 69 74 20 61 6e 64 |item was hit and| 00001dc0 20 74 61 6b 65 20 61 63 74 69 6f 6e 20 61 73 20 | take action as | 00001dd0 61 70 70 72 6f 70 72 69 61 74 65 20 2a 2f 0a 20 |appropriate */. | 00001de0 20 73 77 69 74 63 68 20 28 68 69 74 5b 30 5d 29 | switch (hit[0])| 00001df0 0a 20 20 7b 0a 20 20 20 20 63 61 73 65 20 31 3a |. {. case 1:| 00001e00 0a 20 20 20 20 65 64 69 74 5f 64 65 6c 65 74 65 |. edit_delete| 00001e10 28 29 3b 0a 20 20 20 20 20 20 62 72 65 61 6b 3b |();. break;| 00001e20 0a 0a 20 20 7d 0a 7d 0a 0a 76 6f 69 64 20 69 6e |.. }.}..void in| 00001e30 73 65 72 74 5f 6d 65 6e 75 70 72 6f 63 28 76 6f |sert_menuproc(vo| 00001e40 69 64 20 2a 68 61 6e 64 6c 65 2c 20 63 68 61 72 |id *handle, char| 00001e50 20 2a 68 69 74 29 0a 7b 0a 0a 0a 20 20 68 61 6e | *hit).{... han| 00001e60 64 6c 65 20 3d 20 68 61 6e 64 6c 65 3b 20 2f 2a |dle = handle; /*| 00001e70 20 57 65 20 64 6f 6e 27 74 20 6e 65 65 64 20 68 | We don't need h| 00001e80 61 6e 64 6c 65 3a 20 74 68 69 73 20 73 74 6f 70 |andle: this stop| 00001e90 73 20 63 6f 6d 70 69 6c 65 72 20 77 61 72 6e 69 |s compiler warni| 00001ea0 6e 67 20 2a 2f 0a 0a 20 20 2f 2a 20 46 69 6e 64 |ng */.. /* Find| 00001eb0 20 77 68 69 63 68 20 6d 65 6e 75 20 69 74 65 6d | which menu item| 00001ec0 20 77 61 73 20 68 69 74 20 61 6e 64 20 74 61 6b | was hit and tak| 00001ed0 65 20 61 63 74 69 6f 6e 20 61 73 20 61 70 70 72 |e action as appr| 00001ee0 6f 70 72 69 61 74 65 20 2a 2f 0a 20 20 73 77 69 |opriate */. swi| 00001ef0 74 63 68 20 28 68 69 74 5b 30 5d 29 0a 20 20 7b |tch (hit[0]). {| 00001f00 0a 20 20 20 20 63 61 73 65 20 31 3a 0a 20 20 20 |. case 1:. | 00001f10 20 65 64 69 74 5f 69 6e 73 65 72 74 28 29 3b 0a | edit_insert();.| 00001f20 20 20 20 20 72 65 64 72 61 77 5f 65 64 69 74 28 | redraw_edit(| 00001f30 29 3b 0a 20 20 20 20 20 20 62 72 65 61 6b 3b 0a |);. break;.| 00001f40 0a 20 20 7d 0a 7d 0a 0a 0a 76 6f 69 64 20 77 64 |. }.}...void wd| 00001f50 65 6c 65 74 65 5f 6d 65 6e 75 70 72 6f 63 28 76 |elete_menuproc(v| 00001f60 6f 69 64 20 2a 68 61 6e 64 6c 65 2c 20 63 68 61 |oid *handle, cha| 00001f70 72 20 2a 68 69 74 29 0a 7b 0a 0a 0a 20 20 68 61 |r *hit).{... ha| 00001f80 6e 64 6c 65 20 3d 20 68 61 6e 64 6c 65 3b 20 2f |ndle = handle; /| 00001f90 2a 20 57 65 20 64 6f 6e 27 74 20 6e 65 65 64 20 |* We don't need | 00001fa0 68 61 6e 64 6c 65 3a 20 74 68 69 73 20 73 74 6f |handle: this sto| 00001fb0 70 73 20 63 6f 6d 70 69 6c 65 72 20 77 61 72 6e |ps compiler warn| 00001fc0 69 6e 67 20 2a 2f 0a 0a 20 20 2f 2a 20 46 69 6e |ing */.. /* Fin| 00001fd0 64 20 77 68 69 63 68 20 6d 65 6e 75 20 69 74 65 |d which menu ite| 00001fe0 6d 20 77 61 73 20 68 69 74 20 61 6e 64 20 74 61 |m was hit and ta| 00001ff0 6b 65 20 61 63 74 69 6f 6e 20 61 73 20 61 70 70 |ke action as app| 00002000 72 6f 70 72 69 61 74 65 20 2a 2f 0a 20 20 73 77 |ropriate */. sw| 00002010 69 74 63 68 20 28 68 69 74 5b 30 5d 29 0a 20 20 |itch (hit[0]). | 00002020 7b 0a 20 20 20 20 63 61 73 65 20 31 3a 0a 20 20 |{. case 1:. | 00002030 20 20 20 77 72 6f 6e 67 5f 64 65 6c 65 74 65 28 | wrong_delete(| 00002040 29 3b 0a 20 20 20 20 20 72 65 64 72 61 77 5f 77 |);. redraw_w| 00002050 72 6f 6e 67 28 29 3b 0a 20 20 20 20 20 20 62 72 |rong();. br| 00002060 65 61 6b 3b 0a 0a 20 20 7d 0a 7d 0a 0a 0a 2f 2a |eak;.. }.}.../*| 00002070 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00002080 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 49 4e |************* IN| 00002090 49 54 49 41 4c 49 53 41 54 49 4f 4e 20 2a 2a 2a |ITIALISATION ***| 000020a0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000020b0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0a 0a 2f 2a |***********/../*| 000020c0 2d 2d 2d 20 49 6e 69 74 69 61 6c 69 73 65 20 74 |--- Initialise t| 000020d0 68 65 20 70 72 6f 67 72 61 6d 2c 20 72 65 74 75 |he program, retu| 000020e0 72 6e 69 6e 67 20 54 52 55 45 20 69 66 20 69 74 |rning TRUE if it| 000020f0 20 77 61 73 20 61 6c 6c 20 4f 4b 2e 20 2d 2d 2d | was all OK. ---| 00002100 2a 2f 0a 73 74 61 74 69 63 20 42 4f 4f 4c 20 76 |*/.static BOOL v| 00002110 6f 63 61 62 5f 69 6e 69 74 69 61 6c 69 73 65 28 |ocab_initialise(| 00002120 76 6f 69 64 29 0a 7b 0a 20 20 2f 2a 20 52 49 53 |void).{. /* RIS| 00002130 43 5f 4f 53 6c 69 62 20 69 6e 69 74 69 61 6c 69 |C_OSlib initiali| 00002140 73 61 74 69 6f 6e 20 2a 2f 0a 20 20 77 69 6d 70 |sation */. wimp| 00002150 74 5f 69 6e 69 74 28 22 76 6f 63 61 62 22 29 3b |t_init("vocab");| 00002160 2f 2a 20 4d 61 69 6e 20 57 69 6d 70 20 69 6e 69 |/* Main Wimp ini| 00002170 74 69 61 6c 69 73 61 74 69 6f 6e 20 2a 2f 0a 20 |tialisation */. | 00002180 20 72 65 73 5f 69 6e 69 74 28 22 76 6f 63 61 62 | res_init("vocab| 00002190 22 29 3b 20 20 20 20 20 20 20 20 20 20 20 20 2f |"); /| 000021a0 2a 20 52 65 73 6f 75 72 63 65 73 20 2a 2f 0a 20 |* Resources */. | 000021b0 20 72 65 73 73 70 72 5f 69 6e 69 74 28 29 3b 20 | resspr_init(); | 000021c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000021d0 20 20 2f 2a 20 41 70 70 6c 69 63 61 74 69 6f 6e | /* Application| 000021e0 20 73 70 72 69 74 65 73 20 2a 2f 0a 20 20 74 65 | sprites */. te| 000021f0 6d 70 6c 61 74 65 5f 69 6e 69 74 28 29 3b 20 20 |mplate_init(); | 00002200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f | /| 00002210 2a 20 54 65 6d 70 6c 61 74 65 73 20 2a 2f 0a 20 |* Templates */. | 00002220 20 64 62 6f 78 5f 69 6e 69 74 28 29 3b 20 20 20 | dbox_init(); | 00002230 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002240 20 20 2f 2a 20 44 69 61 6c 6f 67 75 65 20 62 6f | /* Dialogue bo| 00002250 78 65 73 20 2a 2f 0a 0a 0a 20 20 2f 2a 20 43 72 |xes */... /* Cr| 00002260 65 61 74 65 20 74 68 65 20 6d 65 6e 75 20 74 72 |eate the menu tr| 00002270 65 65 20 2a 2f 0a 20 20 69 66 20 28 76 6f 63 61 |ee */. if (voca| 00002280 62 5f 6d 65 6e 75 20 3d 20 6d 65 6e 75 5f 6e 65 |b_menu = menu_ne| 00002290 77 28 22 56 6f 63 61 62 22 2c 20 22 3e 49 6e 66 |w("Vocab", ">Inf| 000022a0 6f 7c 52 65 73 74 61 72 74 2c 53 68 6f 77 20 57 |o|Restart,Show W| 000022b0 72 6f 6e 67 20 41 6e 73 77 65 72 73 2e 2e 2e 2c |rong Answers...,| 000022c0 45 64 69 74 20 57 6f 72 64 73 2e 2e 2e 2c 4f 70 |Edit Words...,Op| 000022d0 74 69 6f 6e 73 2e 2e 2e 7c 51 75 69 74 22 29 2c |tions...|Quit"),| 000022e0 20 76 6f 63 61 62 5f 6d 65 6e 75 20 3d 3d 20 4e | vocab_menu == N| 000022f0 55 4c 4c 29 0a 20 20 20 20 72 65 74 75 72 6e 20 |ULL). return | 00002300 46 41 4c 53 45 3b 20 2f 2a 20 4d 65 6e 75 20 63 |FALSE; /* Menu c| 00002310 72 65 61 74 65 20 66 61 69 6c 65 64 20 2a 2f 0a |reate failed */.| 00002320 0a 69 66 20 28 77 72 6f 6e 67 5f 6d 65 6e 75 20 |.if (wrong_menu | 00002330 3d 20 6d 65 6e 75 5f 6e 65 77 28 22 57 72 6f 6e |= menu_new("Wron| 00002340 67 20 57 6f 72 64 73 22 2c 20 22 43 4c 45 41 52 |g Words", "CLEAR| 00002350 2c 44 65 6c 65 74 65 7c 3e 53 61 76 65 22 29 2c |,Delete|>Save"),| 00002360 20 77 72 6f 6e 67 5f 6d 65 6e 75 20 3d 3d 20 4e | wrong_menu == N| 00002370 55 4c 4c 29 0a 20 20 20 20 72 65 74 75 72 6e 20 |ULL). return | 00002380 46 41 4c 53 45 3b 20 2f 2a 20 4d 65 6e 75 20 63 |FALSE; /* Menu c| 00002390 72 65 61 74 65 20 66 61 69 6c 65 64 20 2a 2f 0a |reate failed */.| 000023a0 0a 69 66 20 28 65 64 69 74 5f 6d 65 6e 75 20 3d |.if (edit_menu =| 000023b0 20 6d 65 6e 75 5f 6e 65 77 28 22 45 64 69 74 20 | menu_new("Edit | 000023c0 57 6f 72 64 73 22 2c 20 22 43 4c 45 41 52 2c 49 |Words", "CLEAR,I| 000023d0 6e 73 65 72 74 2c 44 65 6c 65 74 65 7c 3e 53 61 |nsert,Delete|>Sa| 000023e0 76 65 22 29 2c 20 65 64 69 74 5f 6d 65 6e 75 20 |ve"), edit_menu | 000023f0 3d 3d 20 4e 55 4c 4c 29 0a 20 20 20 20 72 65 74 |== NULL). ret| 00002400 75 72 6e 20 46 41 4c 53 45 3b 20 2f 2a 20 4d 65 |urn FALSE; /* Me| 00002410 6e 75 20 63 72 65 61 74 65 20 66 61 69 6c 65 64 |nu create failed| 00002420 20 2a 2f 0a 0a 0a 0a 0a 0a 0a 69 66 20 28 65 64 | */.......if (ed| 00002430 65 6c 65 74 65 5f 6d 65 6e 75 20 3d 20 6d 65 6e |elete_menu = men| 00002440 75 5f 6e 65 77 28 22 44 65 6c 65 74 65 20 4e 6f |u_new("Delete No| 00002450 2e 22 2c 20 22 41 42 43 22 29 2c 20 65 64 65 6c |.", "ABC"), edel| 00002460 65 74 65 5f 6d 65 6e 75 20 3d 3d 20 4e 55 4c 4c |ete_menu == NULL| 00002470 29 0a 20 20 20 20 72 65 74 75 72 6e 20 46 41 4c |). return FAL| 00002480 53 45 3b 20 2f 2a 20 4d 65 6e 75 20 63 72 65 61 |SE; /* Menu crea| 00002490 74 65 20 66 61 69 6c 65 64 20 2a 2f 0a 0a 20 20 |te failed */.. | 000024a0 20 20 69 66 20 28 77 64 65 6c 65 74 65 5f 6d 65 | if (wdelete_me| 000024b0 6e 75 20 3d 20 6d 65 6e 75 5f 6e 65 77 28 22 44 |nu = menu_new("D| 000024c0 65 6c 65 74 65 20 4e 6f 2e 22 2c 20 22 41 42 43 |elete No.", "ABC| 000024d0 22 29 2c 20 77 64 65 6c 65 74 65 5f 6d 65 6e 75 |"), wdelete_menu| 000024e0 20 3d 3d 20 4e 55 4c 4c 29 0a 20 20 20 20 72 65 | == NULL). re| 000024f0 74 75 72 6e 20 46 41 4c 53 45 3b 20 2f 2a 20 4d |turn FALSE; /* M| 00002500 65 6e 75 20 63 72 65 61 74 65 20 66 61 69 6c 65 |enu create faile| 00002510 64 20 2a 2f 0a 0a 20 20 20 20 69 66 20 28 69 6e |d */.. if (in| 00002520 73 65 72 74 5f 6d 65 6e 75 20 3d 20 6d 65 6e 75 |sert_menu = menu| 00002530 5f 6e 65 77 28 22 49 6e 73 65 72 74 20 4e 6f 2e |_new("Insert No.| 00002540 22 2c 20 22 41 42 43 22 29 2c 20 69 6e 73 65 72 |", "ABC"), inser| 00002550 74 5f 6d 65 6e 75 20 3d 3d 20 4e 55 4c 4c 29 0a |t_menu == NULL).| 00002560 20 20 20 20 72 65 74 75 72 6e 20 46 41 4c 53 45 | return FALSE| 00002570 3b 20 2f 2a 20 4d 65 6e 75 20 63 72 65 61 74 65 |; /* Menu create| 00002580 20 66 61 69 6c 65 64 20 2a 2f 0a 0a 6d 65 6e 75 | failed */..menu| 00002590 5f 73 75 62 6d 65 6e 75 28 65 64 69 74 5f 6d 65 |_submenu(edit_me| 000025a0 6e 75 2c 33 2c 65 64 65 6c 65 74 65 5f 6d 65 6e |nu,3,edelete_men| 000025b0 75 29 3b 0a 6d 65 6e 75 5f 73 75 62 6d 65 6e 75 |u);.menu_submenu| 000025c0 28 77 72 6f 6e 67 5f 6d 65 6e 75 2c 32 2c 77 64 |(wrong_menu,2,wd| 000025d0 65 6c 65 74 65 5f 6d 65 6e 75 29 3b 0a 6d 65 6e |elete_menu);.men| 000025e0 75 5f 73 75 62 6d 65 6e 75 28 65 64 69 74 5f 6d |u_submenu(edit_m| 000025f0 65 6e 75 2c 32 2c 69 6e 73 65 72 74 5f 6d 65 6e |enu,2,insert_men| 00002600 75 29 3b 0a 0a 20 77 69 6e 5f 72 65 67 69 73 74 |u);.. win_regist| 00002610 65 72 5f 65 76 65 6e 74 5f 68 61 6e 64 6c 65 72 |er_event_handler| 00002620 28 77 69 6e 5f 49 43 4f 4e 42 41 52 4c 4f 41 44 |(win_ICONBARLOAD| 00002630 2c 20 6d 63 68 6b 6d 73 67 2c 30 29 3b 0a 0a 20 |, mchkmsg,0);.. | 00002640 20 2f 2a 20 53 65 74 20 75 70 20 74 68 65 20 69 | /* Set up the i| 00002650 63 6f 6e 20 6f 6e 20 74 68 65 20 69 63 6f 6e 20 |con on the icon | 00002660 62 61 72 2c 20 61 6e 64 20 64 65 63 6c 61 72 65 |bar, and declare| 00002670 20 69 74 73 20 65 76 65 6e 74 20 68 61 6e 64 6c | its event handl| 00002680 65 72 73 20 2a 2f 0a 20 20 62 61 72 69 63 6f 6e |ers */. baricon| 00002690 28 22 21 76 6f 63 61 62 22 2c 20 28 69 6e 74 29 |("!vocab", (int)| 000026a0 72 65 73 73 70 72 5f 61 72 65 61 28 29 2c 20 76 |resspr_area(), v| 000026b0 6f 63 61 62 5f 69 63 6f 6e 63 6c 69 63 6b 29 3b |ocab_iconclick);| 000026c0 0a 20 20 69 66 20 28 21 65 76 65 6e 74 5f 61 74 |. if (!event_at| 000026d0 74 61 63 68 6d 65 6e 75 28 77 69 6e 5f 49 43 4f |tachmenu(win_ICO| 000026e0 4e 42 41 52 2c 20 76 6f 63 61 62 5f 6d 65 6e 75 |NBAR, vocab_menu| 000026f0 2c 20 76 6f 63 61 62 5f 6d 65 6e 75 70 72 6f 63 |, vocab_menuproc| 00002700 2c 20 30 29 29 0a 20 20 20 72 65 74 75 72 6e 20 |, 0)). return | 00002710 46 41 4c 53 45 3b 20 2f 2a 20 55 6e 61 62 6c 65 |FALSE; /* Unable| 00002720 20 74 6f 20 61 74 74 61 63 68 20 6d 65 6e 75 20 | to attach menu | 00002730 2a 2f 0a 0a 0a 6d 65 6e 75 5f 6d 61 6b 65 5f 77 |*/...menu_make_w| 00002740 72 69 74 65 61 62 6c 65 28 65 64 65 6c 65 74 65 |riteable(edelete| 00002750 5f 6d 65 6e 75 2c 31 2c 74 65 6d 70 5f 64 6e 2c |_menu,1,temp_dn,| 00002760 31 30 2c 22 22 29 3b 0a 6d 65 6e 75 5f 6d 61 6b |10,"");.menu_mak| 00002770 65 5f 77 72 69 74 65 61 62 6c 65 28 77 64 65 6c |e_writeable(wdel| 00002780 65 74 65 5f 6d 65 6e 75 2c 31 2c 74 65 6d 70 5f |ete_menu,1,temp_| 00002790 64 6e 2c 31 30 2c 22 22 29 3b 0a 6d 65 6e 75 5f |dn,10,"");.menu_| 000027a0 6d 61 6b 65 5f 77 72 69 74 65 61 62 6c 65 28 69 |make_writeable(i| 000027b0 6e 73 65 72 74 5f 6d 65 6e 75 2c 31 2c 74 65 6d |nsert_menu,1,tem| 000027c0 70 5f 69 6e 73 2c 31 30 2c 22 22 29 3b 0a 0a 0a |p_ins,10,"");...| 000027d0 0a 0a 20 20 69 66 20 28 6d 20 3d 20 64 62 6f 78 |.. if (m = dbox| 000027e0 5f 6e 65 77 28 22 6d 22 29 2c 20 6d 20 21 3d 20 |_new("m"), m != | 000027f0 4e 55 4c 4c 29 3b 0a 20 20 7b 0a 20 20 20 64 62 |NULL);. {. db| 00002800 6f 78 5f 65 76 65 6e 74 68 61 6e 64 6c 65 72 28 |ox_eventhandler(| 00002810 6d 2c 6d 5f 68 61 6e 64 6c 65 72 2c 30 29 3b 0a |m,m_handler,0);.| 00002820 20 20 7d 0a 0a 20 69 66 20 28 6f 70 74 69 6f 6e | }.. if (option| 00002830 73 20 3d 20 64 62 6f 78 5f 6e 65 77 28 22 4f 50 |s = dbox_new("OP| 00002840 54 22 29 2c 20 6f 70 74 69 6f 6e 73 20 21 3d 20 |T"), options != | 00002850 4e 55 4c 4c 29 3b 0a 20 20 7b 0a 20 20 20 64 62 |NULL);. {. db| 00002860 6f 78 5f 65 76 65 6e 74 68 61 6e 64 6c 65 72 28 |ox_eventhandler(| 00002870 6f 70 74 69 6f 6e 73 2c 6f 70 74 69 6f 6e 73 5f |options,options_| 00002880 68 61 6e 64 6c 65 72 2c 30 29 3b 0a 20 20 7d 0a |handler,0);. }.| 00002890 0a 69 66 20 28 77 72 6f 6e 67 20 3d 20 64 62 6f |.if (wrong = dbo| 000028a0 78 5f 6e 65 77 28 22 77 72 6f 6e 67 22 29 2c 20 |x_new("wrong"), | 000028b0 77 72 6f 6e 67 20 21 3d 20 4e 55 4c 4c 29 3b 0a |wrong != NULL);.| 000028c0 20 20 7b 0a 20 20 20 64 62 6f 78 5f 65 76 65 6e | {. dbox_even| 000028d0 74 68 61 6e 64 6c 65 72 28 77 72 6f 6e 67 2c 77 |thandler(wrong,w| 000028e0 72 6f 6e 67 5f 68 61 6e 64 6c 65 72 2c 30 29 3b |rong_handler,0);| 000028f0 0a 20 20 69 66 20 28 21 65 76 65 6e 74 5f 61 74 |. if (!event_at| 00002900 74 61 63 68 6d 65 6e 75 28 64 62 6f 78 5f 73 79 |tachmenu(dbox_sy| 00002910 73 68 61 6e 64 6c 65 28 77 72 6f 6e 67 29 2c 77 |shandle(wrong),w| 00002920 72 6f 6e 67 5f 6d 65 6e 75 2c 77 72 6f 6e 67 5f |rong_menu,wrong_| 00002930 6d 65 6e 75 70 72 6f 63 2c 20 30 29 29 0a 20 20 |menuproc, 0)). | 00002940 20 72 65 74 75 72 6e 20 46 41 4c 53 45 3b 20 2f | return FALSE; /| 00002950 2a 20 55 6e 61 62 6c 65 20 74 6f 20 61 74 74 61 |* Unable to atta| 00002960 63 68 20 6d 65 6e 75 20 2a 2f 0a 20 20 7d 0a 0a |ch menu */. }..| 00002970 69 66 20 28 65 64 69 74 20 3d 20 64 62 6f 78 5f |if (edit = dbox_| 00002980 6e 65 77 28 22 65 64 69 74 22 29 2c 20 65 64 69 |new("edit"), edi| 00002990 74 20 21 3d 20 4e 55 4c 4c 29 3b 0a 20 20 7b 0a |t != NULL);. {.| 000029a0 20 20 20 64 62 6f 78 5f 65 76 65 6e 74 68 61 6e | dbox_eventhan| 000029b0 64 6c 65 72 28 65 64 69 74 2c 65 64 69 74 5f 68 |dler(edit,edit_h| 000029c0 61 6e 64 6c 65 72 2c 30 29 3b 0a 20 20 69 66 20 |andler,0);. if | 000029d0 28 21 65 76 65 6e 74 5f 61 74 74 61 63 68 6d 65 |(!event_attachme| 000029e0 6e 75 28 64 62 6f 78 5f 73 79 73 68 61 6e 64 6c |nu(dbox_syshandl| 000029f0 65 28 65 64 69 74 29 2c 65 64 69 74 5f 6d 65 6e |e(edit),edit_men| 00002a00 75 2c 65 64 69 74 5f 6d 65 6e 75 70 72 6f 63 2c |u,edit_menuproc,| 00002a10 20 30 29 29 0a 20 20 20 72 65 74 75 72 6e 20 46 | 0)). return F| 00002a20 41 4c 53 45 3b 20 2f 2a 20 55 6e 61 62 6c 65 20 |ALSE; /* Unable | 00002a30 74 6f 20 61 74 74 61 63 68 20 6d 65 6e 75 20 2a |to attach menu *| 00002a40 2f 0a 20 20 7d 0a 0a 0a 2f 2a 77 69 6d 70 74 5f |/. }.../*wimpt_| 00002a50 63 6f 6d 70 6c 61 69 6e 20 28 77 69 6d 70 5f 63 |complain (wimp_c| 00002a60 6c 61 69 6d 69 6e 74 65 72 66 61 63 65 20 28 29 |laiminterface ()| 00002a70 29 3b 20 2a 2f 0a 0a 0a 20 20 2f 2a 20 41 6c 6c |); */... /* All| 00002a80 20 77 65 6e 74 20 6f 6b 20 2a 2f 0a 20 20 72 65 | went ok */. re| 00002a90 74 75 72 6e 20 54 52 55 45 3b 0a 0a 7d 0a 0a 0a |turn TRUE;..}...| 00002aa0 0a 0a 0a 0a 0a 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |...../**********| 00002ab0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00002ac0 2a 2a 2a 2a 2a 20 4d 41 49 4e 20 50 52 4f 47 52 |***** MAIN PROGR| 00002ad0 41 4d 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |AM *************| 00002ae0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00002af0 2a 2a 2a 2f 0a 0a 2f 2a 2d 2d 2d 20 4d 61 69 6e |***/../*--- Main| 00002b00 20 65 6e 74 72 79 20 70 6f 69 6e 74 2e 20 2d 2d | entry point. --| 00002b10 2d 2a 2f 0a 69 6e 74 20 6d 61 69 6e 28 29 0a 7b |-*/.int main().{| 00002b20 0a 20 73 74 72 63 70 79 28 6c 61 6e 67 75 61 67 |. strcpy(languag| 00002b30 65 2c 22 3c 4e 6f 6e 65 3e 22 29 3b 0a 2f 2a 0a |e,"<None>");./*.| 00002b40 73 74 72 63 70 79 28 66 69 6c 65 5f 74 6f 5f 6c |strcpy(file_to_l| 00002b50 6f 61 64 2c 22 3c 6f 62 65 79 24 44 69 72 3e 2e |oad,"<obey$Dir>.| 00002b60 77 6f 72 64 73 22 29 3b 0a 2a 2f 0a 63 73 6f 75 |words");.*/.csou| 00002b70 6e 64 3d 31 3b 0a 77 73 6f 75 6e 64 3d 31 3b 0a |nd=1;.wsound=1;.| 00002b80 0a 6e 6f 77 3d 31 3b 0a 0a 0a 0a 20 20 69 66 20 |.now=1;.... if | 00002b90 28 76 6f 63 61 62 5f 69 6e 69 74 69 61 6c 69 73 |(vocab_initialis| 00002ba0 65 28 29 29 0a 20 20 7b 0a 0a 20 20 20 20 2f 2a |e()). {.. /*| 00002bb0 20 54 68 65 20 6d 61 69 6e 20 65 76 65 6e 74 20 | The main event | 00002bc0 6c 6f 6f 70 20 2a 2f 0a 20 20 20 20 77 68 69 6c |loop */. whil| 00002bd0 65 20 28 54 52 55 45 29 0a 20 20 20 20 20 20 65 |e (TRUE). e| 00002be0 76 65 6e 74 5f 70 72 6f 63 65 73 73 28 29 3b 0a |vent_process();.| 00002bf0 20 20 7d 0a 0a 20 20 72 65 74 75 72 6e 20 30 3b | }.. return 0;| 00002c00 0a 7d 0a |.}.| 00002c03