Home » Archimedes archive » Acorn User » AU 1996-12 A.adf » Regulars » C/!RAPS/c/!RunImage » Compare
Compare C/!RAPS/c/!RunImage with WimpC/!RAPS/c/!RunImage
| File: | Archimedes archive » Acorn User » AU 1996-12 A.adf » Regulars » C/!RAPS/c/!RunImage |
| Compared with: | Archimedes archive » Acorn User » AU 1996-10 A.adf » Regulars » WimpC/!RAPS/c/!RunImage |
| Similarity: | 92% of bytes duplicated |
92.3% of the bytes in these files are duplicated between them. Duplicated Different Padding (ignored)
Bytes are marked as duplicated if they lie within a run of at least 16 bytes which also appears somewhere in the other file, in any position. Long runs of padding bytes
(zeros, spaces, &FF and &E5) are ignored.
C/!RAPS/c/!RunImage
00000000 2f 2a 20 52 41 50 53 20 2d 20 61 20 70 61 72 61 |/* RAPS - a para| 00000010 63 68 75 74 65 20 6a 75 6d 70 20 64 61 74 61 62 |chute jump datab| 00000020 61 73 65 20 70 72 6f 67 72 61 6d 0a 20 2a 20 54 |ase program. * T| 00000030 6f 20 64 65 6d 6f 6e 73 74 72 61 74 65 20 74 68 |o demonstrate th| 00000040 65 20 41 63 6f 72 6e 20 55 73 65 72 20 57 69 6d |e Acorn User Wim| 00000050 70 20 43 20 6c 69 62 72 61 72 79 0a 20 2a 20 62 |p C library. * b| 00000060 79 20 53 74 65 76 65 20 4d 75 6d 66 6f 72 64 20 |y Steve Mumford | 00000070 66 6f 72 20 41 63 6f 72 6e 20 55 73 65 72 2c 20 |for Acorn User, | 00000080 53 65 70 74 65 6d 62 65 72 20 31 39 39 36 20 2a |September 1996 *| 00000090 2f 0a 0a 2f 2a 20 23 69 6e 63 6c 75 64 65 73 20 |/../* #includes | 000000a0 2a 2f 0a 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74 |*/..#include <st| 000000b0 64 69 6f 2e 68 3e 0a 23 69 6e 63 6c 75 64 65 20 |dio.h>.#include | 000000c0 3c 73 74 64 6c 69 62 2e 68 3e 0a 23 69 6e 63 6c |<stdlib.h>.#incl| 000000d0 75 64 65 20 3c 73 74 72 69 6e 67 2e 68 3e 0a 23 |ude <string.h>.#| 000000e0 69 6e 63 6c 75 64 65 20 22 41 55 4c 69 62 2e 68 |include "AULib.h| 000000f0 22 0a 0a 2f 2a 20 23 64 65 66 69 6e 65 73 20 2a |"../* #defines *| 00000100 2f 0a 0a 23 64 65 66 69 6e 65 20 50 4f 4c 4c 5f |/..#define POLL_| 00000110 4d 41 53 4b 20 31 0a 23 64 65 66 69 6e 65 20 4d |MASK 1.#define M| 00000120 41 58 5f 57 49 4e 44 4f 57 53 20 33 0a 23 64 65 |AX_WINDOWS 3.#de| 00000130 66 69 6e 65 20 4d 41 58 5f 4d 45 4e 55 53 20 31 |fine MAX_MENUS 1| 00000140 0a 23 64 65 66 69 6e 65 20 4d 41 58 5f 4a 55 4d |.#define MAX_JUM| 00000150 50 53 20 31 35 0a 23 64 65 66 69 6e 65 20 56 45 |PS 15.#define VE| 00000160 52 53 49 4f 4e 5f 4e 55 4d 42 45 52 20 33 31 30 |RSION_NUMBER 310| 00000170 20 2f 2a 20 52 69 73 63 20 4f 53 20 76 65 72 73 | /* Risc OS vers| 00000180 69 6f 6e 20 6e 6f 2e 20 2a 20 31 30 30 20 2a 2f |ion no. * 100 */| 00000190 0a 0a 2f 2a 20 54 68 65 73 65 20 23 64 65 66 69 |../* These #defi| 000001a0 6e 65 73 20 72 65 6c 61 74 65 20 74 6f 20 74 68 |nes relate to th| 000001b0 65 20 69 63 6f 6e 20 6e 75 6d 62 65 72 73 20 69 |e icon numbers i| 000001c0 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 66 |n the template f| 000001d0 69 6c 65 20 2a 2f 0a 0a 23 64 65 66 69 6e 65 20 |ile */..#define | 000001e0 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 49 |CURRENT_RECORD_I| 000001f0 43 4f 4e 20 32 0a 23 64 65 66 69 6e 65 20 4c 41 |CON 2.#define LA| 00000200 53 54 5f 52 45 43 4f 52 44 5f 49 43 4f 4e 20 34 |ST_RECORD_ICON 4| 00000210 0a 23 64 65 66 69 6e 65 20 50 52 45 56 5f 52 45 |.#define PREV_RE| 00000220 43 4f 52 44 5f 49 43 4f 4e 20 35 0a 23 64 65 66 |CORD_ICON 5.#def| 00000230 69 6e 65 20 4e 45 58 54 5f 52 45 43 4f 52 44 5f |ine NEXT_RECORD_| 00000240 49 43 4f 4e 20 36 0a 23 64 65 66 69 6e 65 20 44 |ICON 6.#define D| 00000250 41 54 45 5f 49 43 4f 4e 20 37 0a 23 64 65 66 69 |ATE_ICON 7.#defi| 00000260 6e 65 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e |ne AIRCRAFT_ICON| 00000270 20 39 0a 23 64 65 66 69 6e 65 20 44 52 4f 50 5a | 9.#define DROPZ| 00000280 4f 4e 45 5f 49 43 4f 4e 20 31 31 0a 23 64 65 66 |ONE_ICON 11.#def| 00000290 69 6e 65 20 41 4c 54 49 54 55 44 45 5f 49 43 4f |ine ALTITUDE_ICO| 000002a0 4e 20 31 33 0a 23 64 65 66 69 6e 65 20 44 45 4c |N 13.#define DEL| 000002b0 41 59 5f 49 43 4f 4e 20 31 35 0a 23 64 65 66 69 |AY_ICON 15.#defi| 000002c0 6e 65 20 41 49 52 57 4f 52 4b 5f 49 43 4f 4e 20 |ne AIRWORK_ICON | 000002d0 31 37 0a 23 64 65 66 69 6e 65 20 52 45 4d 41 52 |17.#define REMAR| 000002e0 4b 53 31 5f 49 43 4f 4e 20 31 39 0a 23 64 65 66 |KS1_ICON 19.#def| 000002f0 69 6e 65 20 52 45 4d 41 52 4b 53 32 5f 49 43 4f |ine REMARKS2_ICO| 00000300 4e 20 32 31 0a 23 64 65 66 69 6e 65 20 55 50 44 |N 21.#define UPD| 00000310 41 54 45 5f 49 43 4f 4e 20 32 32 0a 23 64 65 66 |ATE_ICON 22.#def| 00000320 69 6e 65 20 53 41 56 45 5f 49 43 4f 4e 20 30 0a |ine SAVE_ICON 0.| 00000330 23 64 65 66 69 6e 65 20 53 41 56 45 5f 46 49 4c |#define SAVE_FIL| 00000340 45 4e 41 4d 45 5f 49 43 4f 4e 20 31 0a 0a 2f 2a |ENAME_ICON 1../*| 00000350 20 54 68 65 73 65 20 6e 65 78 74 20 23 64 65 66 | These next #def| 00000360 69 6e 65 73 20 73 65 74 20 75 70 20 74 68 65 20 |ines set up the | 00000370 6d 65 6e 75 20 73 65 6c 65 63 74 69 6f 6e 20 63 |menu selection c| 00000380 68 6f 69 63 65 73 20 2a 2f 0a 0a 2f 2a 20 69 63 |hoices */../* ic| 00000390 6f 6e 62 61 72 20 6d 65 6e 75 20 2a 2f 0a 23 64 |onbar menu */.#d| 000003a0 65 66 69 6e 65 20 49 4e 46 4f 5f 4f 50 54 49 4f |efine INFO_OPTIO| 000003b0 4e 20 30 0a 23 64 65 66 69 6e 65 20 53 41 56 45 |N 0.#define SAVE| 000003c0 5f 4f 50 54 49 4f 4e 20 31 0a 23 64 65 66 69 6e |_OPTION 1.#defin| 000003d0 65 20 51 55 49 54 5f 4f 50 54 49 4f 4e 20 32 0a |e QUIT_OPTION 2.| 000003e0 0a 2f 2a 20 54 68 65 73 65 20 23 64 65 66 69 6e |./* These #defin| 000003f0 65 73 20 73 65 74 20 75 70 20 73 6f 6d 65 20 66 |es set up some f| 00000400 6c 61 67 20 6d 6e 65 6d 6f 6d 69 63 73 20 2a 2f |lag mnemomics */| 00000410 0a 0a 23 64 65 66 69 6e 65 20 53 41 56 45 5f 44 |..#define SAVE_D| 00000420 52 41 47 20 31 0a 0a 74 79 70 65 64 65 66 20 73 |RAG 1..typedef s| 00000430 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 74 61 20 |truct jump_data | 00000440 7b 0a 09 69 6e 74 20 6a 75 6d 70 5f 6e 6f 3b 0a |{..int jump_no;.| 00000450 09 63 68 61 72 20 64 61 74 65 5b 31 31 5d 3b 0a |.char date[11];.| 00000460 09 63 68 61 72 20 61 69 72 63 72 61 66 74 5b 33 |.char aircraft[3| 00000470 31 5d 3b 0a 09 63 68 61 72 20 64 72 6f 70 7a 6f |1];..char dropzo| 00000480 6e 65 5b 35 31 5d 3b 0a 09 69 6e 74 20 61 6c 74 |ne[51];..int alt| 00000490 69 74 75 64 65 3b 0a 09 69 6e 74 20 64 65 6c 61 |itude;..int dela| 000004a0 79 3b 0a 09 63 68 61 72 20 61 69 72 77 6f 72 6b |y;..char airwork| 000004b0 5b 31 33 5d 3b 0a 09 63 68 61 72 20 72 65 6d 61 |[13];..char rema| 000004c0 72 6b 73 31 5b 35 31 5d 3b 0a 09 63 68 61 72 20 |rks1[51];..char | 000004d0 72 65 6d 61 72 6b 73 32 5b 36 31 5d 3b 0a 09 73 |remarks2[61];..s| 000004e0 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 74 61 20 |truct jump_data | 000004f0 2a 70 72 65 76 5f 72 65 63 6f 72 64 3b 0a 09 73 |*prev_record;..s| 00000500 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 74 61 20 |truct jump_data | 00000510 2a 6e 65 78 74 5f 72 65 63 6f 72 64 3b 0a 7d 20 |*next_record;.} | 00000520 6a 75 6d 70 5f 64 61 74 61 3b 0a 0a 2f 2a 20 47 |jump_data;../* G| 00000530 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c 65 73 20 |lobal variables | 00000540 2a 2f 0a 0a 69 6e 74 09 51 55 49 54 5f 46 4c 41 |*/..int.QUIT_FLA| 00000550 47 20 3d 20 30 3b 0a 69 6e 74 09 44 52 41 47 5f |G = 0;.int.DRAG_| 00000560 46 4c 41 47 20 3d 20 30 3b 0a 69 6e 74 09 43 55 |FLAG = 0;.int.CU| 00000570 52 52 45 4e 54 5f 4d 45 4e 55 20 3d 20 30 3b 0a |RRENT_MENU = 0;.| 00000580 69 6e 74 09 43 55 52 52 45 4e 54 5f 52 45 43 4f |int.CURRENT_RECO| 00000590 52 44 5f 4e 55 4d 42 45 52 20 3d 20 31 3b 0a 69 |RD_NUMBER = 1;.i| 000005a0 6e 74 09 4c 41 53 54 5f 52 45 43 4f 52 44 5f 4e |nt.LAST_RECORD_N| 000005b0 55 4d 42 45 52 20 3d 20 31 3b 0a 6a 75 6d 70 5f |UMBER = 1;.jump_| 000005c0 64 61 74 61 09 2a 43 55 52 52 45 4e 54 5f 52 45 |data.*CURRENT_RE| 000005d0 43 4f 52 44 5f 50 4f 49 4e 54 45 52 20 3d 20 4e |CORD_POINTER = N| 000005e0 55 4c 4c 3b 0a 0a 77 69 6e 64 6f 77 5f 64 61 74 |ULL;..window_dat| 000005f0 61 09 77 69 6e 5f 64 61 74 61 5b 4d 41 58 5f 57 |a.win_data[MAX_W| 00000600 49 4e 44 4f 57 53 5d 3b 0a 6d 65 6e 75 5f 64 61 |INDOWS];.menu_da| 00000610 74 61 09 6d 65 6e 5f 64 61 74 61 5b 4d 41 58 5f |ta.men_data[MAX_| 00000620 4d 45 4e 55 53 5d 3b 0a 6a 75 6d 70 5f 64 61 74 |MENUS];.jump_dat| 00000630 61 09 2a 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f 74 |a.*jmp_data_root| 00000640 3b 0a 63 68 61 72 20 61 70 70 6e 61 6d 65 5b 5d |;.char appname[]| 00000650 20 3d 20 22 52 41 50 53 20 4a 75 6d 70 20 4c 6f | = "RAPS Jump Lo| 00000660 67 67 65 72 22 3b 0a 63 68 61 72 20 73 70 72 6e |gger";.char sprn| 00000670 61 6d 65 5b 5d 20 3d 20 22 21 72 61 70 73 22 3b |ame[] = "!raps";| 00000680 0a 6c 6f 6e 67 20 69 6e 74 20 6d 73 67 6c 69 73 |.long int msglis| 00000690 74 5b 5d 20 3d 20 7b 30 7d 3b 0a 0a 2f 2a 20 46 |t[] = {0};../* F| 000006a0 75 6e 63 74 69 6f 6e 20 70 72 6f 74 6f 74 79 70 |unction prototyp| 000006b0 69 6e 67 20 2a 2f 0a 0a 69 6e 74 09 6d 61 69 6e |ing */..int.main| 000006c0 28 76 6f 69 64 29 3b 0a 76 6f 69 64 09 6f 70 65 |(void);.void.ope| 000006d0 6e 77 69 6e 64 6f 77 28 75 6e 73 69 67 6e 65 64 |nwindow(unsigned| 000006e0 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 64 09 63 | char[]);.void.c| 000006f0 6c 6f 73 65 77 69 6e 64 6f 77 28 75 6e 73 69 67 |losewindow(unsig| 00000700 6e 65 64 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 |ned char[]);.voi| 00000710 64 09 6c 6f 61 64 74 65 6d 70 6c 61 74 65 73 28 |d.loadtemplates(| 00000720 76 6f 69 64 29 3b 0a 76 6f 69 64 09 6d 6f 75 73 |void);.void.mous| 00000730 65 5f 63 6c 69 63 6b 28 75 6e 73 69 67 6e 65 64 |e_click(unsigned| 00000740 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 64 09 64 | char[]);.void.d| 00000750 72 61 67 5f 72 65 74 75 72 6e 28 75 6e 73 69 67 |rag_return(unsig| 00000760 6e 65 64 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 |ned char[]);.voi| 00000770 64 09 77 69 6d 70 5f 6d 73 67 28 69 6e 74 2c 20 |d.wimp_msg(int, | 00000780 75 6e 73 69 67 6e 65 64 20 63 68 61 72 5b 5d 29 |unsigned char[])| 00000790 3b 0a 76 6f 69 64 09 6f 70 65 6e 5f 6d 61 69 6e |;.void.open_main| 000007a0 5f 77 69 6e 64 6f 77 28 76 6f 69 64 29 3b 0a 76 |_window(void);.v| 000007b0 6f 69 64 09 70 72 65 76 5f 72 65 63 6f 72 64 28 |oid.prev_record(| 000007c0 76 6f 69 64 29 3b 0a 76 6f 69 64 09 6e 65 78 74 |void);.void.next| 000007d0 5f 72 65 63 6f 72 64 28 76 6f 69 64 29 3b 0a 76 |_record(void);.v| 000007e0 6f 69 64 09 75 70 64 61 74 65 5f 77 69 6e 64 6f |oid.update_windo| 000007f0 77 5f 69 6e 66 6f 28 76 6f 69 64 29 3b 0a 76 6f |w_info(void);.vo| 00000800 69 64 09 6d 65 6e 75 5f 73 65 6c 65 63 74 69 6f |id.menu_selectio| 00000810 6e 28 75 6e 73 69 67 6e 65 64 20 63 68 61 72 5b |n(unsigned char[| 00000820 5d 29 3b 0a 76 6f 69 64 09 73 65 74 75 70 5f 64 |]);.void.setup_d| 00000830 61 74 61 62 61 73 65 28 76 6f 69 64 29 3b 0a 76 |atabase(void);.v| 00000840 6f 69 64 09 75 70 64 61 74 65 5f 72 65 63 6f 72 |oid.update_recor| 00000850 64 28 76 6f 69 64 29 3b 0a 76 6f 69 64 09 61 64 |d(void);.void.ad| 00000860 64 5f 72 65 63 6f 72 64 28 76 6f 69 64 29 3b 0a |d_record(void);.| 00000870 76 6f 69 64 09 64 61 74 61 5f 73 61 76 65 28 75 |void.data_save(u| 00000880 6e 73 69 67 6e 65 64 20 63 68 61 72 5b 5d 29 3b |nsigned char[]);| 00000890 0a 0a 2f 2a 20 4d 61 69 6e 20 70 72 6f 67 72 61 |../* Main progra| 000008a0 6d 20 2a 2f 0a 0a 69 6e 74 0a 6d 61 69 6e 28 29 |m */..int.main()| 000008b0 0a 7b 0a 09 69 6e 74 09 74 61 73 6b 5f 68 61 6e |.{..int.task_han| 000008c0 64 6c 65 2c 20 69 63 6f 6e 5f 68 61 6e 64 6c 65 |dle, icon_handle| 000008d0 3b 0a 0a 09 75 6e 73 69 67 6e 65 64 20 63 68 61 |;...unsigned cha| 000008e0 72 09 70 6f 6c 6c 5f 62 6c 6f 63 6b 5b 32 35 36 |r.poll_block[256| 000008f0 5d 3b 0a 09 69 6e 74 09 70 6f 6c 6c 5f 72 65 73 |];..int.poll_res| 00000900 75 6c 74 3b 0a 09 69 6e 74 09 69 20 3d 20 30 3b |ult;..int.i = 0;| 00000910 0a 0a 09 73 65 74 75 70 5f 64 61 74 61 62 61 73 |...setup_databas| 00000920 65 28 29 3b 0a 09 74 61 73 6b 5f 68 61 6e 64 6c |e();..task_handl| 00000930 65 20 3d 20 61 75 5f 69 6e 69 74 69 61 6c 69 73 |e = au_initialis| 00000940 65 28 56 45 52 53 49 4f 4e 5f 4e 55 4d 42 45 52 |e(VERSION_NUMBER| 00000950 2c 20 61 70 70 6e 61 6d 65 2c 20 6d 73 67 6c 69 |, appname, msgli| 00000960 73 74 29 3b 0a 09 69 63 6f 6e 5f 68 61 6e 64 6c |st);..icon_handl| 00000970 65 20 3d 20 61 75 5f 63 72 65 61 74 65 5f 69 63 |e = au_create_ic| 00000980 6f 6e 62 61 72 5f 69 63 6f 6e 28 49 42 41 52 5f |onbar_icon(IBAR_| 00000990 50 52 49 4f 52 5f 41 50 50 2c 0a 09 09 09 49 42 |PRIOR_APP,....IB| 000009a0 41 52 5f 4f 4e 52 49 47 48 54 2c 0a 09 09 09 49 |AR_ONRIGHT,....I| 000009b0 43 4f 4e 5f 49 53 53 50 52 49 54 45 20 7c 20 49 |CON_ISSPRITE | I| 000009c0 43 4f 4e 5f 48 43 45 4e 54 52 45 20 7c 20 49 43 |CON_HCENTRE | IC| 000009d0 4f 4e 5f 56 43 45 4e 54 52 45 20 7c 20 49 43 4f |ON_VCENTRE | ICO| 000009e0 4e 5f 43 4c 49 43 4b 4e 4f 54 49 46 49 45 53 4f |N_CLICKNOTIFIESO| 000009f0 4e 43 45 2c 0a 09 09 09 73 70 72 6e 61 6d 65 29 |NCE,....sprname)| 00000a00 3b 0a 09 6c 6f 61 64 74 65 6d 70 6c 61 74 65 73 |;..loadtemplates| 00000a10 28 29 3b 0a 09 2f 2a 61 75 5f 6f 70 65 6e 77 69 |();../*au_openwi| 00000a20 6e 5f 66 72 6f 6d 5f 74 65 6d 70 6c 61 74 65 64 |n_from_templated| 00000a30 61 74 61 28 26 77 69 6e 5f 64 61 74 61 5b 30 5d |ata(&win_data[0]| 00000a40 2c 20 2d 31 29 3b 20 2a 2f 0a 09 77 68 69 6c 65 |, -1); */..while| 00000a50 20 28 51 55 49 54 5f 46 4c 41 47 20 3d 3d 20 30 | (QUIT_FLAG == 0| 00000a60 29 20 7b 0a 09 2f 2a 20 64 6f 20 73 6f 6d 65 20 |) {../* do some | 00000a70 70 6f 6c 6c 69 6e 67 20 2a 2f 0a 09 09 70 6f 6c |polling */...pol| 00000a80 6c 5f 72 65 73 75 6c 74 20 3d 20 61 75 5f 77 69 |l_result = au_wi| 00000a90 6d 70 5f 70 6f 6c 6c 28 50 4f 4c 4c 5f 4d 41 53 |mp_poll(POLL_MAS| 00000aa0 4b 2c 20 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a |K, poll_block);.| 00000ab0 09 09 73 77 69 74 63 68 20 28 70 6f 6c 6c 5f 72 |..switch (poll_r| 00000ac0 65 73 75 6c 74 29 20 7b 0a 09 09 09 63 61 73 65 |esult) {....case| 00000ad0 20 20 32 20 3a 20 6f 70 65 6e 77 69 6e 64 6f 77 | 2 : openwindow| 00000ae0 28 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 |(poll_block);...| 00000af0 09 09 09 09 62 72 65 61 6b 3b 0a 09 09 09 63 61 |....break;....ca| 00000b00 73 65 20 20 33 20 3a 20 63 6c 6f 73 65 77 69 6e |se 3 : closewin| 00000b10 64 6f 77 28 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b |dow(poll_block);| 00000b20 0a 09 09 09 09 09 09 62 72 65 61 6b 3b 0a 09 09 |.......break;...| 00000b30 09 63 61 73 65 20 20 36 20 3a 20 6d 6f 75 73 65 |.case 6 : mouse| 00000b40 5f 63 6c 69 63 6b 28 70 6f 6c 6c 5f 62 6c 6f 63 |_click(poll_bloc| 00000b50 6b 29 3b 0a 09 09 09 09 09 09 62 72 65 61 6b 3b |k);.......break;| 00000b60 0a 09 09 09 63 61 73 65 20 20 37 20 3a 20 64 72 |....case 7 : dr| 00000b70 61 67 5f 72 65 74 75 72 6e 28 70 6f 6c 6c 5f 62 |ag_return(poll_b| 00000b80 6c 6f 63 6b 29 3b 0a 09 09 09 09 09 09 62 72 65 |lock);.......bre| 00000b90 61 6b 3b 0a 09 09 09 63 61 73 65 20 20 39 20 3a |ak;....case 9 :| 00000ba0 20 6d 65 6e 75 5f 73 65 6c 65 63 74 69 6f 6e 28 | menu_selection(| 00000bb0 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 09 |poll_block);....| 00000bc0 09 09 09 62 72 65 61 6b 3b 0a 09 09 09 63 61 73 |...break;....cas| 00000bd0 65 20 31 37 20 3a 0a 09 09 09 63 61 73 65 20 31 |e 17 :....case 1| 00000be0 38 20 3a 0a 09 09 09 63 61 73 65 20 31 39 20 3a |8 :....case 19 :| 00000bf0 20 77 69 6d 70 5f 6d 73 67 28 70 6f 6c 6c 5f 72 | wimp_msg(poll_r| 00000c00 65 73 75 6c 74 2c 20 70 6f 6c 6c 5f 62 6c 6f 63 |esult, poll_bloc| 00000c10 6b 29 3b 0a 09 09 09 09 09 09 62 72 65 61 6b 3b |k);.......break;| 00000c20 0a 09 09 7d 0a 09 7d 0a 09 61 75 5f 63 6c 6f 73 |...}..}..au_clos| 00000c30 65 64 6f 77 6e 28 74 61 73 6b 5f 68 61 6e 64 6c |edown(task_handl| 00000c40 65 29 3b 0a 0a 09 66 6f 72 28 69 20 3d 20 30 3b |e);...for(i = 0;| 00000c50 20 69 20 3c 20 4d 41 58 5f 57 49 4e 44 4f 57 53 | i < MAX_WINDOWS| 00000c60 3b 20 69 2b 2b 29 20 7b 0a 09 09 66 72 65 65 28 |; i++) {...free(| 00000c70 77 69 6e 5f 64 61 74 61 5b 69 5d 2e 77 69 6e 5f |win_data[i].win_| 00000c80 6e 61 6d 65 29 3b 0a 09 09 66 72 65 65 28 77 69 |name);...free(wi| 00000c90 6e 5f 64 61 74 61 5b 69 5d 2e 62 75 66 66 65 72 |n_data[i].buffer| 00000ca0 29 3b 0a 09 09 66 72 65 65 28 77 69 6e 5f 64 61 |);...free(win_da| 00000cb0 74 61 5b 69 5d 2e 77 6f 72 6b 73 70 61 63 65 29 |ta[i].workspace)| 00000cc0 3b 0a 09 7d 0a 0a 09 2f 2a 20 23 52 65 6d 65 6d |;..}.../* #Remem| 00000cd0 62 65 72 20 74 6f 20 66 72 65 65 20 6d 65 6e 75 |ber to free menu| 00000ce0 20 73 70 61 63 65 21 20 28 72 65 63 75 72 73 69 | space! (recursi| 00000cf0 6f 6e 3f 29 20 2a 2f 0a 7d 0a 0a 76 6f 69 64 20 |on?) */.}..void | 00000d00 6d 6f 75 73 65 5f 63 6c 69 63 6b 28 75 6e 73 69 |mouse_click(unsi| 00000d10 67 6e 65 64 20 63 68 61 72 20 70 6f 6c 6c 5f 62 |gned char poll_b| 00000d20 6c 6f 63 6b 5b 5d 29 0a 7b 0a 09 2f 2a 20 54 68 |lock[]).{../* Th| 00000d30 65 20 64 72 61 67 67 69 6e 67 20 63 6f 64 65 20 |e dragging code | 00000d40 61 6c 73 6f 20 67 6f 65 73 20 69 6e 20 68 65 72 |also goes in her| 00000d50 65 2e 2e 2e 20 2a 2f 20 0a 09 69 6e 74 09 63 6c |e... */ ..int.cl| 00000d60 6b 3b 0a 09 6c 6f 6e 67 20 69 6e 74 09 69 63 6f |k;..long int.ico| 00000d70 6e 5f 6e 75 6d 3b 0a 0a 09 2f 2a 20 44 65 74 65 |n_num;.../* Dete| 00000d80 72 6d 69 6e 65 20 77 68 69 63 68 20 62 75 74 74 |rmine which butt| 00000d90 6f 6e 20 77 61 73 20 70 72 65 73 73 65 64 20 2a |on was pressed *| 00000da0 2f 0a 09 63 6c 6b 20 3d 20 28 69 6e 74 29 20 61 |/..clk = (int) a| 00000db0 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c |u_bytetoword(pol| 00000dc0 6c 5f 62 6c 6f 63 6b 2c 20 38 29 3b 20 0a 0a 09 |l_block, 8); ...| 00000dd0 69 66 28 28 61 75 5f 62 79 74 65 74 6f 77 6f 72 |if((au_bytetowor| 00000de0 64 28 70 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 32 |d(poll_block, 12| 00000df0 29 20 3d 3d 20 2d 32 29 20 26 26 20 28 63 6c 6b |) == -2) && (clk| 00000e00 20 3d 3d 20 34 29 29 20 7b 0a 09 6f 70 65 6e 5f | == 4)) {..open_| 00000e10 6d 61 69 6e 5f 77 69 6e 64 6f 77 28 29 3b 0a 09 |main_window();..| 00000e20 7d 0a 0a 09 69 66 28 28 61 75 5f 62 79 74 65 74 |}...if((au_bytet| 00000e30 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c 6f 63 6b |oword(poll_block| 00000e40 2c 20 31 32 29 20 3d 3d 20 2d 32 29 20 26 26 20 |, 12) == -2) && | 00000e50 28 63 6c 6b 20 3d 3d 20 32 29 29 20 7b 0a 09 09 |(clk == 2)) {...| 00000e60 2f 2a 20 54 69 6d 65 20 74 6f 20 70 72 6f 64 75 |/* Time to produ| 00000e70 63 65 20 61 20 6d 65 6e 75 20 2a 2f 0a 09 09 61 |ce a menu */...a| 00000e80 75 5f 62 75 69 6c 64 6d 65 6e 75 28 22 52 41 50 |u_buildmenu("RAP| 00000e90 53 22 2c 20 26 6d 65 6e 5f 64 61 74 61 5b 30 5d |S", &men_data[0]| 00000ea0 29 3b 0a 09 09 61 75 5f 61 64 64 74 6f 6d 65 6e |);...au_addtomen| 00000eb0 75 28 22 49 6e 66 6f 22 2c 20 30 2c 20 77 69 6e |u("Info", 0, win| 00000ec0 5f 64 61 74 61 5b 31 5d 2e 77 69 6e 5f 68 61 6e |_data[1].win_han| 00000ed0 64 6c 65 2c 20 30 2c 20 26 6d 65 6e 5f 64 61 74 |dle, 0, &men_dat| 00000ee0 61 5b 30 5d 29 3b 0a 09 09 61 75 5f 61 64 64 74 |a[0]);...au_addt| 00000ef0 6f 6d 65 6e 75 28 22 53 61 76 65 22 2c 20 30 2c |omenu("Save", 0,| 00000f00 20 77 69 6e 5f 64 61 74 61 5b 32 5d 2e 77 69 6e | win_data[2].win| 00000f10 5f 68 61 6e 64 6c 65 2c 20 30 2c 20 26 6d 65 6e |_handle, 0, &men| 00000f20 5f 64 61 74 61 5b 30 5d 29 3b 0a 09 09 61 75 5f |_data[0]);...au_| 00000f30 61 64 64 74 6f 6d 65 6e 75 28 22 51 75 69 74 22 |addtomenu("Quit"| 00000f40 2c 20 4d 45 4e 55 5f 4c 41 53 54 49 54 45 4d 2c |, MENU_LASTITEM,| 00000f50 20 2d 31 2c 20 30 2c 20 26 6d 65 6e 5f 64 61 74 | -1, 0, &men_dat| 00000f60 61 5b 30 5d 29 3b 0a 09 09 61 75 5f 63 72 65 61 |a[0]);...au_crea| 00000f70 74 65 6d 65 6e 75 28 26 6d 65 6e 5f 64 61 74 61 |temenu(&men_data| 00000f80 5b 30 5d 29 3b 0a 09 09 43 55 52 52 45 4e 54 5f |[0]);...CURRENT_| 00000f90 4d 45 4e 55 20 3d 20 31 3b 20 2f 2a 20 6b 65 65 |MENU = 1; /* kee| 00000fa0 70 20 74 72 61 63 6b 20 6f 66 20 74 68 65 20 6c |p track of the l| 00000fb0 61 73 74 20 6d 65 6e 75 20 77 65 20 6f 70 65 6e |ast menu we open| 00000fc0 65 64 20 2a 2f 0a 09 09 61 75 5f 6f 70 65 6e 6d |ed */...au_openm| 00000fd0 65 6e 75 28 26 6d 65 6e 5f 64 61 74 61 5b 30 5d |enu(&men_data[0]| 00000fe0 2c 20 28 69 6e 74 29 20 61 75 5f 62 79 74 65 74 |, (int) au_bytet| 00000ff0 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c 6f 63 6b |oword(poll_block| 00001000 2c 20 30 29 20 2d 20 36 34 2c 20 28 34 34 2a 32 |, 0) - 64, (44*2| 00001010 29 2b 39 36 29 3b 0a 09 09 72 65 74 75 72 6e 3b |)+96);...return;| 00001020 0a 09 7d 0a 0a 09 2f 2a 20 43 68 65 63 6b 20 74 |..}.../* Check t| 00001030 6f 20 73 65 65 20 69 66 20 69 74 20 77 61 73 20 |o see if it was | 00001040 69 6e 20 74 68 65 20 6d 61 69 6e 20 77 69 6e 64 |in the main wind| 00001050 6f 77 20 2a 2f 0a 09 69 66 28 28 61 75 5f 62 79 |ow */..if((au_by| 00001060 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c |tetoword(poll_bl| 00001070 6f 63 6b 2c 20 31 32 29 20 3d 3d 20 77 69 6e 5f |ock, 12) == win_| 00001080 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 |data[0].win_hand| 00001090 6c 65 29 20 26 26 20 28 63 6c 6b 20 3d 3d 20 34 |le) && (clk == 4| 000010a0 29 29 20 7b 0a 09 09 69 63 6f 6e 5f 6e 75 6d 20 |)) {...icon_num | 000010b0 3d 20 61 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 |= au_bytetoword(| 000010c0 70 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 36 29 3b |poll_block, 16);| 000010d0 0a 09 09 73 77 69 74 63 68 20 28 69 63 6f 6e 5f |...switch (icon_| 000010e0 6e 75 6d 29 20 7b 0a 09 09 09 63 61 73 65 20 50 |num) {....case P| 000010f0 52 45 56 5f 52 45 43 4f 52 44 5f 49 43 4f 4e 20 |REV_RECORD_ICON | 00001100 3a 20 70 72 65 76 5f 72 65 63 6f 72 64 28 29 3b |: prev_record();| 00001110 0a 09 09 09 09 62 72 65 61 6b 3b 0a 09 09 09 63 |.....break;....c| 00001120 61 73 65 20 4e 45 58 54 5f 52 45 43 4f 52 44 5f |ase NEXT_RECORD_| 00001130 49 43 4f 4e 20 3a 20 6e 65 78 74 5f 72 65 63 6f |ICON : next_reco| 00001140 72 64 28 29 3b 0a 09 09 09 09 62 72 65 61 6b 3b |rd();.....break;| 00001150 0a 09 09 09 63 61 73 65 20 55 50 44 41 54 45 5f |....case UPDATE_| 00001160 49 43 4f 4e 20 3a 20 75 70 64 61 74 65 5f 72 65 |ICON : update_re| 00001170 63 6f 72 64 28 29 3b 0a 09 09 09 09 62 72 65 61 |cord();.....brea| 00001180 6b 3b 0a 09 09 7d 0a 09 7d 0a 0a 09 2f 2a 20 43 |k;...}..}.../* C| 00001190 68 65 63 6b 20 74 6f 20 73 65 65 20 77 68 65 74 |heck to see whet| 000011a0 68 65 72 20 77 65 20 6e 65 65 64 20 74 6f 20 73 |her we need to s| 000011b0 74 61 72 74 20 61 20 64 72 61 67 20 6f 70 65 72 |tart a drag oper| 000011c0 61 74 69 6f 6e 20 2d 20 64 72 61 67 73 20 61 72 |ation - drags ar| 000011d0 65 20 70 61 73 73 65 64 20 61 73 0a 09 20 2a 20 |e passed as.. * | 000011e0 74 68 65 20 6d 6f 75 73 65 20 62 75 74 74 6f 6e |the mouse button| 000011f0 20 6e 75 6d 62 65 72 20 6d 75 6c 74 69 70 6c 69 | number multipli| 00001200 65 64 20 62 79 20 31 36 20 2a 2f 0a 0a 09 69 66 |ed by 16 */...if| 00001210 28 28 61 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 |((au_bytetoword(| 00001220 70 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 32 29 20 |poll_block, 12) | 00001230 3d 3d 20 77 69 6e 5f 64 61 74 61 5b 32 5d 2e 77 |== win_data[2].w| 00001240 69 6e 5f 68 61 6e 64 6c 65 29 20 26 26 20 28 63 |in_handle) && (c| 00001250 6c 6b 20 3d 3d 20 34 2a 31 36 29 29 20 7b 0a 09 |lk == 4*16)) {..| 00001260 09 2f 2a 20 53 74 61 72 74 20 74 68 65 20 64 72 |./* Start the dr| 00001270 61 67 20 6f 70 65 72 61 74 69 6f 6e 20 2a 2f 0a |ag operation */.| 00001280 09 09 69 63 6f 6e 5f 6e 75 6d 20 3d 20 61 75 5f |..icon_num = au_| 00001290 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c 5f |bytetoword(poll_| 000012a0 62 6c 6f 63 6b 2c 20 31 36 29 3b 0a 09 09 2f 2a |block, 16);.../*| 000012b0 20 41 72 65 20 77 65 20 6f 76 65 72 20 74 68 65 | Are we over the| 000012c0 20 61 63 74 75 61 6c 20 66 69 6c 65 20 69 63 6f | actual file ico| 000012d0 6e 20 69 6e 20 74 68 65 20 73 61 76 65 20 77 69 |n in the save wi| 000012e0 6e 64 6f 77 3f 20 2a 2f 0a 09 09 69 66 28 69 63 |ndow? */...if(ic| 000012f0 6f 6e 5f 6e 75 6d 20 3d 3d 20 53 41 56 45 5f 49 |on_num == SAVE_I| 00001300 43 4f 4e 29 20 7b 0a 09 09 09 61 75 5f 64 72 61 |CON) {....au_dra| 00001310 67 62 6f 78 28 61 75 5f 62 79 74 65 74 6f 77 6f |gbox(au_bytetowo| 00001320 72 64 28 70 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 |rd(poll_block, 1| 00001330 32 29 2c 20 69 63 6f 6e 5f 6e 75 6d 29 3b 0a 09 |2), icon_num);..| 00001340 09 09 2f 2a 20 54 68 69 73 20 69 73 20 6a 75 73 |../* This is jus| 00001350 74 20 73 6f 20 77 65 20 72 65 6d 65 6d 62 65 72 |t so we remember| 00001360 20 77 68 69 63 68 20 64 72 61 67 20 77 65 27 72 | which drag we'r| 00001370 65 20 64 6f 69 6e 67 20 2a 2f 0a 09 09 09 44 52 |e doing */....DR| 00001380 41 47 5f 46 4c 41 47 20 3d 20 53 41 56 45 5f 44 |AG_FLAG = SAVE_D| 00001390 52 41 47 3b 0a 09 09 7d 0a 09 7d 0a 0a 09 72 65 |RAG;...}..}...re| 000013a0 74 75 72 6e 3b 0a 7d 0a 0a 76 6f 69 64 20 64 72 |turn;.}..void dr| 000013b0 61 67 5f 72 65 74 75 72 6e 28 75 6e 73 69 67 6e |ag_return(unsign| 000013c0 65 64 20 63 68 61 72 20 70 6f 6c 6c 5f 62 6c 6f |ed char poll_blo| 000013d0 63 6b 5b 5d 29 0a 7b 0a 09 63 68 61 72 09 74 65 |ck[]).{..char.te| 000013e0 6d 70 5f 6e 61 6d 65 5b 32 35 36 5d 3b 0a 09 2f |mp_name[256];../| 000013f0 2a 20 43 61 6c 6c 20 47 65 74 50 6f 69 6e 74 65 |* Call GetPointe| 00001400 72 49 6e 66 6f 20 74 6f 20 66 69 6e 64 20 6f 75 |rInfo to find ou| 00001410 74 20 77 68 65 72 65 20 70 6f 69 6e 74 65 72 20 |t where pointer | 00001420 69 73 20 2a 2f 0a 09 70 6f 69 6e 74 65 72 5f 64 |is */..pointer_d| 00001430 61 74 61 09 70 6f 69 6e 74 65 72 5f 69 6e 66 6f |ata.pointer_info| 00001440 3b 0a 09 61 75 5f 67 65 74 70 6f 69 6e 74 65 72 |;..au_getpointer| 00001450 69 6e 66 6f 28 26 70 6f 69 6e 74 65 72 5f 69 6e |info(&pointer_in| 00001460 66 6f 29 3b 0a 09 2f 2a 20 4e 6f 77 20 77 65 20 |fo);../* Now we | 00001470 63 68 65 63 6b 20 74 6f 20 73 65 65 20 77 68 65 |check to see whe| 00001480 74 68 65 72 20 77 65 27 72 65 20 69 6e 20 74 68 |ther we're in th| 00001490 65 20 6d 69 64 64 6c 65 20 6f 66 20 61 20 64 72 |e middle of a dr| 000014a0 61 67 a0 2a 2f 0a 09 69 66 20 28 44 52 41 47 5f |ag.*/..if (DRAG_| 000014b0 46 4c 41 47 20 3d 3d 20 53 41 56 45 5f 44 52 41 |FLAG == SAVE_DRA| 000014c0 47 29 20 7b 0a 09 09 2f 2a 20 47 72 61 62 20 6c |G) {.../* Grab l| 000014d0 65 61 66 6e 61 6d 65 20 66 72 6f 6d 20 73 61 76 |eafname from sav| 000014e0 65 20 69 63 6f 6e 20 2a 2f 0a 09 09 61 75 5f 69 |e icon */...au_i| 000014f0 63 6f 6e 5f 67 65 74 5f 74 65 78 74 28 74 65 6d |con_get_text(tem| 00001500 70 5f 6e 61 6d 65 2c 20 77 69 6e 5f 64 61 74 61 |p_name, win_data| 00001510 5b 32 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 |[2].win_handle, | 00001520 53 41 56 45 5f 46 49 4c 45 4e 41 4d 45 5f 49 43 |SAVE_FILENAME_IC| 00001530 4f 4e 29 3b 0a 09 09 2f 2a 20 4e 6f 77 20 77 65 |ON);.../* Now we| 00001540 20 63 61 6e 20 73 65 6e 64 20 61 20 44 61 74 61 | can send a Data| 00001550 53 61 76 65 20 6d 65 73 73 61 67 65 20 2a 2f 0a |Save message */.| 00001560 09 09 61 75 5f 64 61 74 61 73 61 76 65 28 70 6f |..au_datasave(po| 00001570 69 6e 74 65 72 5f 69 6e 66 6f 2c 20 31 30 32 34 |inter_info, 1024| 00001580 2c 20 30 78 66 66 66 2c 20 74 65 6d 70 5f 6e 61 |, 0xfff, temp_na| 00001590 6d 65 29 3b 0a 09 09 44 52 41 47 5f 46 4c 41 47 |me);...DRAG_FLAG| 000015a0 20 3d 20 30 3b 0a 09 7d 0a 7d 0a 0a 76 6f 69 64 | = 0;..}.}..void| 000015b0 20 6d 65 6e 75 5f 73 65 6c 65 63 74 69 6f 6e 28 | menu_selection(| 000015c0 75 6e 73 69 67 6e 65 64 20 63 68 61 72 20 70 6f |unsigned char po| 000015d0 6c 6c 5f 62 6c 6f 63 6b 5b 5d 29 0a 7b 0a 09 6c |ll_block[]).{..l| 000015e0 6f 6e 67 20 69 6e 74 09 66 69 72 73 74 5f 68 69 |ong int.first_hi| 000015f0 74 3b 0a 09 2f 2a 20 57 68 69 63 68 20 6d 65 6e |t;../* Which men| 00001600 75 20 77 61 73 20 68 69 74 3f 20 2a 2f 0a 09 69 |u was hit? */..i| 00001610 66 20 28 43 55 52 52 45 4e 54 5f 4d 45 4e 55 20 |f (CURRENT_MENU | 00001620 3d 3d 20 31 29 20 7b 0a 09 09 2f 2a 20 54 68 65 |== 1) {.../* The| 00001630 20 69 63 6f 6e 20 62 61 72 20 6d 65 6e 75 20 67 | icon bar menu g| 00001640 6f 74 20 69 74 20 2d 20 64 65 63 69 70 68 65 72 |ot it - decipher| 00001650 20 66 69 72 73 74 20 6d 65 6e 75 20 73 75 62 73 | first menu subs| 00001660 65 6c 65 63 74 69 6f 6e 20 2a 2f 0a 09 09 66 69 |election */...fi| 00001670 72 73 74 5f 68 69 74 20 3d 20 61 75 5f 62 79 74 |rst_hit = au_byt| 00001680 65 74 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c 6f |etoword(poll_blo| 00001690 63 6b 2c 20 30 29 3b 0a 09 09 69 66 20 28 66 69 |ck, 0);...if (fi| 000016a0 72 73 74 5f 68 69 74 20 3d 3d 20 51 55 49 54 5f |rst_hit == QUIT_| 000016b0 4f 50 54 49 4f 4e 29 20 7b 0a 09 09 09 51 55 49 |OPTION) {....QUI| 000016c0 54 5f 46 4c 41 47 20 3d 20 31 3b 0a 09 09 7d 0a |T_FLAG = 1;...}.| 000016d0 09 7d 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a 76 |.}..return;.}..v| 000016e0 6f 69 64 20 70 72 65 76 5f 72 65 63 6f 72 64 28 |oid prev_record(| 000016f0 76 6f 69 64 29 0a 7b 0a 09 69 66 20 28 43 55 52 |void).{..if (CUR| 00001700 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e |RENT_RECORD_POIN| 00001710 54 45 52 2d 3e 70 72 65 76 5f 72 65 63 6f 72 64 |TER->prev_record| 00001720 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 09 09 2f 2a | != NULL) {.../*| 00001730 20 53 61 76 65 20 77 69 6e 64 6f 77 20 69 6e 66 | Save window inf| 00001740 6f 72 6d 61 74 69 6f 6e 3f 20 2a 2f 0a 09 09 43 |ormation? */...C| 00001750 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 00001760 49 4e 54 45 52 20 3d 20 43 55 52 52 45 4e 54 5f |INTER = CURRENT_| 00001770 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001780 70 72 65 76 5f 72 65 63 6f 72 64 3b 0a 09 09 43 |prev_record;...C| 00001790 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 4e 55 |URRENT_RECORD_NU| 000017a0 4d 42 45 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 |MBER = CURRENT_R| 000017b0 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6a |ECORD_POINTER->j| 000017c0 75 6d 70 5f 6e 6f 3b 0a 09 09 2f 2a 20 77 6f 75 |ump_no;.../* wou| 000017d0 6c 64 20 75 70 64 61 74 65 20 77 69 6e 64 6f 77 |ld update window| 000017e0 20 69 6e 66 6f 20 68 65 72 65 20 2a 2f 0a 09 09 | info here */...| 000017f0 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 6e |update_window_in| 00001800 66 6f 28 29 3b 0a 09 7d 0a 7d 0a 0a 76 6f 69 64 |fo();..}.}..void| 00001810 20 6e 65 78 74 5f 72 65 63 6f 72 64 28 76 6f 69 | next_record(voi| 00001820 64 29 0a 7b 0a 09 69 66 20 28 43 55 52 52 45 4e |d).{..if (CURREN| 00001830 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 |T_RECORD_POINTER| 00001840 2d 3e 6e 65 78 74 5f 72 65 63 6f 72 64 20 21 3d |->next_record !=| 00001850 20 4e 55 4c 4c 29 20 7b 0a 09 09 43 55 52 52 45 | NULL) {...CURRE| 00001860 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 |NT_RECORD_POINTE| 00001870 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 4f |R = CURRENT_RECO| 00001880 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6e 65 78 74 |RD_POINTER->next| 00001890 5f 72 65 63 6f 72 64 3b 0a 09 09 43 55 52 52 45 |_record;...CURRE| 000018a0 4e 54 5f 52 45 43 4f 52 44 5f 4e 55 4d 42 45 52 |NT_RECORD_NUMBER| 000018b0 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 | = CURRENT_RECOR| 000018c0 44 5f 50 4f 49 4e 54 45 52 2d 3e 6a 75 6d 70 5f |D_POINTER->jump_| 000018d0 6e 6f 3b 0a 09 09 2f 2a 20 77 6f 75 6c 64 20 75 |no;.../* would u| 000018e0 70 64 61 74 65 20 77 69 6e 64 6f 77 20 69 6e 66 |pdate window inf| 000018f0 6f 20 68 65 72 65 20 2a 2f 0a 09 09 75 70 64 61 |o here */...upda| 00001900 74 65 5f 77 69 6e 64 6f 77 5f 69 6e 66 6f 28 29 |te_window_info()| 00001910 3b 0a 09 7d 0a 7d 0a 0a 76 6f 69 64 20 75 70 64 |;..}.}..void upd| 00001920 61 74 65 5f 72 65 63 6f 72 64 28 76 6f 69 64 29 |ate_record(void)| 00001930 0a 7b 0a 09 2f 2a 20 57 65 20 6e 65 65 64 20 61 |.{../* We need a| 00001940 20 74 65 6d 70 6f 72 61 72 79 20 73 74 72 69 6e | temporary strin| 00001950 67 20 62 75 66 66 65 72 20 2a 2f 0a 09 63 68 61 |g buffer */..cha| 00001960 72 20 74 65 6d 70 5f 62 75 66 5b 32 35 35 5d 3b |r temp_buf[255];| 00001970 0a 0a 09 2f 2a 20 53 61 76 65 20 77 69 6e 64 6f |.../* Save windo| 00001980 77 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 2a 2f |w information */| 00001990 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 |..au_icon_get_te| 000019a0 78 74 28 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 |xt(CURRENT_RECOR| 000019b0 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 61 74 65 2c |D_POINTER->date,| 000019c0 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e | win_data[0].win| 000019d0 5f 68 61 6e 64 6c 65 2c 20 44 41 54 45 5f 49 43 |_handle, DATE_IC| 000019e0 4f 4e 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 |ON);..au_icon_ge| 000019f0 74 5f 74 65 78 74 28 43 55 52 52 45 4e 54 5f 52 |t_text(CURRENT_R| 00001a00 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 61 |ECORD_POINTER->a| 00001a10 69 72 63 72 61 66 74 2c 20 77 69 6e 5f 64 61 74 |ircraft, win_dat| 00001a20 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c |a[0].win_handle,| 00001a30 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e 29 3b | AIRCRAFT_ICON);| 00001a40 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 |..au_icon_get_te| 00001a50 78 74 28 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 |xt(CURRENT_RECOR| 00001a60 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 72 6f 70 7a |D_POINTER->dropz| 00001a70 6f 6e 65 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d |one, win_data[0]| 00001a80 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 44 52 4f |.win_handle, DRO| 00001a90 50 5a 4f 4e 45 5f 49 43 4f 4e 29 3b 0a 09 61 75 |PZONE_ICON);..au| 00001aa0 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 78 74 28 43 |_icon_get_text(C| 00001ab0 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 00001ac0 49 4e 54 45 52 2d 3e 61 69 72 77 6f 72 6b 2c 20 |INTER->airwork, | 00001ad0 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f |win_data[0].win_| 00001ae0 68 61 6e 64 6c 65 2c 20 41 49 52 57 4f 52 4b 5f |handle, AIRWORK_| 00001af0 49 43 4f 4e 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f |ICON);..au_icon_| 00001b00 67 65 74 5f 74 65 78 74 28 43 55 52 52 45 4e 54 |get_text(CURRENT| 00001b10 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 00001b20 3e 72 65 6d 61 72 6b 73 31 2c 20 77 69 6e 5f 64 |>remarks1, win_d| 00001b30 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c |ata[0].win_handl| 00001b40 65 2c 20 52 45 4d 41 52 4b 53 31 5f 49 43 4f 4e |e, REMARKS1_ICON| 00001b50 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 5f |);..au_icon_get_| 00001b60 74 65 78 74 28 43 55 52 52 45 4e 54 5f 52 45 43 |text(CURRENT_REC| 00001b70 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 6d |ORD_POINTER->rem| 00001b80 61 72 6b 73 32 2c 20 77 69 6e 5f 64 61 74 61 5b |arks2, win_data[| 00001b90 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 52 |0].win_handle, R| 00001ba0 45 4d 41 52 4b 53 32 5f 49 43 4f 4e 29 3b 0a 09 |EMARKS2_ICON);..| 00001bb0 2f 2a 20 57 65 20 6e 65 65 64 20 74 6f 20 63 6f |/* We need to co| 00001bc0 6e 76 65 72 74 20 74 65 78 74 20 74 6f 20 69 6e |nvert text to in| 00001bd0 74 65 67 65 72 20 68 65 72 65 20 2a 2f 0a 09 61 |teger here */..a| 00001be0 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 78 74 28 |u_icon_get_text(| 00001bf0 74 65 6d 70 5f 62 75 66 2c 20 77 69 6e 5f 64 61 |temp_buf, win_da| 00001c00 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 |ta[0].win_handle| 00001c10 2c 20 41 4c 54 49 54 55 44 45 5f 49 43 4f 4e 29 |, ALTITUDE_ICON)| 00001c20 3b 0a 09 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 |;..CURRENT_RECOR| 00001c30 44 5f 50 4f 49 4e 54 45 52 2d 3e 61 6c 74 69 74 |D_POINTER->altit| 00001c40 75 64 65 20 3d 20 61 74 6f 69 28 74 65 6d 70 5f |ude = atoi(temp_| 00001c50 62 75 66 29 3b 0a 0a 09 2f 2a 20 41 6e 64 20 68 |buf);.../* And h| 00001c60 65 72 65 20 2a 2f 0a 09 61 75 5f 69 63 6f 6e 5f |ere */..au_icon_| 00001c70 67 65 74 5f 74 65 78 74 28 74 65 6d 70 5f 62 75 |get_text(temp_bu| 00001c80 66 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 |f, win_data[0].w| 00001c90 69 6e 5f 68 61 6e 64 6c 65 2c 20 44 45 4c 41 59 |in_handle, DELAY| 00001ca0 5f 49 43 4f 4e 29 3b 0a 09 43 55 52 52 45 4e 54 |_ICON);..CURRENT| 00001cb0 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 00001cc0 3e 64 65 6c 61 79 20 3d 20 61 74 6f 69 28 74 65 |>delay = atoi(te| 00001cd0 6d 70 5f 62 75 66 29 3b 0a 09 2f 2a 20 52 65 63 |mp_buf);../* Rec| 00001ce0 6f 72 64 20 69 73 20 6e 6f 77 20 73 61 76 65 64 |ord is now saved| 00001cf0 20 69 6e 20 6d 65 6d 6f 72 79 20 2a 2f 0a 0a 09 | in memory */...| 00001d00 2f 2a 20 41 72 65 20 77 65 20 6f 6e 20 74 68 65 |/* Are we on the| 00001d10 20 6c 61 73 74 20 72 65 63 6f 72 64 3f 20 49 66 | last record? If| 00001d20 20 73 6f 2c 20 77 65 20 61 64 64 20 61 20 6e 65 | so, we add a ne| 00001d30 77 20 6f 6e 65 20 2a 2f 0a 09 69 66 20 28 43 55 |w one */..if (CU| 00001d40 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 |RRENT_RECORD_POI| 00001d50 4e 54 45 52 2d 3e 6e 65 78 74 5f 72 65 63 6f 72 |NTER->next_recor| 00001d60 64 20 3d 3d 20 4e 55 4c 4c 29 20 7b 0a 09 09 61 |d == NULL) {...a| 00001d70 64 64 5f 72 65 63 6f 72 64 28 29 3b 0a 09 7d 0a |dd_record();..}.| 00001d80 7d 0a 0a 76 6f 69 64 20 61 64 64 5f 72 65 63 6f |}..void add_reco| 00001d90 72 64 28 76 6f 69 64 29 0a 7b 0a 09 6a 75 6d 70 |rd(void).{..jump| 00001da0 5f 64 61 74 61 09 2a 6e 65 77 5f 72 65 63 6f 72 |_data.*new_recor| 00001db0 64 3b 0a 0a 09 2f 2a 49 6e 66 6f 72 6d 61 74 69 |d;.../*Informati| 00001dc0 6f 6e 20 66 72 6f 6d 20 77 69 6e 64 6f 77 20 61 |on from window a| 00001dd0 6c 72 65 61 64 79 20 73 61 76 65 64 20 2a 2f 0a |lready saved */.| 00001de0 0a 09 6e 65 77 5f 72 65 63 6f 72 64 20 3d 20 63 |..new_record = c| 00001df0 61 6c 6c 6f 63 28 31 2c 20 73 69 7a 65 6f 66 28 |alloc(1, sizeof(| 00001e00 6a 75 6d 70 5f 64 61 74 61 29 29 3b 0a 09 2f 2a |jump_data));../*| 00001e10 20 49 6e 69 74 69 61 6c 69 73 65 20 70 6f 69 6e | Initialise poin| 00001e20 74 65 72 73 20 2a 2f 0a 09 6e 65 77 5f 72 65 63 |ters */..new_rec| 00001e30 6f 72 64 2d 3e 70 72 65 76 5f 72 65 63 6f 72 64 |ord->prev_record| 00001e40 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 | = CURRENT_RECOR| 00001e50 44 5f 50 4f 49 4e 54 45 52 3b 0a 09 6e 65 77 5f |D_POINTER;..new_| 00001e60 72 65 63 6f 72 64 2d 3e 6e 65 78 74 5f 72 65 63 |record->next_rec| 00001e70 6f 72 64 20 3d 20 4e 55 4c 4c 3b 0a 09 4c 41 53 |ord = NULL;..LAS| 00001e80 54 5f 52 45 43 4f 52 44 5f 4e 55 4d 42 45 52 20 |T_RECORD_NUMBER | 00001e90 3d 20 6e 65 77 5f 72 65 63 6f 72 64 2d 3e 6a 75 |= new_record->ju| 00001ea0 6d 70 5f 6e 6f 20 3d 20 43 55 52 52 45 4e 54 5f |mp_no = CURRENT_| 00001eb0 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001ec0 6a 75 6d 70 5f 6e 6f 20 2b 20 31 3b 0a 09 43 55 |jump_no + 1;..CU| 00001ed0 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 |RRENT_RECORD_POI| 00001ee0 4e 54 45 52 2d 3e 6e 65 78 74 5f 72 65 63 6f 72 |NTER->next_recor| 00001ef0 64 20 3d 20 6e 65 77 5f 72 65 63 6f 72 64 3b 0a |d = new_record;.| 00001f00 0a 09 2f 2a 20 53 77 69 74 63 68 20 76 69 65 77 |../* Switch view| 00001f10 20 74 6f 20 74 68 65 20 6e 65 77 20 72 65 63 6f | to the new reco| 00001f20 72 64 20 2a 2f 0a 09 43 55 52 52 45 4e 54 5f 52 |rd */..CURRENT_R| 00001f30 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 20 3d 20 |ECORD_POINTER = | 00001f40 6e 65 77 5f 72 65 63 6f 72 64 3b 0a 09 43 55 52 |new_record;..CUR| 00001f50 52 45 4e 54 5f 52 45 43 4f 52 44 5f 4e 55 4d 42 |RENT_RECORD_NUMB| 00001f60 45 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 |ER = CURRENT_REC| 00001f70 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6a 75 6d |ORD_POINTER->jum| 00001f80 70 5f 6e 6f 3b 0a 0a 09 2f 2a 20 55 70 64 61 74 |p_no;.../* Updat| 00001f90 65 20 74 68 65 20 77 69 6e 64 6f 77 20 74 6f 20 |e the window to | 00001fa0 64 69 73 70 6c 61 79 20 74 68 65 20 6e 65 77 20 |display the new | 00001fb0 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 2a 2f 0a 09 |information */..| 00001fc0 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 6e |update_window_in| 00001fd0 66 6f 28 29 3b 0a 7d 0a 0a 76 6f 69 64 20 75 70 |fo();.}..void up| 00001fe0 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 6e 66 6f |date_window_info| 00001ff0 28 76 6f 69 64 29 0a 7b 0a 09 63 68 61 72 09 74 |(void).{..char.t| 00002000 65 6d 70 5f 73 74 72 69 6e 67 5b 32 35 35 5d 3b |emp_string[255];| 00002010 0a 0a 09 61 75 5f 6c 6f 73 65 63 61 72 65 74 28 |...au_losecaret(| 00002020 29 3b 0a 09 69 66 20 28 43 55 52 52 45 4e 54 5f |);..if (CURRENT_| 00002030 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00002040 6e 65 78 74 5f 72 65 63 6f 72 64 20 3d 3d 20 4e |next_record == N| 00002050 55 4c 4c 29 20 7b 0a 09 09 61 75 5f 69 63 6f 6e |ULL) {...au_icon| 00002060 5f 74 65 78 74 5f 63 68 61 6e 67 65 28 22 41 64 |_text_change("Ad| 00002070 64 22 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e |d", win_data[0].| 00002080 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 55 50 44 41 |win_handle, UPDA| 00002090 54 45 5f 49 43 4f 4e 29 3b 0a 09 7d 20 65 6c 73 |TE_ICON);..} els| 000020a0 65 20 7b 0a 09 09 61 75 5f 69 63 6f 6e 5f 74 65 |e {...au_icon_te| 000020b0 78 74 5f 63 68 61 6e 67 65 28 22 55 70 64 61 74 |xt_change("Updat| 000020c0 65 22 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e |e", win_data[0].| 000020d0 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 55 50 44 41 |win_handle, UPDA| 000020e0 54 45 5f 49 43 4f 4e 29 3b 0a 09 7d 0a 09 73 70 |TE_ICON);..}..sp| 000020f0 72 69 6e 74 66 28 74 65 6d 70 5f 73 74 72 69 6e |rintf(temp_strin| 00002100 67 2c 20 22 25 64 22 2c 20 43 55 52 52 45 4e 54 |g, "%d", CURRENT| 00002110 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 00002120 3e 6a 75 6d 70 5f 6e 6f 29 3b 0a 09 61 75 5f 69 |>jump_no);..au_i| 00002130 63 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 28 |con_text_change(| 00002140 74 65 6d 70 5f 73 74 72 69 6e 67 2c 20 77 69 6e |temp_string, win| 00002150 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e |_data[0].win_han| 00002160 64 6c 65 2c 20 43 55 52 52 45 4e 54 5f 52 45 43 |dle, CURRENT_REC| 00002170 4f 52 44 5f 49 43 4f 4e 29 3b 0a 09 73 70 72 69 |ORD_ICON);..spri| 00002180 6e 74 66 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c |ntf(temp_string,| 00002190 20 22 25 64 22 2c 20 4c 41 53 54 5f 52 45 43 4f | "%d", LAST_RECO| 000021a0 52 44 5f 4e 55 4d 42 45 52 29 3b 0a 09 61 75 5f |RD_NUMBER);..au_| 000021b0 69 63 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 |icon_text_change| 000021c0 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c 20 77 69 |(temp_string, wi| 000021d0 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 |n_data[0].win_ha| 000021e0 6e 64 6c 65 2c 20 4c 41 53 54 5f 52 45 43 4f 52 |ndle, LAST_RECOR| 000021f0 44 5f 49 43 4f 4e 29 3b 0a 0a 09 61 75 5f 69 63 |D_ICON);...au_ic| 00002200 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 28 43 |on_text_change(C| 00002210 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 00002220 49 4e 54 45 52 2d 3e 64 61 74 65 20 2c 20 77 69 |INTER->date , wi| 00002230 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 |n_data[0].win_ha| 00002240 6e 64 6c 65 2c 20 44 41 54 45 5f 49 43 4f 4e 29 |ndle, DATE_ICON)| 00002250 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f |;..au_icon_text_| 00002260 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 |change(CURRENT_R| 00002270 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 61 |ECORD_POINTER->a| 00002280 69 72 63 72 61 66 74 20 2c 20 77 69 6e 5f 64 61 |ircraft , win_da| 00002290 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 |ta[0].win_handle| 000022a0 2c 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e 29 |, AIRCRAFT_ICON)| 000022b0 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f |;..au_icon_text_| 000022c0 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 |change(CURRENT_R| 000022d0 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 |ECORD_POINTER->d| 000022e0 72 6f 70 7a 6f 6e 65 20 2c 20 77 69 6e 5f 64 61 |ropzone , win_da| 000022f0 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 |ta[0].win_handle| 00002300 2c 20 44 52 4f 50 5a 4f 4e 45 5f 49 43 4f 4e 29 |, DROPZONE_ICON)| 00002310 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f |;..au_icon_text_| 00002320 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 |change(CURRENT_R| 00002330 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 61 |ECORD_POINTER->a| 00002340 69 72 77 6f 72 6b 20 2c 20 77 69 6e 5f 64 61 74 |irwork , win_dat| 00002350 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c |a[0].win_handle,| 00002360 20 41 49 52 57 4f 52 4b 5f 49 43 4f 4e 29 3b 0a | AIRWORK_ICON);.| 00002370 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 68 |.au_icon_text_ch| 00002380 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 45 43 |ange(CURRENT_REC| 00002390 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 6d |ORD_POINTER->rem| 000023a0 61 72 6b 73 31 20 2c 20 77 69 6e 5f 64 61 74 61 |arks1 , win_data| 000023b0 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 |[0].win_handle, | 000023c0 52 45 4d 41 52 4b 53 31 5f 49 43 4f 4e 29 3b 0a |REMARKS1_ICON);.| 000023d0 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 68 |.au_icon_text_ch| 000023e0 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 45 43 |ange(CURRENT_REC| 000023f0 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 6d |ORD_POINTER->rem| 00002400 61 72 6b 73 32 20 2c 20 77 69 6e 5f 64 61 74 61 |arks2 , win_data| 00002410 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 |[0].win_handle, | 00002420 52 45 4d 41 52 4b 53 32 5f 49 43 4f 4e 29 3b 0a |REMARKS2_ICON);.| 00002430 0a 09 73 70 72 69 6e 74 66 28 74 65 6d 70 5f 73 |..sprintf(temp_s| 00002440 74 72 69 6e 67 2c 20 22 25 64 22 2c 20 43 55 52 |tring, "%d", CUR| 00002450 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e |RENT_RECORD_POIN| 00002460 54 45 52 2d 3e 61 6c 74 69 74 75 64 65 29 3b 0a |TER->altitude);.| 00002470 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 68 |.au_icon_text_ch| 00002480 61 6e 67 65 28 74 65 6d 70 5f 73 74 72 69 6e 67 |ange(temp_string| 00002490 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 |, win_data[0].wi| 000024a0 6e 5f 68 61 6e 64 6c 65 2c 20 41 4c 54 49 54 55 |n_handle, ALTITU| 000024b0 44 45 5f 49 43 4f 4e 29 3b 0a 09 73 70 72 69 6e |DE_ICON);..sprin| 000024c0 74 66 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c 20 |tf(temp_string, | 000024d0 22 25 64 22 2c 20 43 55 52 52 45 4e 54 5f 52 45 |"%d", CURRENT_RE| 000024e0 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 65 |CORD_POINTER->de| 000024f0 6c 61 79 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 |lay);..au_icon_t| 00002500 65 78 74 5f 63 68 61 6e 67 65 28 74 65 6d 70 5f |ext_change(temp_| 00002510 73 74 72 69 6e 67 2c 20 77 69 6e 5f 64 61 74 61 |string, win_data| 00002520 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 |[0].win_handle, | 00002530 44 45 4c 41 59 5f 49 43 4f 4e 29 3b 0a 09 72 65 |DELAY_ICON);..re| 00002540 74 75 72 6e 3b 0a 7d 0a 0a 76 6f 69 64 20 6f 70 |turn;.}..void op| 00002550 65 6e 5f 6d 61 69 6e 5f 77 69 6e 64 6f 77 28 76 |en_main_window(v| 00002560 6f 69 64 29 0a 7b 0a 09 5f 6b 65 72 6e 65 6c 5f |oid).{.._kernel_| 00002570 73 77 69 5f 72 65 67 73 09 69 6e 2c 20 6f 75 74 |swi_regs.in, out| 00002580 3b 0a 09 75 6e 73 69 67 6e 65 64 20 63 68 61 72 |;..unsigned char| 00002590 09 74 65 6d 70 5f 62 75 66 66 65 72 5b 31 30 32 |.temp_buffer[102| 000025a0 34 5d 3b 0a 0a 2f 2a 20 57 65 20 6e 65 65 64 20 |4];../* We need | 000025b0 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 63 75 |to update the cu| 000025c0 72 72 65 6e 74 20 61 6e 64 20 6c 61 73 74 20 72 |rrent and last r| 000025d0 65 63 6f 72 64 20 6e 75 6d 62 65 72 73 20 69 6e |ecord numbers in| 000025e0 20 74 68 65 20 77 69 6e 64 6f 77 0a 20 2a 20 62 | the window. * b| 000025f0 65 66 6f 72 65 20 6f 70 65 6e 69 6e 67 20 2a 2f |efore opening */| 00002600 0a 0a 09 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 |...update_window| 00002610 5f 69 6e 66 6f 28 29 3b 0a 0a 2f 2a 20 4e 6f 77 |_info();../* Now| 00002620 20 6f 70 65 6e 20 74 68 65 20 77 69 6e 64 6f 77 | open the window| 00002630 20 2a 2f 0a 0a 09 61 75 5f 77 6f 72 64 74 6f 62 | */...au_wordtob| 00002640 79 74 65 28 77 69 6e 5f 64 61 74 61 5b 30 5d 2e |yte(win_data[0].| 00002650 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 74 65 6d 70 |win_handle, temp| 00002660 5f 62 75 66 66 65 72 2c 20 30 29 3b 0a 09 69 6e |_buffer, 0);..in| 00002670 2e 72 5b 31 5d 20 3d 20 28 69 6e 74 29 20 74 65 |.r[1] = (int) te| 00002680 6d 70 5f 62 75 66 66 65 72 3b 0a 09 5f 6b 65 72 |mp_buffer;.._ker| 00002690 6e 65 6c 5f 73 77 69 28 57 69 6d 70 5f 47 65 74 |nel_swi(Wimp_Get| 000026a0 57 69 6e 64 6f 77 49 6e 66 6f 2c 20 26 69 6e 2c |WindowInfo, &in,| 000026b0 20 26 6f 75 74 29 3b 0a 09 5f 6b 65 72 6e 65 6c | &out);.._kernel| 000026c0 5f 73 77 69 28 57 69 6d 70 5f 4f 70 65 6e 57 69 |_swi(Wimp_OpenWi| 000026d0 6e 64 6f 77 2c 20 26 69 6e 2c 20 26 6f 75 74 29 |ndow, &in, &out)| 000026e0 3b 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a 76 6f |;..return;.}..vo| 000026f0 69 64 20 77 69 6d 70 5f 6d 73 67 28 69 6e 74 20 |id wimp_msg(int | 00002700 72 65 73 75 6c 74 2c 20 75 6e 73 69 67 6e 65 64 |result, unsigned| 00002710 20 63 68 61 72 20 70 6f 6c 6c 62 6c 6f 63 6b 5b | char pollblock[| 00002720 5d 29 0a 7b 0a 09 75 6e 73 69 67 6e 65 64 20 6c |]).{..unsigned l| 00002730 6f 6e 67 20 69 6e 74 20 20 20 6d 65 73 73 61 67 |ong int messag| 00002740 65 5f 61 63 74 69 6f 6e 3b 0a 09 0a 09 2f 2a 20 |e_action;..../* | 00002750 54 68 65 20 6e 65 78 74 20 6c 69 6e 65 20 74 61 |The next line ta| 00002760 6b 65 73 20 62 79 74 65 73 20 31 36 20 74 6f 20 |kes bytes 16 to | 00002770 31 39 20 6f 66 20 74 68 65 20 70 6f 6c 6c 69 6e |19 of the pollin| 00002780 67 20 62 6c 6f 63 6b 20 61 6e 64 20 66 6f 72 6d |g block and form| 00002790 73 20 74 68 65 6d 0a 09 20 20 20 69 6e 74 6f 20 |s them.. into | 000027a0 61 20 77 6f 72 64 20 68 6f 6c 64 69 6e 67 20 74 |a word holding t| 000027b0 68 65 20 6d 65 73 73 61 67 65 20 61 63 74 69 6f |he message actio| 000027c0 6e 20 6e 75 6d 62 65 72 20 2a 2f 0a 09 6d 65 73 |n number */..mes| 000027d0 73 61 67 65 5f 61 63 74 69 6f 6e 20 3d 20 61 75 |sage_action = au| 000027e0 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c |_bytetoword(poll| 000027f0 62 6c 6f 63 6b 2c 20 31 36 29 3b 0a 0a 09 73 77 |block, 16);...sw| 00002800 69 74 63 68 20 28 6d 65 73 73 61 67 65 5f 61 63 |itch (message_ac| 00002810 74 69 6f 6e 29 20 7b 0a 09 09 63 61 73 65 20 4d |tion) {...case M| 00002820 45 53 53 41 47 45 5f 51 55 49 54 20 3a 20 51 55 |ESSAGE_QUIT : QU| 00002830 49 54 5f 46 4c 41 47 20 3d 20 31 3b 20 2f 2a 20 |IT_FLAG = 1; /* | 00002840 4d 65 73 73 61 67 65 5f 51 75 69 74 20 2d 20 74 |Message_Quit - t| 00002850 69 6d 65 20 74 6f 20 67 6f 20 2a 2f 0a 09 09 09 |ime to go */....| 00002860 09 62 72 65 61 6b 3b 0a 09 09 63 61 73 65 20 4d |.break;...case M| 00002870 45 53 53 41 47 45 5f 44 41 54 41 53 41 56 45 41 |ESSAGE_DATASAVEA| 00002880 43 4b 20 3a 20 64 61 74 61 5f 73 61 76 65 28 70 |CK : data_save(p| 00002890 6f 6c 6c 62 6c 6f 63 6b 29 3b 0a 09 09 09 09 62 |ollblock);.....b| 000028a0 72 65 61 6b 3b 0a 09 7d 0a 09 72 65 74 75 72 6e |reak;..}..return| 000028b0 3b 0a 7d 0a 0a 76 6f 69 64 20 64 61 74 61 5f 73 |;.}..void data_s| 000028c0 61 76 65 28 75 6e 73 69 67 6e 65 64 20 63 68 61 |ave(unsigned cha| 000028d0 72 20 70 6f 6c 6c 62 6c 6f 63 6b 5b 5d 29 0a 7b |r pollblock[]).{| 000028e0 0a 09 63 68 61 72 09 2a 66 69 6c 65 6e 61 6d 65 |..char.*filename| 000028f0 3b 0a 09 69 6e 74 09 6e 61 6d 65 5f 6c 65 6e 67 |;..int.name_leng| 00002900 74 68 3b 0a 09 2f 2a 20 52 65 61 64 20 74 68 65 |th;../* Read the| 00002910 20 66 69 6c 65 6e 61 6d 65 20 66 72 6f 6d 20 74 | filename from t| 00002920 68 65 20 70 6f 6c 6c 62 6c 6f 63 6b 20 2a 2f 0a |he pollblock */.| 00002930 09 6e 61 6d 65 5f 6c 65 6e 67 74 68 20 3d 20 73 |.name_length = s| 00002940 74 72 6c 65 6e 28 28 63 68 61 72 20 2a 29 20 26 |trlen((char *) &| 00002950 70 6f 6c 6c 62 6c 6f 63 6b 5b 34 34 5d 29 3b 0a |pollblock[44]);.| 00002960 09 66 69 6c 65 6e 61 6d 65 20 3d 20 63 61 6c 6c |.filename = call| 00002970 6f 63 28 6e 61 6d 65 5f 6c 65 6e 67 74 68 2c 20 |oc(name_length, | 00002980 73 69 7a 65 6f 66 28 63 68 61 72 29 29 3b 0a 09 |sizeof(char));..| 00002990 73 74 72 63 70 79 28 66 69 6c 65 6e 61 6d 65 2c |strcpy(filename,| 000029a0 20 28 63 68 61 72 20 2a 29 20 26 70 6f 6c 6c 62 | (char *) &pollb| 000029b0 6c 6f 63 6b 5b 34 34 5d 29 3b 0a 09 2f 2a 20 4a |lock[44]);../* J| 000029c0 75 73 74 20 64 69 73 70 6c 61 79 20 74 68 65 20 |ust display the | 000029d0 66 69 6c 65 6e 61 6d 65 20 66 6f 72 20 6e 6f 77 |filename for now| 000029e0 20 2a 2f 0a 09 61 75 5f 72 65 70 6f 72 74 5f 65 | */..au_report_e| 000029f0 72 72 6f 72 28 31 2c 20 66 69 6c 65 6e 61 6d 65 |rror(1, filename| 00002a00 2c 20 31 2c 20 61 70 70 6e 61 6d 65 29 3b 0a 7d |, 1, appname);.}| 00002a10 0a 0a 76 6f 69 64 20 6f 70 65 6e 77 69 6e 64 6f |..void openwindo| 00002a20 77 28 75 6e 73 69 67 6e 65 64 20 63 68 61 72 20 |w(unsigned char | 00002a30 70 6f 6c 6c 62 6c 6f 63 6b 5b 5d 29 0a 7b 0a 20 |pollblock[]).{. | 00002a40 20 20 5f 6b 65 72 6e 65 6c 5f 73 77 69 5f 72 65 | _kernel_swi_re| 00002a50 67 73 20 69 6e 2c 20 6f 75 74 3b 0a 0a 20 20 20 |gs in, out;.. | 00002a60 69 6e 2e 72 5b 31 5d 20 3d 20 28 69 6e 74 29 20 |in.r[1] = (int) | 00002a70 70 6f 6c 6c 62 6c 6f 63 6b 3b 0a 20 20 20 5f 6b |pollblock;. _k| 00002a80 65 72 6e 65 6c 5f 73 77 69 28 57 69 6d 70 5f 4f |ernel_swi(Wimp_O| 00002a90 70 65 6e 57 69 6e 64 6f 77 2c 20 26 69 6e 2c 20 |penWindow, &in, | 00002aa0 26 6f 75 74 29 3b 0a 20 20 20 72 65 74 75 72 6e |&out);. return| 00002ab0 3b 0a 7d 0a 0a 76 6f 69 64 20 63 6c 6f 73 65 77 |;.}..void closew| 00002ac0 69 6e 64 6f 77 28 75 6e 73 69 67 6e 65 64 20 63 |indow(unsigned c| 00002ad0 68 61 72 20 70 6f 6c 6c 62 6c 6f 63 6b 5b 5d 29 |har pollblock[])| 00002ae0 0a 7b 0a 20 20 20 5f 6b 65 72 6e 65 6c 5f 73 77 |.{. _kernel_sw| 00002af0 69 5f 72 65 67 73 20 69 6e 2c 20 6f 75 74 3b 0a |i_regs in, out;.| 00002b00 0a 20 20 20 69 6e 2e 72 5b 31 5d 20 3d 20 28 69 |. in.r[1] = (i| 00002b10 6e 74 29 20 70 6f 6c 6c 62 6c 6f 63 6b 3b 0a 20 |nt) pollblock;. | 00002b20 20 20 5f 6b 65 72 6e 65 6c 5f 73 77 69 28 57 69 | _kernel_swi(Wi| 00002b30 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 2c 20 |mp_CloseWindow, | 00002b40 26 69 6e 2c 20 26 6f 75 74 29 3b 0a 20 20 20 72 |&in, &out);. r| 00002b50 65 74 75 72 6e 3b 0a 7d 0a 0a 76 6f 69 64 20 6c |eturn;.}..void l| 00002b60 6f 61 64 74 65 6d 70 6c 61 74 65 73 28 76 6f 69 |oadtemplates(voi| 00002b70 64 29 0a 7b 0a 09 61 75 5f 6f 70 65 6e 74 65 6d |d).{..au_opentem| 00002b80 70 6c 61 74 65 28 22 3c 52 41 50 53 24 44 69 72 |plate("<RAPS$Dir| 00002b90 3e 2e 54 65 6d 70 6c 61 74 65 73 22 29 3b 0a 09 |>.Templates");..| 00002ba0 69 66 28 61 75 5f 6c 6f 61 64 74 65 6d 70 6c 61 |if(au_loadtempla| 00002bb0 74 65 28 22 4d 61 69 6e 57 69 6e 64 6f 77 22 2c |te("MainWindow",| 00002bc0 20 26 77 69 6e 5f 64 61 74 61 5b 30 5d 2c 20 30 | &win_data[0], 0| 00002bd0 29 20 3d 3d 20 30 29 20 7b 0a 09 09 61 75 5f 72 |) == 0) {...au_r| 00002be0 65 70 6f 72 74 5f 65 72 72 6f 72 28 31 2c 20 22 |eport_error(1, "| 00002bf0 54 65 6d 70 6c 61 74 65 20 6e 6f 74 20 66 6f 75 |Template not fou| 00002c00 6e 64 21 22 2c 20 31 2c 20 61 70 70 6e 61 6d 65 |nd!", 1, appname| 00002c10 29 3b 0a 09 09 51 55 49 54 5f 46 4c 41 47 20 3d |);...QUIT_FLAG =| 00002c20 20 31 3b 0a 09 7d 0a 09 69 66 28 61 75 5f 6c 6f | 1;..}..if(au_lo| 00002c30 61 64 74 65 6d 70 6c 61 74 65 28 22 50 72 6f 67 |adtemplate("Prog| 00002c40 49 6e 66 6f 22 2c 20 26 77 69 6e 5f 64 61 74 61 |Info", &win_data| 00002c50 5b 31 5d 2c 20 30 29 20 3d 3d 20 30 29 20 7b 0a |[1], 0) == 0) {.| 00002c60 09 09 61 75 5f 72 65 70 6f 72 74 5f 65 72 72 6f |..au_report_erro| 00002c70 72 28 31 2c 20 22 54 65 6d 70 6c 61 74 65 20 6e |r(1, "Template n| 00002c80 6f 74 20 66 6f 75 6e 64 21 22 2c 20 31 2c 20 61 |ot found!", 1, a| 00002c90 70 70 6e 61 6d 65 29 3b 0a 09 09 51 55 49 54 5f |ppname);...QUIT_| 00002ca0 46 4c 41 47 20 3d 20 31 3b 0a 09 7d 0a 09 69 66 |FLAG = 1;..}..if| 00002cb0 28 61 75 5f 6c 6f 61 64 74 65 6d 70 6c 61 74 65 |(au_loadtemplate| 00002cc0 28 22 78 66 65 72 5f 73 65 6e 64 22 2c 20 26 77 |("xfer_send", &w| 00002cd0 69 6e 5f 64 61 74 61 5b 32 5d 2c 20 30 29 20 3d |in_data[2], 0) =| 00002ce0 3d 20 30 29 20 7b 0a 09 09 61 75 5f 72 65 70 6f |= 0) {...au_repo| 00002cf0 72 74 5f 65 72 72 6f 72 28 31 2c 20 22 54 65 6d |rt_error(1, "Tem| 00002d00 70 6c 61 74 65 20 6e 6f 74 20 66 6f 75 6e 64 21 |plate not found!| 00002d10 22 2c 20 31 2c 20 61 70 70 6e 61 6d 65 29 3b 0a |", 1, appname);.| 00002d20 09 09 51 55 49 54 5f 46 4c 41 47 20 3d 20 31 3b |..QUIT_FLAG = 1;| 00002d30 0a 09 7d 0a 0a 09 61 75 5f 63 6c 6f 73 65 74 65 |..}...au_closete| 00002d40 6d 70 6c 61 74 65 28 29 3b 0a 7d 0a 0a 76 6f 69 |mplate();.}..voi| 00002d50 64 20 73 65 74 75 70 5f 64 61 74 61 62 61 73 65 |d setup_database| 00002d60 28 76 6f 69 64 29 0a 7b 0a 0a 09 2f 2a 20 49 6e |(void).{.../* In| 00002d70 69 74 69 61 6c 6c 79 2c 20 77 65 20 6e 65 65 64 |itially, we need| 00002d80 20 74 6f 20 73 65 74 20 61 73 69 64 65 20 6d 65 | to set aside me| 00002d90 6d 6f 72 79 20 66 6f 72 20 74 68 65 20 27 72 6f |mory for the 'ro| 00002da0 6f 74 27 20 73 74 72 75 63 74 75 72 65 20 2a 2f |ot' structure */| 00002db0 0a 0a 09 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f 74 |...jmp_data_root| 00002dc0 20 3d 20 63 61 6c 6c 6f 63 28 31 2c 20 73 69 7a | = calloc(1, siz| 00002dd0 65 6f 66 28 6a 75 6d 70 5f 64 61 74 61 29 29 3b |eof(jump_data));| 00002de0 0a 09 2f 2a 20 49 6e 69 74 69 61 6c 69 73 65 20 |../* Initialise | 00002df0 70 6f 69 6e 74 65 72 73 20 2a 2f 0a 09 6a 6d 70 |pointers */..jmp| 00002e00 5f 64 61 74 61 5f 72 6f 6f 74 2d 3e 70 72 65 76 |_data_root->prev| 00002e10 5f 72 65 63 6f 72 64 20 3d 20 6a 6d 70 5f 64 61 |_record = jmp_da| 00002e20 74 61 5f 72 6f 6f 74 2d 3e 6e 65 78 74 5f 72 65 |ta_root->next_re| 00002e30 63 6f 72 64 20 3d 20 4e 55 4c 4c 3b 0a 09 6a 6d |cord = NULL;..jm| 00002e40 70 5f 64 61 74 61 5f 72 6f 6f 74 2d 3e 6a 75 6d |p_data_root->jum| 00002e50 70 5f 6e 6f 20 3d 20 31 3b 0a 09 43 55 52 52 45 |p_no = 1;..CURRE| 00002e60 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 |NT_RECORD_POINTE| 00002e70 52 20 3d 20 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f |R = jmp_data_roo| 00002e80 74 3b 0a 7d 0a |t;.}.| 00002e85
WimpC/!RAPS/c/!RunImage
00000000 2f 2a 20 52 41 50 53 20 2d 20 61 20 70 61 72 61 |/* RAPS - a para| 00000010 63 68 75 74 65 20 6a 75 6d 70 20 64 61 74 61 62 |chute jump datab| 00000020 61 73 65 20 70 72 6f 67 72 61 6d 0a 20 2a 20 54 |ase program. * T| 00000030 6f 20 64 65 6d 6f 6e 73 74 72 61 74 65 20 74 68 |o demonstrate th| 00000040 65 20 41 63 6f 72 6e 20 55 73 65 72 20 57 69 6d |e Acorn User Wim| 00000050 70 20 43 20 6c 69 62 72 61 72 79 0a 20 2a 20 62 |p C library. * b| 00000060 79 20 53 74 65 76 65 20 4d 75 6d 66 6f 72 64 20 |y Steve Mumford | 00000070 66 6f 72 20 41 63 6f 72 6e 20 55 73 65 72 2c 20 |for Acorn User, | 00000080 53 65 70 74 65 6d 62 65 72 20 31 39 39 36 20 2a |September 1996 *| 00000090 2f 0a 0a 2f 2a 20 23 69 6e 63 6c 75 64 65 73 20 |/../* #includes | 000000a0 2a 2f 0a 0a 23 69 6e 63 6c 75 64 65 20 3c 73 74 |*/..#include <st| 000000b0 64 69 6f 2e 68 3e 0a 23 69 6e 63 6c 75 64 65 20 |dio.h>.#include | 000000c0 3c 73 74 64 6c 69 62 2e 68 3e 0a 23 69 6e 63 6c |<stdlib.h>.#incl| 000000d0 75 64 65 20 3c 73 74 72 69 6e 67 2e 68 3e 0a 23 |ude <string.h>.#| 000000e0 69 6e 63 6c 75 64 65 20 22 41 55 4c 69 62 2e 68 |include "AULib.h| 000000f0 22 0a 0a 2f 2a 20 23 64 65 66 69 6e 65 73 20 2a |"../* #defines *| 00000100 2f 0a 0a 23 64 65 66 69 6e 65 20 50 4f 4c 4c 5f |/..#define POLL_| 00000110 4d 41 53 4b 20 31 0a 23 64 65 66 69 6e 65 20 4d |MASK 1.#define M| 00000120 41 58 5f 57 49 4e 44 4f 57 53 20 32 0a 23 64 65 |AX_WINDOWS 2.#de| 00000130 66 69 6e 65 20 4d 41 58 5f 4d 45 4e 55 53 20 31 |fine MAX_MENUS 1| 00000140 0a 23 64 65 66 69 6e 65 20 4d 41 58 5f 4a 55 4d |.#define MAX_JUM| 00000150 50 53 20 31 35 0a 23 64 65 66 69 6e 65 20 56 45 |PS 15.#define VE| 00000160 52 53 49 4f 4e 5f 4e 55 4d 42 45 52 20 33 31 30 |RSION_NUMBER 310| 00000170 20 2f 2a 20 52 69 73 63 20 4f 53 20 76 65 72 73 | /* Risc OS vers| 00000180 69 6f 6e 20 6e 6f 2e 20 2a 20 31 30 30 20 2a 2f |ion no. * 100 */| 00000190 0a 0a 2f 2a 20 54 68 65 73 65 20 23 64 65 66 69 |../* These #defi| 000001a0 6e 65 73 20 72 65 6c 61 74 65 20 74 6f 20 74 68 |nes relate to th| 000001b0 65 20 69 63 6f 6e 20 6e 75 6d 62 65 72 73 20 69 |e icon numbers i| 000001c0 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 66 |n the template f| 000001d0 69 6c 65 20 2a 2f 0a 0a 23 64 65 66 69 6e 65 20 |ile */..#define | 000001e0 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 49 |CURRENT_RECORD_I| 000001f0 43 4f 4e 20 32 0a 23 64 65 66 69 6e 65 20 4c 41 |CON 2.#define LA| 00000200 53 54 5f 52 45 43 4f 52 44 5f 49 43 4f 4e 20 34 |ST_RECORD_ICON 4| 00000210 0a 23 64 65 66 69 6e 65 20 50 52 45 56 5f 52 45 |.#define PREV_RE| 00000220 43 4f 52 44 5f 49 43 4f 4e 20 35 0a 23 64 65 66 |CORD_ICON 5.#def| 00000230 69 6e 65 20 4e 45 58 54 5f 52 45 43 4f 52 44 5f |ine NEXT_RECORD_| 00000240 49 43 4f 4e 20 36 0a 23 64 65 66 69 6e 65 20 44 |ICON 6.#define D| 00000250 41 54 45 5f 49 43 4f 4e 20 37 0a 23 64 65 66 69 |ATE_ICON 7.#defi| 00000260 6e 65 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e |ne AIRCRAFT_ICON| 00000270 20 39 0a 23 64 65 66 69 6e 65 20 44 52 4f 50 5a | 9.#define DROPZ| 00000280 4f 4e 45 5f 49 43 4f 4e 20 31 31 0a 23 64 65 66 |ONE_ICON 11.#def| 00000290 69 6e 65 20 41 4c 54 49 54 55 44 45 5f 49 43 4f |ine ALTITUDE_ICO| 000002a0 4e 20 31 33 0a 23 64 65 66 69 6e 65 20 44 45 4c |N 13.#define DEL| 000002b0 41 59 5f 49 43 4f 4e 20 31 35 0a 23 64 65 66 69 |AY_ICON 15.#defi| 000002c0 6e 65 20 41 49 52 57 4f 52 4b 5f 49 43 4f 4e 20 |ne AIRWORK_ICON | 000002d0 31 37 0a 23 64 65 66 69 6e 65 20 52 45 4d 41 52 |17.#define REMAR| 000002e0 4b 53 31 5f 49 43 4f 4e 20 31 39 0a 23 64 65 66 |KS1_ICON 19.#def| 000002f0 69 6e 65 20 52 45 4d 41 52 4b 53 32 5f 49 43 4f |ine REMARKS2_ICO| 00000300 4e 20 32 31 0a 23 64 65 66 69 6e 65 20 55 50 44 |N 21.#define UPD| 00000310 41 54 45 5f 49 43 4f 4e 20 32 32 0a 0a 2f 2a 20 |ATE_ICON 22../* | 00000320 54 68 65 73 65 20 6e 65 78 74 20 23 64 65 66 69 |These next #defi| 00000330 6e 65 73 20 73 65 74 20 75 70 20 74 68 65 20 6d |nes set up the m| 00000340 65 6e 75 20 73 65 6c 65 63 74 69 6f 6e 20 63 68 |enu selection ch| 00000350 6f 69 63 65 73 20 2a 2f 0a 0a 2f 2a 20 69 63 6f |oices */../* ico| 00000360 6e 62 61 72 20 6d 65 6e 75 20 2a 2f 0a 23 64 65 |nbar menu */.#de| 00000370 66 69 6e 65 20 49 4e 46 4f 5f 4f 50 54 49 4f 4e |fine INFO_OPTION| 00000380 20 30 0a 23 64 65 66 69 6e 65 20 51 55 49 54 5f | 0.#define QUIT_| 00000390 4f 50 54 49 4f 4e 20 31 0a 0a 74 79 70 65 64 65 |OPTION 1..typede| 000003a0 66 20 73 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 |f struct jump_da| 000003b0 74 61 20 7b 0a 09 69 6e 74 20 6a 75 6d 70 5f 6e |ta {..int jump_n| 000003c0 6f 3b 0a 09 63 68 61 72 20 64 61 74 65 5b 31 31 |o;..char date[11| 000003d0 5d 3b 0a 09 63 68 61 72 20 61 69 72 63 72 61 66 |];..char aircraf| 000003e0 74 5b 33 31 5d 3b 0a 09 63 68 61 72 20 64 72 6f |t[31];..char dro| 000003f0 70 7a 6f 6e 65 5b 35 31 5d 3b 0a 09 69 6e 74 20 |pzone[51];..int | 00000400 61 6c 74 69 74 75 64 65 3b 0a 09 69 6e 74 20 64 |altitude;..int d| 00000410 65 6c 61 79 3b 0a 09 63 68 61 72 20 61 69 72 77 |elay;..char airw| 00000420 6f 72 6b 5b 31 33 5d 3b 0a 09 63 68 61 72 20 72 |ork[13];..char r| 00000430 65 6d 61 72 6b 73 31 5b 35 31 5d 3b 0a 09 63 68 |emarks1[51];..ch| 00000440 61 72 20 72 65 6d 61 72 6b 73 32 5b 36 31 5d 3b |ar remarks2[61];| 00000450 0a 09 73 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 |..struct jump_da| 00000460 74 61 20 2a 70 72 65 76 5f 72 65 63 6f 72 64 3b |ta *prev_record;| 00000470 0a 09 73 74 72 75 63 74 20 6a 75 6d 70 5f 64 61 |..struct jump_da| 00000480 74 61 20 2a 6e 65 78 74 5f 72 65 63 6f 72 64 3b |ta *next_record;| 00000490 0a 7d 20 6a 75 6d 70 5f 64 61 74 61 3b 0a 0a 2f |.} jump_data;../| 000004a0 2a 20 47 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c |* Global variabl| 000004b0 65 73 20 2a 2f 0a 0a 69 6e 74 09 51 55 49 54 5f |es */..int.QUIT_| 000004c0 46 4c 41 47 20 3d 20 30 3b 0a 69 6e 74 09 43 55 |FLAG = 0;.int.CU| 000004d0 52 52 45 4e 54 5f 4d 45 4e 55 20 3d 20 30 3b 0a |RRENT_MENU = 0;.| 000004e0 69 6e 74 09 43 55 52 52 45 4e 54 5f 52 45 43 4f |int.CURRENT_RECO| 000004f0 52 44 5f 4e 55 4d 42 45 52 20 3d 20 31 3b 0a 69 |RD_NUMBER = 1;.i| 00000500 6e 74 09 4c 41 53 54 5f 52 45 43 4f 52 44 5f 4e |nt.LAST_RECORD_N| 00000510 55 4d 42 45 52 20 3d 20 31 3b 0a 6a 75 6d 70 5f |UMBER = 1;.jump_| 00000520 64 61 74 61 09 2a 43 55 52 52 45 4e 54 5f 52 45 |data.*CURRENT_RE| 00000530 43 4f 52 44 5f 50 4f 49 4e 54 45 52 20 3d 20 4e |CORD_POINTER = N| 00000540 55 4c 4c 3b 0a 0a 77 69 6e 64 6f 77 5f 64 61 74 |ULL;..window_dat| 00000550 61 09 77 69 6e 5f 64 61 74 61 5b 4d 41 58 5f 57 |a.win_data[MAX_W| 00000560 49 4e 44 4f 57 53 5d 3b 0a 6d 65 6e 75 5f 64 61 |INDOWS];.menu_da| 00000570 74 61 09 6d 65 6e 5f 64 61 74 61 5b 4d 41 58 5f |ta.men_data[MAX_| 00000580 4d 45 4e 55 53 5d 3b 0a 6a 75 6d 70 5f 64 61 74 |MENUS];.jump_dat| 00000590 61 09 2a 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f 74 |a.*jmp_data_root| 000005a0 3b 0a 63 68 61 72 20 61 70 70 6e 61 6d 65 5b 5d |;.char appname[]| 000005b0 20 3d 20 22 52 41 50 53 20 4a 75 6d 70 20 4c 6f | = "RAPS Jump Lo| 000005c0 67 67 65 72 22 3b 0a 63 68 61 72 20 73 70 72 6e |gger";.char sprn| 000005d0 61 6d 65 5b 5d 20 3d 20 22 21 72 61 70 73 22 3b |ame[] = "!raps";| 000005e0 0a 6c 6f 6e 67 20 69 6e 74 20 6d 73 67 6c 69 73 |.long int msglis| 000005f0 74 5b 5d 20 3d 20 7b 30 7d 3b 0a 0a 2f 2a 20 46 |t[] = {0};../* F| 00000600 75 6e 63 74 69 6f 6e 20 70 72 6f 74 6f 74 79 70 |unction prototyp| 00000610 69 6e 67 20 2a 2f 0a 0a 69 6e 74 09 6d 61 69 6e |ing */..int.main| 00000620 28 76 6f 69 64 29 3b 0a 76 6f 69 64 09 6f 70 65 |(void);.void.ope| 00000630 6e 77 69 6e 64 6f 77 28 75 6e 73 69 67 6e 65 64 |nwindow(unsigned| 00000640 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 64 09 63 | char[]);.void.c| 00000650 6c 6f 73 65 77 69 6e 64 6f 77 28 75 6e 73 69 67 |losewindow(unsig| 00000660 6e 65 64 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 |ned char[]);.voi| 00000670 64 09 6c 6f 61 64 74 65 6d 70 6c 61 74 65 73 28 |d.loadtemplates(| 00000680 76 6f 69 64 29 3b 0a 76 6f 69 64 09 6d 6f 75 73 |void);.void.mous| 00000690 65 5f 63 6c 69 63 6b 28 75 6e 73 69 67 6e 65 64 |e_click(unsigned| 000006a0 20 63 68 61 72 5b 5d 29 3b 0a 76 6f 69 64 09 77 | char[]);.void.w| 000006b0 69 6d 70 5f 6d 73 67 28 69 6e 74 2c 20 75 6e 73 |imp_msg(int, uns| 000006c0 69 67 6e 65 64 20 63 68 61 72 5b 5d 29 3b 0a 76 |igned char[]);.v| 000006d0 6f 69 64 09 6f 70 65 6e 5f 6d 61 69 6e 5f 77 69 |oid.open_main_wi| 000006e0 6e 64 6f 77 28 76 6f 69 64 29 3b 0a 76 6f 69 64 |ndow(void);.void| 000006f0 09 70 72 65 76 5f 72 65 63 6f 72 64 28 76 6f 69 |.prev_record(voi| 00000700 64 29 3b 0a 76 6f 69 64 09 6e 65 78 74 5f 72 65 |d);.void.next_re| 00000710 63 6f 72 64 28 76 6f 69 64 29 3b 0a 76 6f 69 64 |cord(void);.void| 00000720 09 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 |.update_window_i| 00000730 6e 66 6f 28 76 6f 69 64 29 3b 0a 76 6f 69 64 09 |nfo(void);.void.| 00000740 6d 65 6e 75 5f 73 65 6c 65 63 74 69 6f 6e 28 75 |menu_selection(u| 00000750 6e 73 69 67 6e 65 64 20 63 68 61 72 5b 5d 29 3b |nsigned char[]);| 00000760 0a 76 6f 69 64 09 73 65 74 75 70 5f 64 61 74 61 |.void.setup_data| 00000770 62 61 73 65 28 76 6f 69 64 29 3b 0a 76 6f 69 64 |base(void);.void| 00000780 09 75 70 64 61 74 65 5f 72 65 63 6f 72 64 28 76 |.update_record(v| 00000790 6f 69 64 29 3b 0a 76 6f 69 64 09 61 64 64 5f 72 |oid);.void.add_r| 000007a0 65 63 6f 72 64 28 76 6f 69 64 29 3b 0a 0a 2f 2a |ecord(void);../*| 000007b0 20 4d 61 69 6e 20 70 72 6f 67 72 61 6d 20 2a 2f | Main program */| 000007c0 0a 0a 69 6e 74 0a 6d 61 69 6e 28 29 0a 7b 0a 09 |..int.main().{..| 000007d0 69 6e 74 09 74 61 73 6b 5f 68 61 6e 64 6c 65 2c |int.task_handle,| 000007e0 20 69 63 6f 6e 5f 68 61 6e 64 6c 65 3b 0a 0a 09 | icon_handle;...| 000007f0 75 6e 73 69 67 6e 65 64 20 63 68 61 72 09 70 6f |unsigned char.po| 00000800 6c 6c 5f 62 6c 6f 63 6b 5b 32 35 36 5d 3b 0a 09 |ll_block[256];..| 00000810 69 6e 74 09 70 6f 6c 6c 5f 72 65 73 75 6c 74 3b |int.poll_result;| 00000820 0a 09 69 6e 74 09 69 20 3d 20 30 3b 0a 0a 09 73 |..int.i = 0;...s| 00000830 65 74 75 70 5f 64 61 74 61 62 61 73 65 28 29 3b |etup_database();| 00000840 0a 09 74 61 73 6b 5f 68 61 6e 64 6c 65 20 3d 20 |..task_handle = | 00000850 61 75 5f 69 6e 69 74 69 61 6c 69 73 65 28 56 45 |au_initialise(VE| 00000860 52 53 49 4f 4e 5f 4e 55 4d 42 45 52 2c 20 61 70 |RSION_NUMBER, ap| 00000870 70 6e 61 6d 65 2c 20 6d 73 67 6c 69 73 74 29 3b |pname, msglist);| 00000880 0a 09 69 63 6f 6e 5f 68 61 6e 64 6c 65 20 3d 20 |..icon_handle = | 00000890 61 75 5f 63 72 65 61 74 65 5f 69 63 6f 6e 62 61 |au_create_iconba| 000008a0 72 5f 69 63 6f 6e 28 49 42 41 52 5f 50 52 49 4f |r_icon(IBAR_PRIO| 000008b0 52 5f 41 50 50 2c 0a 09 09 09 49 42 41 52 5f 4f |R_APP,....IBAR_O| 000008c0 4e 52 49 47 48 54 2c 0a 09 09 09 49 43 4f 4e 5f |NRIGHT,....ICON_| 000008d0 49 53 53 50 52 49 54 45 20 7c 20 49 43 4f 4e 5f |ISSPRITE | ICON_| 000008e0 48 43 45 4e 54 52 45 20 7c 20 49 43 4f 4e 5f 56 |HCENTRE | ICON_V| 000008f0 43 45 4e 54 52 45 20 7c 20 49 43 4f 4e 5f 43 4c |CENTRE | ICON_CL| 00000900 49 43 4b 4e 4f 54 49 46 49 45 53 4f 4e 43 45 2c |ICKNOTIFIESONCE,| 00000910 0a 09 09 09 73 70 72 6e 61 6d 65 29 3b 0a 09 6c |....sprname);..l| 00000920 6f 61 64 74 65 6d 70 6c 61 74 65 73 28 29 3b 0a |oadtemplates();.| 00000930 09 2f 2a 61 75 5f 6f 70 65 6e 77 69 6e 5f 66 72 |./*au_openwin_fr| 00000940 6f 6d 5f 74 65 6d 70 6c 61 74 65 64 61 74 61 28 |om_templatedata(| 00000950 26 77 69 6e 5f 64 61 74 61 5b 30 5d 2c 20 2d 31 |&win_data[0], -1| 00000960 29 3b 20 2a 2f 0a 09 77 68 69 6c 65 20 28 51 55 |); */..while (QU| 00000970 49 54 5f 46 4c 41 47 20 3d 3d 20 30 29 20 7b 0a |IT_FLAG == 0) {.| 00000980 09 2f 2a 20 64 6f 20 73 6f 6d 65 20 70 6f 6c 6c |./* do some poll| 00000990 69 6e 67 20 2a 2f 0a 09 09 70 6f 6c 6c 5f 72 65 |ing */...poll_re| 000009a0 73 75 6c 74 20 3d 20 61 75 5f 77 69 6d 70 5f 70 |sult = au_wimp_p| 000009b0 6f 6c 6c 28 50 4f 4c 4c 5f 4d 41 53 4b 2c 20 70 |oll(POLL_MASK, p| 000009c0 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 73 77 |oll_block);...sw| 000009d0 69 74 63 68 20 28 70 6f 6c 6c 5f 72 65 73 75 6c |itch (poll_resul| 000009e0 74 29 20 7b 0a 09 09 09 63 61 73 65 20 20 32 20 |t) {....case 2 | 000009f0 3a 20 6f 70 65 6e 77 69 6e 64 6f 77 28 70 6f 6c |: openwindow(pol| 00000a00 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 09 09 09 09 |l_block);.......| 00000a10 62 72 65 61 6b 3b 0a 09 09 09 63 61 73 65 20 20 |break;....case | 00000a20 33 20 3a 20 63 6c 6f 73 65 77 69 6e 64 6f 77 28 |3 : closewindow(| 00000a30 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 09 |poll_block);....| 00000a40 09 09 09 62 72 65 61 6b 3b 0a 09 09 09 63 61 73 |...break;....cas| 00000a50 65 20 20 36 20 3a 20 6d 6f 75 73 65 5f 63 6c 69 |e 6 : mouse_cli| 00000a60 63 6b 28 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a |ck(poll_block);.| 00000a70 09 09 09 09 09 09 62 72 65 61 6b 3b 0a 09 09 09 |......break;....| 00000a80 63 61 73 65 20 20 39 20 3a 20 6d 65 6e 75 5f 73 |case 9 : menu_s| 00000a90 65 6c 65 63 74 69 6f 6e 28 70 6f 6c 6c 5f 62 6c |election(poll_bl| 00000aa0 6f 63 6b 29 3b 0a 09 09 09 09 09 09 62 72 65 61 |ock);.......brea| 00000ab0 6b 3b 0a 09 09 09 63 61 73 65 20 31 37 20 3a 0a |k;....case 17 :.| 00000ac0 09 09 09 63 61 73 65 20 31 38 20 3a 0a 09 09 09 |...case 18 :....| 00000ad0 63 61 73 65 20 31 39 20 3a 20 77 69 6d 70 5f 6d |case 19 : wimp_m| 00000ae0 73 67 28 70 6f 6c 6c 5f 72 65 73 75 6c 74 2c 20 |sg(poll_result, | 00000af0 70 6f 6c 6c 5f 62 6c 6f 63 6b 29 3b 0a 09 09 09 |poll_block);....| 00000b00 09 09 09 62 72 65 61 6b 3b 0a 09 09 7d 0a 09 7d |...break;...}..}| 00000b10 0a 09 61 75 5f 63 6c 6f 73 65 64 6f 77 6e 28 74 |..au_closedown(t| 00000b20 61 73 6b 5f 68 61 6e 64 6c 65 29 3b 0a 0a 09 66 |ask_handle);...f| 00000b30 6f 72 28 69 20 3d 20 30 3b 20 69 20 3c 20 4d 41 |or(i = 0; i < MA| 00000b40 58 5f 57 49 4e 44 4f 57 53 3b 20 69 2b 2b 29 20 |X_WINDOWS; i++) | 00000b50 7b 0a 09 09 66 72 65 65 28 77 69 6e 5f 64 61 74 |{...free(win_dat| 00000b60 61 5b 69 5d 2e 77 69 6e 5f 6e 61 6d 65 29 3b 0a |a[i].win_name);.| 00000b70 09 09 66 72 65 65 28 77 69 6e 5f 64 61 74 61 5b |..free(win_data[| 00000b80 69 5d 2e 62 75 66 66 65 72 29 3b 0a 09 09 66 72 |i].buffer);...fr| 00000b90 65 65 28 77 69 6e 5f 64 61 74 61 5b 69 5d 2e 77 |ee(win_data[i].w| 00000ba0 6f 72 6b 73 70 61 63 65 29 3b 0a 09 7d 0a 0a 09 |orkspace);..}...| 00000bb0 2f 2a 20 23 52 65 6d 65 6d 62 65 72 20 74 6f 20 |/* #Remember to | 00000bc0 66 72 65 65 20 6d 65 6e 75 20 73 70 61 63 65 21 |free menu space!| 00000bd0 20 28 72 65 63 75 72 73 69 6f 6e 3f 29 20 2a 2f | (recursion?) */| 00000be0 0a 7d 0a 0a 76 6f 69 64 20 6d 6f 75 73 65 5f 63 |.}..void mouse_c| 00000bf0 6c 69 63 6b 28 75 6e 73 69 67 6e 65 64 20 63 68 |lick(unsigned ch| 00000c00 61 72 20 70 6f 6c 6c 5f 62 6c 6f 63 6b 5b 5d 29 |ar poll_block[])| 00000c10 0a 7b 0a 09 69 6e 74 09 63 6c 6b 3b 0a 09 6c 6f |.{..int.clk;..lo| 00000c20 6e 67 20 69 6e 74 09 69 63 6f 6e 5f 6e 75 6d 3b |ng int.icon_num;| 00000c30 0a 0a 09 2f 2a 20 44 65 74 65 72 6d 69 6e 65 20 |.../* Determine | 00000c40 77 68 69 63 68 20 62 75 74 74 6f 6e 20 77 61 73 |which button was| 00000c50 20 70 72 65 73 73 65 64 20 2a 2f 0a 09 63 6c 6b | pressed */..clk| 00000c60 20 3d 20 28 69 6e 74 29 20 61 75 5f 62 79 74 65 | = (int) au_byte| 00000c70 74 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c 6f 63 |toword(poll_bloc| 00000c80 6b 2c 20 38 29 3b 20 0a 0a 09 69 66 28 28 61 75 |k, 8); ...if((au| 00000c90 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c |_bytetoword(poll| 00000ca0 5f 62 6c 6f 63 6b 2c 20 31 32 29 20 3d 3d 20 2d |_block, 12) == -| 00000cb0 32 29 20 26 26 20 28 63 6c 6b 20 3d 3d 20 34 29 |2) && (clk == 4)| 00000cc0 29 20 7b 0a 09 6f 70 65 6e 5f 6d 61 69 6e 5f 77 |) {..open_main_w| 00000cd0 69 6e 64 6f 77 28 29 3b 0a 09 7d 0a 0a 09 69 66 |indow();..}...if| 00000ce0 28 28 61 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 |((au_bytetoword(| 00000cf0 70 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 32 29 20 |poll_block, 12) | 00000d00 3d 3d 20 2d 32 29 20 26 26 20 28 63 6c 6b 20 3d |== -2) && (clk =| 00000d10 3d 20 32 29 29 20 7b 0a 09 09 2f 2a 20 54 69 6d |= 2)) {.../* Tim| 00000d20 65 20 74 6f 20 70 72 6f 64 75 63 65 20 61 20 6d |e to produce a m| 00000d30 65 6e 75 20 2a 2f 0a 09 09 61 75 5f 62 75 69 6c |enu */...au_buil| 00000d40 64 6d 65 6e 75 28 22 52 41 50 53 22 2c 20 26 6d |dmenu("RAPS", &m| 00000d50 65 6e 5f 64 61 74 61 5b 30 5d 29 3b 0a 09 09 61 |en_data[0]);...a| 00000d60 75 5f 61 64 64 74 6f 6d 65 6e 75 28 22 49 6e 66 |u_addtomenu("Inf| 00000d70 6f 22 2c 20 30 2c 20 77 69 6e 5f 64 61 74 61 5b |o", 0, win_data[| 00000d80 31 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 30 |1].win_handle, 0| 00000d90 2c 20 26 6d 65 6e 5f 64 61 74 61 5b 30 5d 29 3b |, &men_data[0]);| 00000da0 0a 09 09 61 75 5f 61 64 64 74 6f 6d 65 6e 75 28 |...au_addtomenu(| 00000db0 22 51 75 69 74 22 2c 20 4d 45 4e 55 5f 4c 41 53 |"Quit", MENU_LAS| 00000dc0 54 49 54 45 4d 2c 20 2d 31 2c 20 30 2c 20 26 6d |TITEM, -1, 0, &m| 00000dd0 65 6e 5f 64 61 74 61 5b 30 5d 29 3b 0a 09 09 61 |en_data[0]);...a| 00000de0 75 5f 63 72 65 61 74 65 6d 65 6e 75 28 26 6d 65 |u_createmenu(&me| 00000df0 6e 5f 64 61 74 61 5b 30 5d 29 3b 0a 09 09 43 55 |n_data[0]);...CU| 00000e00 52 52 45 4e 54 5f 4d 45 4e 55 20 3d 20 31 3b 20 |RRENT_MENU = 1; | 00000e10 2f 2a 20 6b 65 65 70 20 74 72 61 63 6b 20 6f 66 |/* keep track of| 00000e20 20 74 68 65 20 6c 61 73 74 20 6d 65 6e 75 20 77 | the last menu w| 00000e30 65 20 6f 70 65 6e 65 64 20 2a 2f 0a 09 09 61 75 |e opened */...au| 00000e40 5f 6f 70 65 6e 6d 65 6e 75 28 26 6d 65 6e 5f 64 |_openmenu(&men_d| 00000e50 61 74 61 5b 30 5d 2c 20 28 69 6e 74 29 20 61 75 |ata[0], (int) au| 00000e60 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c |_bytetoword(poll| 00000e70 5f 62 6c 6f 63 6b 2c 20 30 29 20 2d 20 36 34 2c |_block, 0) - 64,| 00000e80 20 28 34 34 2a 32 29 2b 39 36 29 3b 0a 09 09 72 | (44*2)+96);...r| 00000e90 65 74 75 72 6e 3b 0a 09 7d 0a 0a 09 2f 2a 20 43 |eturn;..}.../* C| 00000ea0 68 65 63 6b 20 74 6f 20 73 65 65 20 69 66 20 69 |heck to see if i| 00000eb0 74 20 77 61 73 20 69 6e 20 74 68 65 20 6d 61 69 |t was in the mai| 00000ec0 6e 20 77 69 6e 64 6f 77 20 2a 2f 0a 09 69 66 28 |n window */..if(| 00000ed0 28 61 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 |(au_bytetoword(p| 00000ee0 6f 6c 6c 5f 62 6c 6f 63 6b 2c 20 31 32 29 20 3d |oll_block, 12) =| 00000ef0 3d 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 |= win_data[0].wi| 00000f00 6e 5f 68 61 6e 64 6c 65 29 20 26 26 20 28 63 6c |n_handle) && (cl| 00000f10 6b 20 3d 3d 20 34 29 29 20 7b 0a 09 09 69 63 6f |k == 4)) {...ico| 00000f20 6e 5f 6e 75 6d 20 3d 20 61 75 5f 62 79 74 65 74 |n_num = au_bytet| 00000f30 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c 6f 63 6b |oword(poll_block| 00000f40 2c 20 31 36 29 3b 0a 09 09 73 77 69 74 63 68 20 |, 16);...switch | 00000f50 28 69 63 6f 6e 5f 6e 75 6d 29 20 7b 0a 09 09 09 |(icon_num) {....| 00000f60 63 61 73 65 20 50 52 45 56 5f 52 45 43 4f 52 44 |case PREV_RECORD| 00000f70 5f 49 43 4f 4e 20 3a 20 70 72 65 76 5f 72 65 63 |_ICON : prev_rec| 00000f80 6f 72 64 28 29 3b 0a 09 09 09 09 62 72 65 61 6b |ord();.....break| 00000f90 3b 0a 09 09 09 63 61 73 65 20 4e 45 58 54 5f 52 |;....case NEXT_R| 00000fa0 45 43 4f 52 44 5f 49 43 4f 4e 20 3a 20 6e 65 78 |ECORD_ICON : nex| 00000fb0 74 5f 72 65 63 6f 72 64 28 29 3b 0a 09 09 09 09 |t_record();.....| 00000fc0 62 72 65 61 6b 3b 0a 09 09 09 63 61 73 65 20 55 |break;....case U| 00000fd0 50 44 41 54 45 5f 49 43 4f 4e 20 3a 20 75 70 64 |PDATE_ICON : upd| 00000fe0 61 74 65 5f 72 65 63 6f 72 64 28 29 3b 0a 09 09 |ate_record();...| 00000ff0 09 09 62 72 65 61 6b 3b 0a 09 09 7d 0a 09 7d 0a |..break;...}..}.| 00001000 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a 76 6f 69 |..return;.}..voi| 00001010 64 20 6d 65 6e 75 5f 73 65 6c 65 63 74 69 6f 6e |d menu_selection| 00001020 28 75 6e 73 69 67 6e 65 64 20 63 68 61 72 20 70 |(unsigned char p| 00001030 6f 6c 6c 5f 62 6c 6f 63 6b 5b 5d 29 0a 7b 0a 09 |oll_block[]).{..| 00001040 6c 6f 6e 67 20 69 6e 74 09 66 69 72 73 74 5f 68 |long int.first_h| 00001050 69 74 3b 0a 09 2f 2a 20 57 68 69 63 68 20 6d 65 |it;../* Which me| 00001060 6e 75 20 77 61 73 20 68 69 74 3f 20 2a 2f 0a 09 |nu was hit? */..| 00001070 69 66 20 28 43 55 52 52 45 4e 54 5f 4d 45 4e 55 |if (CURRENT_MENU| 00001080 20 3d 3d 20 31 29 20 7b 0a 09 09 2f 2a 20 54 68 | == 1) {.../* Th| 00001090 65 20 69 63 6f 6e 20 62 61 72 20 6d 65 6e 75 20 |e icon bar menu | 000010a0 67 6f 74 20 69 74 20 2d 20 64 65 63 69 70 68 65 |got it - deciphe| 000010b0 72 20 66 69 72 73 74 20 6d 65 6e 75 20 73 75 62 |r first menu sub| 000010c0 73 65 6c 65 63 74 69 6f 6e 20 2a 2f 0a 09 09 66 |selection */...f| 000010d0 69 72 73 74 5f 68 69 74 20 3d 20 61 75 5f 62 79 |irst_hit = au_by| 000010e0 74 65 74 6f 77 6f 72 64 28 70 6f 6c 6c 5f 62 6c |tetoword(poll_bl| 000010f0 6f 63 6b 2c 20 30 29 3b 0a 09 09 69 66 20 28 66 |ock, 0);...if (f| 00001100 69 72 73 74 5f 68 69 74 20 3d 3d 20 51 55 49 54 |irst_hit == QUIT| 00001110 5f 4f 50 54 49 4f 4e 29 20 7b 0a 09 09 09 51 55 |_OPTION) {....QU| 00001120 49 54 5f 46 4c 41 47 20 3d 20 31 3b 0a 09 09 7d |IT_FLAG = 1;...}| 00001130 0a 09 7d 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a |..}..return;.}..| 00001140 76 6f 69 64 20 70 72 65 76 5f 72 65 63 6f 72 64 |void prev_record| 00001150 28 76 6f 69 64 29 0a 7b 0a 09 69 66 20 28 43 55 |(void).{..if (CU| 00001160 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 |RRENT_RECORD_POI| 00001170 4e 54 45 52 2d 3e 70 72 65 76 5f 72 65 63 6f 72 |NTER->prev_recor| 00001180 64 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 09 09 2f |d != NULL) {.../| 00001190 2a 20 53 61 76 65 20 77 69 6e 64 6f 77 20 69 6e |* Save window in| 000011a0 66 6f 72 6d 61 74 69 6f 6e 3f 20 2a 2f 0a 09 09 |formation? */...| 000011b0 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 |CURRENT_RECORD_P| 000011c0 4f 49 4e 54 45 52 20 3d 20 43 55 52 52 45 4e 54 |OINTER = CURRENT| 000011d0 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 000011e0 3e 70 72 65 76 5f 72 65 63 6f 72 64 3b 0a 09 09 |>prev_record;...| 000011f0 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 4e |CURRENT_RECORD_N| 00001200 55 4d 42 45 52 20 3d 20 43 55 52 52 45 4e 54 5f |UMBER = CURRENT_| 00001210 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001220 6a 75 6d 70 5f 6e 6f 3b 0a 09 09 2f 2a 20 77 6f |jump_no;.../* wo| 00001230 75 6c 64 20 75 70 64 61 74 65 20 77 69 6e 64 6f |uld update windo| 00001240 77 20 69 6e 66 6f 20 68 65 72 65 20 2a 2f 0a 09 |w info here */..| 00001250 09 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 |.update_window_i| 00001260 6e 66 6f 28 29 3b 0a 09 7d 0a 7d 0a 0a 76 6f 69 |nfo();..}.}..voi| 00001270 64 20 6e 65 78 74 5f 72 65 63 6f 72 64 28 76 6f |d next_record(vo| 00001280 69 64 29 0a 7b 0a 09 69 66 20 28 43 55 52 52 45 |id).{..if (CURRE| 00001290 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 |NT_RECORD_POINTE| 000012a0 52 2d 3e 6e 65 78 74 5f 72 65 63 6f 72 64 20 21 |R->next_record !| 000012b0 3d 20 4e 55 4c 4c 29 20 7b 0a 09 09 43 55 52 52 |= NULL) {...CURR| 000012c0 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 |ENT_RECORD_POINT| 000012d0 45 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 |ER = CURRENT_REC| 000012e0 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6e 65 78 |ORD_POINTER->nex| 000012f0 74 5f 72 65 63 6f 72 64 3b 0a 09 09 43 55 52 52 |t_record;...CURR| 00001300 45 4e 54 5f 52 45 43 4f 52 44 5f 4e 55 4d 42 45 |ENT_RECORD_NUMBE| 00001310 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 4f |R = CURRENT_RECO| 00001320 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6a 75 6d 70 |RD_POINTER->jump| 00001330 5f 6e 6f 3b 0a 09 09 2f 2a 20 77 6f 75 6c 64 20 |_no;.../* would | 00001340 75 70 64 61 74 65 20 77 69 6e 64 6f 77 20 69 6e |update window in| 00001350 66 6f 20 68 65 72 65 20 2a 2f 0a 09 09 75 70 64 |fo here */...upd| 00001360 61 74 65 5f 77 69 6e 64 6f 77 5f 69 6e 66 6f 28 |ate_window_info(| 00001370 29 3b 0a 09 7d 0a 7d 0a 0a 76 6f 69 64 20 75 70 |);..}.}..void up| 00001380 64 61 74 65 5f 72 65 63 6f 72 64 28 76 6f 69 64 |date_record(void| 00001390 29 0a 7b 0a 09 2f 2a 20 57 65 20 6e 65 65 64 20 |).{../* We need | 000013a0 61 20 74 65 6d 70 6f 72 61 72 79 20 73 74 72 69 |a temporary stri| 000013b0 6e 67 20 62 75 66 66 65 72 20 2a 2f 0a 09 63 68 |ng buffer */..ch| 000013c0 61 72 20 74 65 6d 70 5f 62 75 66 5b 32 35 35 5d |ar temp_buf[255]| 000013d0 3b 0a 0a 09 2f 2a 20 53 61 76 65 20 77 69 6e 64 |;.../* Save wind| 000013e0 6f 77 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 2a |ow information *| 000013f0 2f 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 |/..au_icon_get_t| 00001400 65 78 74 28 43 55 52 52 45 4e 54 5f 52 45 43 4f |ext(CURRENT_RECO| 00001410 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 61 74 65 |RD_POINTER->date| 00001420 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 |, win_data[0].wi| 00001430 6e 5f 68 61 6e 64 6c 65 2c 20 44 41 54 45 5f 49 |n_handle, DATE_I| 00001440 43 4f 4e 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 67 |CON);..au_icon_g| 00001450 65 74 5f 74 65 78 74 28 43 55 52 52 45 4e 54 5f |et_text(CURRENT_| 00001460 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001470 61 69 72 63 72 61 66 74 2c 20 77 69 6e 5f 64 61 |aircraft, win_da| 00001480 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 |ta[0].win_handle| 00001490 2c 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e 29 |, AIRCRAFT_ICON)| 000014a0 3b 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 |;..au_icon_get_t| 000014b0 65 78 74 28 43 55 52 52 45 4e 54 5f 52 45 43 4f |ext(CURRENT_RECO| 000014c0 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 72 6f 70 |RD_POINTER->drop| 000014d0 7a 6f 6e 65 2c 20 77 69 6e 5f 64 61 74 61 5b 30 |zone, win_data[0| 000014e0 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 44 52 |].win_handle, DR| 000014f0 4f 50 5a 4f 4e 45 5f 49 43 4f 4e 29 3b 0a 09 61 |OPZONE_ICON);..a| 00001500 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 78 74 28 |u_icon_get_text(| 00001510 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 |CURRENT_RECORD_P| 00001520 4f 49 4e 54 45 52 2d 3e 61 69 72 77 6f 72 6b 2c |OINTER->airwork,| 00001530 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e | win_data[0].win| 00001540 5f 68 61 6e 64 6c 65 2c 20 41 49 52 57 4f 52 4b |_handle, AIRWORK| 00001550 5f 49 43 4f 4e 29 3b 0a 09 61 75 5f 69 63 6f 6e |_ICON);..au_icon| 00001560 5f 67 65 74 5f 74 65 78 74 28 43 55 52 52 45 4e |_get_text(CURREN| 00001570 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 |T_RECORD_POINTER| 00001580 2d 3e 72 65 6d 61 72 6b 73 31 2c 20 77 69 6e 5f |->remarks1, win_| 00001590 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 |data[0].win_hand| 000015a0 6c 65 2c 20 52 45 4d 41 52 4b 53 31 5f 49 43 4f |le, REMARKS1_ICO| 000015b0 4e 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 67 65 74 |N);..au_icon_get| 000015c0 5f 74 65 78 74 28 43 55 52 52 45 4e 54 5f 52 45 |_text(CURRENT_RE| 000015d0 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 |CORD_POINTER->re| 000015e0 6d 61 72 6b 73 32 2c 20 77 69 6e 5f 64 61 74 61 |marks2, win_data| 000015f0 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 |[0].win_handle, | 00001600 52 45 4d 41 52 4b 53 32 5f 49 43 4f 4e 29 3b 0a |REMARKS2_ICON);.| 00001610 09 2f 2a 20 57 65 20 6e 65 65 64 20 74 6f 20 63 |./* We need to c| 00001620 6f 6e 76 65 72 74 20 74 65 78 74 20 74 6f 20 69 |onvert text to i| 00001630 6e 74 65 67 65 72 20 68 65 72 65 20 2a 2f 0a 09 |nteger here */..| 00001640 61 75 5f 69 63 6f 6e 5f 67 65 74 5f 74 65 78 74 |au_icon_get_text| 00001650 28 74 65 6d 70 5f 62 75 66 2c 20 77 69 6e 5f 64 |(temp_buf, win_d| 00001660 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c |ata[0].win_handl| 00001670 65 2c 20 41 4c 54 49 54 55 44 45 5f 49 43 4f 4e |e, ALTITUDE_ICON| 00001680 29 3b 0a 09 43 55 52 52 45 4e 54 5f 52 45 43 4f |);..CURRENT_RECO| 00001690 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 61 6c 74 69 |RD_POINTER->alti| 000016a0 74 75 64 65 20 3d 20 61 74 6f 69 28 74 65 6d 70 |tude = atoi(temp| 000016b0 5f 62 75 66 29 3b 0a 0a 09 2f 2a 20 41 6e 64 20 |_buf);.../* And | 000016c0 68 65 72 65 20 2a 2f 0a 09 61 75 5f 69 63 6f 6e |here */..au_icon| 000016d0 5f 67 65 74 5f 74 65 78 74 28 74 65 6d 70 5f 62 |_get_text(temp_b| 000016e0 75 66 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e |uf, win_data[0].| 000016f0 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 44 45 4c 41 |win_handle, DELA| 00001700 59 5f 49 43 4f 4e 29 3b 0a 09 43 55 52 52 45 4e |Y_ICON);..CURREN| 00001710 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 |T_RECORD_POINTER| 00001720 2d 3e 64 65 6c 61 79 20 3d 20 61 74 6f 69 28 74 |->delay = atoi(t| 00001730 65 6d 70 5f 62 75 66 29 3b 0a 09 2f 2a 20 52 65 |emp_buf);../* Re| 00001740 63 6f 72 64 20 69 73 20 6e 6f 77 20 73 61 76 65 |cord is now save| 00001750 64 20 69 6e 20 6d 65 6d 6f 72 79 20 2a 2f 0a 0a |d in memory */..| 00001760 09 2f 2a 20 41 72 65 20 77 65 20 6f 6e 20 74 68 |./* Are we on th| 00001770 65 20 6c 61 73 74 20 72 65 63 6f 72 64 3f 20 49 |e last record? I| 00001780 66 20 73 6f 2c 20 77 65 20 61 64 64 20 61 20 6e |f so, we add a n| 00001790 65 77 20 6f 6e 65 20 2a 2f 0a 09 69 66 20 28 43 |ew one */..if (C| 000017a0 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 000017b0 49 4e 54 45 52 2d 3e 6e 65 78 74 5f 72 65 63 6f |INTER->next_reco| 000017c0 72 64 20 3d 3d 20 4e 55 4c 4c 29 20 7b 0a 09 09 |rd == NULL) {...| 000017d0 61 64 64 5f 72 65 63 6f 72 64 28 29 3b 0a 09 7d |add_record();..}| 000017e0 0a 7d 0a 0a 76 6f 69 64 20 61 64 64 5f 72 65 63 |.}..void add_rec| 000017f0 6f 72 64 28 76 6f 69 64 29 0a 7b 0a 09 6a 75 6d |ord(void).{..jum| 00001800 70 5f 64 61 74 61 09 2a 6e 65 77 5f 72 65 63 6f |p_data.*new_reco| 00001810 72 64 3b 0a 0a 09 2f 2a 49 6e 66 6f 72 6d 61 74 |rd;.../*Informat| 00001820 69 6f 6e 20 66 72 6f 6d 20 77 69 6e 64 6f 77 20 |ion from window | 00001830 61 6c 72 65 61 64 79 20 73 61 76 65 64 20 2a 2f |already saved */| 00001840 0a 0a 09 6e 65 77 5f 72 65 63 6f 72 64 20 3d 20 |...new_record = | 00001850 63 61 6c 6c 6f 63 28 31 2c 20 73 69 7a 65 6f 66 |calloc(1, sizeof| 00001860 28 6a 75 6d 70 5f 64 61 74 61 29 29 3b 0a 09 2f |(jump_data));../| 00001870 2a 20 49 6e 69 74 69 61 6c 69 73 65 20 70 6f 69 |* Initialise poi| 00001880 6e 74 65 72 73 20 2a 2f 0a 09 6e 65 77 5f 72 65 |nters */..new_re| 00001890 63 6f 72 64 2d 3e 70 72 65 76 5f 72 65 63 6f 72 |cord->prev_recor| 000018a0 64 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 43 4f |d = CURRENT_RECO| 000018b0 52 44 5f 50 4f 49 4e 54 45 52 3b 0a 09 6e 65 77 |RD_POINTER;..new| 000018c0 5f 72 65 63 6f 72 64 2d 3e 6e 65 78 74 5f 72 65 |_record->next_re| 000018d0 63 6f 72 64 20 3d 20 4e 55 4c 4c 3b 0a 09 4c 41 |cord = NULL;..LA| 000018e0 53 54 5f 52 45 43 4f 52 44 5f 4e 55 4d 42 45 52 |ST_RECORD_NUMBER| 000018f0 20 3d 20 6e 65 77 5f 72 65 63 6f 72 64 2d 3e 6a | = new_record->j| 00001900 75 6d 70 5f 6e 6f 20 3d 20 43 55 52 52 45 4e 54 |ump_no = CURRENT| 00001910 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 00001920 3e 6a 75 6d 70 5f 6e 6f 20 2b 20 31 3b 0a 09 43 |>jump_no + 1;..C| 00001930 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 00001940 49 4e 54 45 52 2d 3e 6e 65 78 74 5f 72 65 63 6f |INTER->next_reco| 00001950 72 64 20 3d 20 6e 65 77 5f 72 65 63 6f 72 64 3b |rd = new_record;| 00001960 0a 0a 09 2f 2a 20 53 77 69 74 63 68 20 76 69 65 |.../* Switch vie| 00001970 77 20 74 6f 20 74 68 65 20 6e 65 77 20 72 65 63 |w to the new rec| 00001980 6f 72 64 20 2a 2f 0a 09 43 55 52 52 45 4e 54 5f |ord */..CURRENT_| 00001990 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 20 3d |RECORD_POINTER =| 000019a0 20 6e 65 77 5f 72 65 63 6f 72 64 3b 0a 09 43 55 | new_record;..CU| 000019b0 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 4e 55 4d |RRENT_RECORD_NUM| 000019c0 42 45 52 20 3d 20 43 55 52 52 45 4e 54 5f 52 45 |BER = CURRENT_RE| 000019d0 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 6a 75 |CORD_POINTER->ju| 000019e0 6d 70 5f 6e 6f 3b 0a 0a 09 2f 2a 20 55 70 64 61 |mp_no;.../* Upda| 000019f0 74 65 20 74 68 65 20 77 69 6e 64 6f 77 20 74 6f |te the window to| 00001a00 20 64 69 73 70 6c 61 79 20 74 68 65 20 6e 65 77 | display the new| 00001a10 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 2a 2f 0a | information */.| 00001a20 09 75 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 |.update_window_i| 00001a30 6e 66 6f 28 29 3b 0a 7d 0a 0a 76 6f 69 64 20 75 |nfo();.}..void u| 00001a40 70 64 61 74 65 5f 77 69 6e 64 6f 77 5f 69 6e 66 |pdate_window_inf| 00001a50 6f 28 76 6f 69 64 29 0a 7b 0a 09 63 68 61 72 09 |o(void).{..char.| 00001a60 74 65 6d 70 5f 73 74 72 69 6e 67 5b 32 35 35 5d |temp_string[255]| 00001a70 3b 0a 0a 09 61 75 5f 6c 6f 73 65 63 61 72 65 74 |;...au_losecaret| 00001a80 28 29 3b 0a 09 69 66 20 28 43 55 52 52 45 4e 54 |();..if (CURRENT| 00001a90 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d |_RECORD_POINTER-| 00001aa0 3e 6e 65 78 74 5f 72 65 63 6f 72 64 20 3d 3d 20 |>next_record == | 00001ab0 4e 55 4c 4c 29 20 7b 0a 09 09 61 75 5f 69 63 6f |NULL) {...au_ico| 00001ac0 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 28 22 41 |n_text_change("A| 00001ad0 64 64 22 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d |dd", win_data[0]| 00001ae0 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 55 50 44 |.win_handle, UPD| 00001af0 41 54 45 5f 49 43 4f 4e 29 3b 0a 09 7d 20 65 6c |ATE_ICON);..} el| 00001b00 73 65 20 7b 0a 09 09 61 75 5f 69 63 6f 6e 5f 74 |se {...au_icon_t| 00001b10 65 78 74 5f 63 68 61 6e 67 65 28 22 55 70 64 61 |ext_change("Upda| 00001b20 74 65 22 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d |te", win_data[0]| 00001b30 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 55 50 44 |.win_handle, UPD| 00001b40 41 54 45 5f 49 43 4f 4e 29 3b 0a 09 7d 0a 09 73 |ATE_ICON);..}..s| 00001b50 70 72 69 6e 74 66 28 74 65 6d 70 5f 73 74 72 69 |printf(temp_stri| 00001b60 6e 67 2c 20 22 25 64 22 2c 20 43 55 52 52 45 4e |ng, "%d", CURREN| 00001b70 54 5f 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 |T_RECORD_POINTER| 00001b80 2d 3e 6a 75 6d 70 5f 6e 6f 29 3b 0a 09 61 75 5f |->jump_no);..au_| 00001b90 69 63 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 |icon_text_change| 00001ba0 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c 20 77 69 |(temp_string, wi| 00001bb0 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 |n_data[0].win_ha| 00001bc0 6e 64 6c 65 2c 20 43 55 52 52 45 4e 54 5f 52 45 |ndle, CURRENT_RE| 00001bd0 43 4f 52 44 5f 49 43 4f 4e 29 3b 0a 09 73 70 72 |CORD_ICON);..spr| 00001be0 69 6e 74 66 28 74 65 6d 70 5f 73 74 72 69 6e 67 |intf(temp_string| 00001bf0 2c 20 22 25 64 22 2c 20 4c 41 53 54 5f 52 45 43 |, "%d", LAST_REC| 00001c00 4f 52 44 5f 4e 55 4d 42 45 52 29 3b 0a 09 61 75 |ORD_NUMBER);..au| 00001c10 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 |_icon_text_chang| 00001c20 65 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c 20 77 |e(temp_string, w| 00001c30 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 |in_data[0].win_h| 00001c40 61 6e 64 6c 65 2c 20 4c 41 53 54 5f 52 45 43 4f |andle, LAST_RECO| 00001c50 52 44 5f 49 43 4f 4e 29 3b 0a 0a 09 61 75 5f 69 |RD_ICON);...au_i| 00001c60 63 6f 6e 5f 74 65 78 74 5f 63 68 61 6e 67 65 28 |con_text_change(| 00001c70 43 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 |CURRENT_RECORD_P| 00001c80 4f 49 4e 54 45 52 2d 3e 64 61 74 65 20 2c 20 77 |OINTER->date , w| 00001c90 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 |in_data[0].win_h| 00001ca0 61 6e 64 6c 65 2c 20 44 41 54 45 5f 49 43 4f 4e |andle, DATE_ICON| 00001cb0 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 |);..au_icon_text| 00001cc0 5f 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f |_change(CURRENT_| 00001cd0 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001ce0 61 69 72 63 72 61 66 74 20 2c 20 77 69 6e 5f 64 |aircraft , win_d| 00001cf0 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c |ata[0].win_handl| 00001d00 65 2c 20 41 49 52 43 52 41 46 54 5f 49 43 4f 4e |e, AIRCRAFT_ICON| 00001d10 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 |);..au_icon_text| 00001d20 5f 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f |_change(CURRENT_| 00001d30 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001d40 64 72 6f 70 7a 6f 6e 65 20 2c 20 77 69 6e 5f 64 |dropzone , win_d| 00001d50 61 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c |ata[0].win_handl| 00001d60 65 2c 20 44 52 4f 50 5a 4f 4e 45 5f 49 43 4f 4e |e, DROPZONE_ICON| 00001d70 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 |);..au_icon_text| 00001d80 5f 63 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f |_change(CURRENT_| 00001d90 52 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e |RECORD_POINTER->| 00001da0 61 69 72 77 6f 72 6b 20 2c 20 77 69 6e 5f 64 61 |airwork , win_da| 00001db0 74 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 |ta[0].win_handle| 00001dc0 2c 20 41 49 52 57 4f 52 4b 5f 49 43 4f 4e 29 3b |, AIRWORK_ICON);| 00001dd0 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 |..au_icon_text_c| 00001de0 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 45 |hange(CURRENT_RE| 00001df0 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 |CORD_POINTER->re| 00001e00 6d 61 72 6b 73 31 20 2c 20 77 69 6e 5f 64 61 74 |marks1 , win_dat| 00001e10 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c |a[0].win_handle,| 00001e20 20 52 45 4d 41 52 4b 53 31 5f 49 43 4f 4e 29 3b | REMARKS1_ICON);| 00001e30 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 |..au_icon_text_c| 00001e40 68 61 6e 67 65 28 43 55 52 52 45 4e 54 5f 52 45 |hange(CURRENT_RE| 00001e50 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 72 65 |CORD_POINTER->re| 00001e60 6d 61 72 6b 73 32 20 2c 20 77 69 6e 5f 64 61 74 |marks2 , win_dat| 00001e70 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c |a[0].win_handle,| 00001e80 20 52 45 4d 41 52 4b 53 32 5f 49 43 4f 4e 29 3b | REMARKS2_ICON);| 00001e90 0a 0a 09 73 70 72 69 6e 74 66 28 74 65 6d 70 5f |...sprintf(temp_| 00001ea0 73 74 72 69 6e 67 2c 20 22 25 64 22 2c 20 43 55 |string, "%d", CU| 00001eb0 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f 49 |RRENT_RECORD_POI| 00001ec0 4e 54 45 52 2d 3e 61 6c 74 69 74 75 64 65 29 3b |NTER->altitude);| 00001ed0 0a 09 61 75 5f 69 63 6f 6e 5f 74 65 78 74 5f 63 |..au_icon_text_c| 00001ee0 68 61 6e 67 65 28 74 65 6d 70 5f 73 74 72 69 6e |hange(temp_strin| 00001ef0 67 2c 20 77 69 6e 5f 64 61 74 61 5b 30 5d 2e 77 |g, win_data[0].w| 00001f00 69 6e 5f 68 61 6e 64 6c 65 2c 20 41 4c 54 49 54 |in_handle, ALTIT| 00001f10 55 44 45 5f 49 43 4f 4e 29 3b 0a 09 73 70 72 69 |UDE_ICON);..spri| 00001f20 6e 74 66 28 74 65 6d 70 5f 73 74 72 69 6e 67 2c |ntf(temp_string,| 00001f30 20 22 25 64 22 2c 20 43 55 52 52 45 4e 54 5f 52 | "%d", CURRENT_R| 00001f40 45 43 4f 52 44 5f 50 4f 49 4e 54 45 52 2d 3e 64 |ECORD_POINTER->d| 00001f50 65 6c 61 79 29 3b 0a 09 61 75 5f 69 63 6f 6e 5f |elay);..au_icon_| 00001f60 74 65 78 74 5f 63 68 61 6e 67 65 28 74 65 6d 70 |text_change(temp| 00001f70 5f 73 74 72 69 6e 67 2c 20 77 69 6e 5f 64 61 74 |_string, win_dat| 00001f80 61 5b 30 5d 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c |a[0].win_handle,| 00001f90 20 44 45 4c 41 59 5f 49 43 4f 4e 29 3b 0a 09 72 | DELAY_ICON);..r| 00001fa0 65 74 75 72 6e 3b 0a 7d 0a 0a 76 6f 69 64 20 6f |eturn;.}..void o| 00001fb0 70 65 6e 5f 6d 61 69 6e 5f 77 69 6e 64 6f 77 28 |pen_main_window(| 00001fc0 76 6f 69 64 29 0a 7b 0a 09 5f 6b 65 72 6e 65 6c |void).{.._kernel| 00001fd0 5f 73 77 69 5f 72 65 67 73 09 69 6e 2c 20 6f 75 |_swi_regs.in, ou| 00001fe0 74 3b 0a 09 75 6e 73 69 67 6e 65 64 20 63 68 61 |t;..unsigned cha| 00001ff0 72 09 74 65 6d 70 5f 62 75 66 66 65 72 5b 31 30 |r.temp_buffer[10| 00002000 32 34 5d 3b 0a 0a 2f 2a 20 57 65 20 6e 65 65 64 |24];../* We need| 00002010 20 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 63 | to update the c| 00002020 75 72 72 65 6e 74 20 61 6e 64 20 6c 61 73 74 20 |urrent and last | 00002030 72 65 63 6f 72 64 20 6e 75 6d 62 65 72 73 20 69 |record numbers i| 00002040 6e 20 74 68 65 20 77 69 6e 64 6f 77 0a 20 2a 20 |n the window. * | 00002050 62 65 66 6f 72 65 20 6f 70 65 6e 69 6e 67 20 2a |before opening *| 00002060 2f 0a 0a 09 75 70 64 61 74 65 5f 77 69 6e 64 6f |/...update_windo| 00002070 77 5f 69 6e 66 6f 28 29 3b 0a 0a 2f 2a 20 4e 6f |w_info();../* No| 00002080 77 20 6f 70 65 6e 20 74 68 65 20 77 69 6e 64 6f |w open the windo| 00002090 77 20 2a 2f 0a 0a 09 61 75 5f 77 6f 72 64 74 6f |w */...au_wordto| 000020a0 62 79 74 65 28 77 69 6e 5f 64 61 74 61 5b 30 5d |byte(win_data[0]| 000020b0 2e 77 69 6e 5f 68 61 6e 64 6c 65 2c 20 74 65 6d |.win_handle, tem| 000020c0 70 5f 62 75 66 66 65 72 2c 20 30 29 3b 0a 09 69 |p_buffer, 0);..i| 000020d0 6e 2e 72 5b 31 5d 20 3d 20 28 69 6e 74 29 20 74 |n.r[1] = (int) t| 000020e0 65 6d 70 5f 62 75 66 66 65 72 3b 0a 09 5f 6b 65 |emp_buffer;.._ke| 000020f0 72 6e 65 6c 5f 73 77 69 28 57 69 6d 70 5f 47 65 |rnel_swi(Wimp_Ge| 00002100 74 57 69 6e 64 6f 77 49 6e 66 6f 2c 20 26 69 6e |tWindowInfo, &in| 00002110 2c 20 26 6f 75 74 29 3b 0a 09 5f 6b 65 72 6e 65 |, &out);.._kerne| 00002120 6c 5f 73 77 69 28 57 69 6d 70 5f 4f 70 65 6e 57 |l_swi(Wimp_OpenW| 00002130 69 6e 64 6f 77 2c 20 26 69 6e 2c 20 26 6f 75 74 |indow, &in, &out| 00002140 29 3b 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a 76 |);..return;.}..v| 00002150 6f 69 64 20 77 69 6d 70 5f 6d 73 67 28 69 6e 74 |oid wimp_msg(int| 00002160 20 72 65 73 75 6c 74 2c 20 75 6e 73 69 67 6e 65 | result, unsigne| 00002170 64 20 63 68 61 72 20 70 6f 6c 6c 62 6c 6f 63 6b |d char pollblock| 00002180 5b 5d 29 0a 7b 0a 09 75 6e 73 69 67 6e 65 64 20 |[]).{..unsigned | 00002190 6c 6f 6e 67 20 69 6e 74 20 20 20 6d 65 73 73 61 |long int messa| 000021a0 67 65 5f 61 63 74 69 6f 6e 3b 0a 09 0a 09 2f 2a |ge_action;..../*| 000021b0 20 54 68 65 20 6e 65 78 74 20 6c 69 6e 65 20 74 | The next line t| 000021c0 61 6b 65 73 20 62 79 74 65 73 20 31 36 20 74 6f |akes bytes 16 to| 000021d0 20 31 39 20 6f 66 20 74 68 65 20 70 6f 6c 6c 69 | 19 of the polli| 000021e0 6e 67 20 62 6c 6f 63 6b 20 61 6e 64 20 66 6f 72 |ng block and for| 000021f0 6d 73 20 74 68 65 6d 0a 09 20 20 20 69 6e 74 6f |ms them.. into| 00002200 20 61 20 77 6f 72 64 20 68 6f 6c 64 69 6e 67 20 | a word holding | 00002210 74 68 65 20 6d 65 73 73 61 67 65 20 61 63 74 69 |the message acti| 00002220 6f 6e 20 6e 75 6d 62 65 72 20 2a 2f 0a 09 6d 65 |on number */..me| 00002230 73 73 61 67 65 5f 61 63 74 69 6f 6e 20 3d 20 61 |ssage_action = a| 00002240 75 5f 62 79 74 65 74 6f 77 6f 72 64 28 70 6f 6c |u_bytetoword(pol| 00002250 6c 62 6c 6f 63 6b 2c 20 31 36 29 3b 0a 0a 09 73 |lblock, 16);...s| 00002260 77 69 74 63 68 20 28 6d 65 73 73 61 67 65 5f 61 |witch (message_a| 00002270 63 74 69 6f 6e 29 20 7b 0a 09 09 63 61 73 65 20 |ction) {...case | 00002280 30 20 3a 20 51 55 49 54 5f 46 4c 41 47 20 3d 20 |0 : QUIT_FLAG = | 00002290 31 3b 20 2f 2a 20 4d 65 73 73 61 67 65 5f 51 75 |1; /* Message_Qu| 000022a0 69 74 20 2d 20 74 69 6d 65 20 74 6f 20 67 6f 20 |it - time to go | 000022b0 2a 2f 0a 09 09 09 09 62 72 65 61 6b 3b 0a 09 7d |*/.....break;..}| 000022c0 0a 09 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 76 6f |..return;.}...vo| 000022d0 69 64 20 6f 70 65 6e 77 69 6e 64 6f 77 28 75 6e |id openwindow(un| 000022e0 73 69 67 6e 65 64 20 63 68 61 72 20 70 6f 6c 6c |signed char poll| 000022f0 62 6c 6f 63 6b 5b 5d 29 0a 7b 0a 20 20 20 5f 6b |block[]).{. _k| 00002300 65 72 6e 65 6c 5f 73 77 69 5f 72 65 67 73 20 69 |ernel_swi_regs i| 00002310 6e 2c 20 6f 75 74 3b 0a 0a 20 20 20 69 6e 2e 72 |n, out;.. in.r| 00002320 5b 31 5d 20 3d 20 28 69 6e 74 29 20 70 6f 6c 6c |[1] = (int) poll| 00002330 62 6c 6f 63 6b 3b 0a 20 20 20 5f 6b 65 72 6e 65 |block;. _kerne| 00002340 6c 5f 73 77 69 28 57 69 6d 70 5f 4f 70 65 6e 57 |l_swi(Wimp_OpenW| 00002350 69 6e 64 6f 77 2c 20 26 69 6e 2c 20 26 6f 75 74 |indow, &in, &out| 00002360 29 3b 0a 20 20 20 72 65 74 75 72 6e 3b 0a 7d 0a |);. return;.}.| 00002370 0a 76 6f 69 64 20 63 6c 6f 73 65 77 69 6e 64 6f |.void closewindo| 00002380 77 28 75 6e 73 69 67 6e 65 64 20 63 68 61 72 20 |w(unsigned char | 00002390 70 6f 6c 6c 62 6c 6f 63 6b 5b 5d 29 0a 7b 0a 20 |pollblock[]).{. | 000023a0 20 20 5f 6b 65 72 6e 65 6c 5f 73 77 69 5f 72 65 | _kernel_swi_re| 000023b0 67 73 20 69 6e 2c 20 6f 75 74 3b 0a 0a 20 20 20 |gs in, out;.. | 000023c0 69 6e 2e 72 5b 31 5d 20 3d 20 28 69 6e 74 29 20 |in.r[1] = (int) | 000023d0 70 6f 6c 6c 62 6c 6f 63 6b 3b 0a 20 20 20 5f 6b |pollblock;. _k| 000023e0 65 72 6e 65 6c 5f 73 77 69 28 57 69 6d 70 5f 43 |ernel_swi(Wimp_C| 000023f0 6c 6f 73 65 57 69 6e 64 6f 77 2c 20 26 69 6e 2c |loseWindow, &in,| 00002400 20 26 6f 75 74 29 3b 0a 20 20 20 72 65 74 75 72 | &out);. retur| 00002410 6e 3b 0a 7d 0a 0a 76 6f 69 64 20 6c 6f 61 64 74 |n;.}..void loadt| 00002420 65 6d 70 6c 61 74 65 73 28 76 6f 69 64 29 0a 7b |emplates(void).{| 00002430 0a 09 61 75 5f 6f 70 65 6e 74 65 6d 70 6c 61 74 |..au_opentemplat| 00002440 65 28 22 3c 52 41 50 53 24 44 69 72 3e 2e 54 65 |e("<RAPS$Dir>.Te| 00002450 6d 70 6c 61 74 65 73 22 29 3b 0a 09 69 66 28 61 |mplates");..if(a| 00002460 75 5f 6c 6f 61 64 74 65 6d 70 6c 61 74 65 28 22 |u_loadtemplate("| 00002470 4d 61 69 6e 57 69 6e 64 6f 77 22 2c 20 26 77 69 |MainWindow", &wi| 00002480 6e 5f 64 61 74 61 5b 30 5d 2c 20 30 29 20 3d 3d |n_data[0], 0) ==| 00002490 20 30 29 20 7b 0a 09 09 61 75 5f 72 65 70 6f 72 | 0) {...au_repor| 000024a0 74 5f 65 72 72 6f 72 28 31 2c 20 22 54 65 6d 70 |t_error(1, "Temp| 000024b0 6c 61 74 65 20 6e 6f 74 20 66 6f 75 6e 64 21 22 |late not found!"| 000024c0 2c 20 31 2c 20 61 70 70 6e 61 6d 65 29 3b 0a 09 |, 1, appname);..| 000024d0 09 51 55 49 54 5f 46 4c 41 47 20 3d 20 31 3b 0a |.QUIT_FLAG = 1;.| 000024e0 09 7d 0a 09 69 66 28 61 75 5f 6c 6f 61 64 74 65 |.}..if(au_loadte| 000024f0 6d 70 6c 61 74 65 28 22 50 72 6f 67 49 6e 66 6f |mplate("ProgInfo| 00002500 22 2c 20 26 77 69 6e 5f 64 61 74 61 5b 31 5d 2c |", &win_data[1],| 00002510 20 30 29 20 3d 3d 20 30 29 20 7b 0a 09 09 61 75 | 0) == 0) {...au| 00002520 5f 72 65 70 6f 72 74 5f 65 72 72 6f 72 28 31 2c |_report_error(1,| 00002530 20 22 54 65 6d 70 6c 61 74 65 20 6e 6f 74 20 66 | "Template not f| 00002540 6f 75 6e 64 21 22 2c 20 31 2c 20 61 70 70 6e 61 |ound!", 1, appna| 00002550 6d 65 29 3b 0a 09 09 51 55 49 54 5f 46 4c 41 47 |me);...QUIT_FLAG| 00002560 20 3d 20 31 3b 0a 09 7d 0a 09 61 75 5f 63 6c 6f | = 1;..}..au_clo| 00002570 73 65 74 65 6d 70 6c 61 74 65 28 29 3b 0a 7d 0a |setemplate();.}.| 00002580 0a 76 6f 69 64 20 73 65 74 75 70 5f 64 61 74 61 |.void setup_data| 00002590 62 61 73 65 28 76 6f 69 64 29 0a 7b 0a 0a 09 2f |base(void).{.../| 000025a0 2a 20 49 6e 69 74 69 61 6c 6c 79 2c 20 77 65 20 |* Initially, we | 000025b0 6e 65 65 64 20 74 6f 20 73 65 74 20 61 73 69 64 |need to set asid| 000025c0 65 20 6d 65 6d 6f 72 79 20 66 6f 72 20 74 68 65 |e memory for the| 000025d0 20 27 72 6f 6f 74 27 20 73 74 72 75 63 74 75 72 | 'root' structur| 000025e0 65 20 2a 2f 0a 0a 09 6a 6d 70 5f 64 61 74 61 5f |e */...jmp_data_| 000025f0 72 6f 6f 74 20 3d 20 63 61 6c 6c 6f 63 28 31 2c |root = calloc(1,| 00002600 20 73 69 7a 65 6f 66 28 6a 75 6d 70 5f 64 61 74 | sizeof(jump_dat| 00002610 61 29 29 3b 0a 09 2f 2a 20 49 6e 69 74 69 61 6c |a));../* Initial| 00002620 69 73 65 20 70 6f 69 6e 74 65 72 73 20 2a 2f 0a |ise pointers */.| 00002630 09 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f 74 2d 3e |.jmp_data_root->| 00002640 70 72 65 76 5f 72 65 63 6f 72 64 20 3d 20 6a 6d |prev_record = jm| 00002650 70 5f 64 61 74 61 5f 72 6f 6f 74 2d 3e 6e 65 78 |p_data_root->nex| 00002660 74 5f 72 65 63 6f 72 64 20 3d 20 4e 55 4c 4c 3b |t_record = NULL;| 00002670 0a 09 6a 6d 70 5f 64 61 74 61 5f 72 6f 6f 74 2d |..jmp_data_root-| 00002680 3e 6a 75 6d 70 5f 6e 6f 20 3d 20 31 3b 0a 09 43 |>jump_no = 1;..C| 00002690 55 52 52 45 4e 54 5f 52 45 43 4f 52 44 5f 50 4f |URRENT_RECORD_PO| 000026a0 49 4e 54 45 52 20 3d 20 6a 6d 70 5f 64 61 74 61 |INTER = jmp_data| 000026b0 5f 72 6f 6f 74 3b 0a 7d 0a |_root;.}.| 000026b9
.