Home » Archimedes archive » Archimedes World » AW-1993-01.adf » AWJan93 » !AWJan93/Goodies/Calendar/!MyCaldr/!RunImage

!AWJan93/Goodies/Calendar/!MyCaldr/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1993-01.adf » AWJan93
Filename: !AWJan93/Goodies/Calendar/!MyCaldr/!RunImage
Read OK:
File size: 35D3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > !RunImage
   20REM Personal Calendar Printing Program (Multitasking Version)
   30REM Last Edited 25/9/92:Date Checked 4.10.92.
   40REM Author Frank Clayton
   50REM Copyright Archimedes World 1992
   60:
   70ON ERROR PROCerror:END
   80size%=6                       :REM Size of text in preview (Points)
   90currentyear$=RIGHT$(LEFT$(TIME$,INSTR(TIME$,".")-1),4)
  100cent%=VAL(currentyear$)/100
  110cent%=cent%*100
  120tickflag%=0
  130ll%=65:REM Printed line length
  140CR$=CHR$(13)
  150LF$=CHR$(10)
  160FF$=CHR$(12)
  170Bell$=CHR$(7)
  180b$=STRING$(ll%,"_")+CR$+LF$
  190pad$=STRING$(60," ")
  200xp%=0     :REM Printer offsett*****************************************
  210DIM aline$(36)        :REM Array to hold output page
  220DIM daysofmonth(12)
  230daysofmonth()=0,31,28,31,30,31,30,31,31,30,31,30,31
  240REM Dummy Month at beginning of array ie month 0
  250DIM DaysGone%(11)
  260DaysGone%()=0,31,59,90,120,151,181,212,243,273,304,334
  270DIM month$(12)
  280month$()="","January","February","March","April","May","June","July","August","September","October","November","December": REM Dummy month at begining of array.
  290: 
  300DIM day$(6)
  310day$()="Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"
  320DIM c$(11,41),line$(5)
  330sp$="  " :REM Spacing character for calander months
  340adays$="Su  M Tu  W Th  F Sa"
  350REM Printer High Resolution Definitions Start Here
  360DIM trans% 16,rect% 16,plotat% 8,rectin% 16
  370:
  380S=OPENIN "<Diary$Dir>.!Sprites"
  390T%=EXT#S+16:CLOSE#S:REM Get Sprite File Length
  400DIM sprites% T%      :REM And Reserve space for data
  410!sprites%=T%:sprites%!8=1
  420SYS "OS_SpriteOp",&109,sprites%     :REM Initialise Sprite Area
  430SYS "OS_SpriteOp",&10A,sprites%,"<Diary$Dir>.!Sprites"
  440DIM block% &1000, wa% &800,sp% &800, menu% &800,mu% &800
  450wamax%=wa%+&800
  460printflag%=FALSE
  470quit%=FALSE
  480l1%=10
  490l2%=19
  500l3%=28
  510PROCclear(aline$())    :REM Null the array
  520$block%="TASK"  :REM Set the first four bytes of block TASK
  530SYS "Wimp_Initialise",200,!block%,"DiaryPrinter" TO version%,task%
  540 SYS"Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
  550 SYS"Wimp_LoadTemplate",,block%,wa%,wamax%,-1,"main",0 TO ,,wapoint%
  560 SYS"Wimp_CreateWindow",,block% TO whandle%
  570 SYS"Wimp_LoadTemplate",,block%,wapoint%,wamax%,-1,"datainfo",0 TO,,wapoint%
  580 SYS"Wimp_CreateWindow",,block% TO muhandle%
  590 SYS"Wimp_CloseTemplate"
  600 pointer%=FNgetpointer(whandle%,2)
  610 $pointer%=currentyear$
  620 sp%!0=whandle%:sp%!4=2:sp%!8=0:sp%!12=0
  630 SYS"Wimp_SetIconState",,sp%
  640block%!0=whandle%  :REM first pram tells which window to operate on
  650block%!0=-1                        :REM Put on icon bar
  660block%!4=0
  670block%!8=0
  680block%!12=63
  690block%!16=68
  700block%!20=&2102
  710spname$="!mycaldr"
  720DIM block%!24 (LEN(spname$)+1)
  730$(block%!24)=spname$
  740block%!28=sprites%
  750block%!32=(LEN(spname$)+1)
  760SYS "Wimp_CreateIcon",,block% TO icon%
  770ON ERROR IF FNwimperror THEN END
  780WHILE TRUE
  790PROCpoll :REM  This is the WIMP POLL
  800ENDWHILE    :REM until quit reset to TRUE by Procedure
  810 END
  820DEFPROCpoll
  830SYS "Wimp_Poll",&1830,block% TO reason%
  840CASE reason% OF
  850   WHEN 0     :IF printflag% THEN PROCprinter
  860   WHEN 2     :SYS "Wimp_OpenWindow",,block%
  870   WHEN 3     :SYS "Wimp_CloseWindow",,block%
  880   WHEN 6     :PROCclick
  890   WHEN 8     :PROCkeypress
  900   WHEN 9     :PROCmenuchoice
  910   WHEN 17,18 :PROCmessage_received
  920ENDCASE
  930ENDPROC
  940:
  950DEFPROCrewrite(sx%,sy%)
  960SYS "Font_SetFont",fhdl%
  970SYS "Wimp_SetFontColours",,0,7
  980LOCAL I%
  990SYS "Font_Converttopoints",,sx%,sy% TO ,sxp%,syp%
 1000FOR I%=0 TO 36 STEP 1
 1010SYS "Font_Paint",,aline$(I%),&0,sxp%,(syp%-linespace%*(I%+1))
 1020NEXT I%
 1030ENDPROC
 1040:
 1050DEFPROCmessage_received
 1060CASE block%!16 OF
 1070   WHEN 0   :printflag%=FALSE:PROCclose
 1080   WHEN 8   :PROCcheckclose
 1090ENDCASE
 1100ENDPROC
 1110:
 1120DEFPROCcheckclose
 1130block%!12=block%!8
 1140SYS "Wimp_SendMessage",19,block%,block%!4 :REM object to closedown
 1150IF FNquiterror THEN
 1160$block%="TASK"
 1170SYS "Wimp_CloseDown",task%,!block%
 1180ENDIF
 1190ENDPROC
 1200:
 1210DEFPROCmenuchoice
 1220choice%=!block%
 1230CASE choice% OF
 1240WHEN 1: PROCclose
 1250ENDCASE
 1260ENDPROC
 1270:
 1280DEFPROCgetorigin(block%,RETURN x0%,RETURN y0%)
 1290x0%=block%!4-block%!20
 1300y0%=block%!16-block%!24
 1310ENDPROC
 1320:
 1330DEFPROCclose
 1340quit%=TRUE
 1350IF printflag% THEN   quit%=FNquiterror
 1360IF quit% THEN
 1370$block%="TASK"
 1380SYS "Wimp_CloseDown",task%,!block%
 1390ENDIF
 1400ENDPROC
 1410:
 1420DEFPROCmainopen
 1430block%!0=whandle%
 1440SYS "Wimp_GetWindowState",,block%  :REM load block prams for open
 1450IF (block%!32 AND &10000)=0 THEN
 1460SYS "Wimp_OpenWindow",,block%      :REM draws window when task lets go
 1470ENDIF
 1480ENDPROC
 1490:
 1500DEFPROCshowmenu(x%,y%)
 1510$menu%="CalendarPrint"
 1520menu%?12=7:menu%?13=2
 1530menu%?14=7:menu%?15=0
 1540menu%!16=140:menu%!20=44
 1550menu%!24=0:ptr%=menu%+28
 1560      !ptr%=0
 1570      ptr%!4=muhandle%
 1580      ptr%!8=&7000021
 1590      $(ptr%+12)="Info"
 1600
 1610      ptr%+=24
 1620      !ptr%=&80:  REM Mark as Last Item in Menu
 1630      ptr%!4=-1
 1640      ptr%!8=&7000021
 1650      $(ptr%+12)="Quit"
 1660SYS "Wimp_CreateMenu",,menu%,x%-64,y%+184
 1670ENDPROC
 1680:
 1690DEFFNgetpointer(wh%,ih%)
 1700!sp%=wh%:sp%!4=ih%
 1710SYS"Wimp_GetIconState",,sp%
 1720=sp%!28
 1730:
 1740DEFPROCclick
 1750xm%=!block%:ym%=block%!4         :REM Mouse positions
 1760IF block%!12=whandle% AND printflag%<>TRUE THEN
 1770   button%=block%!8 AND 7
 1780   CASE block%!16  OF
 1790      WHEN 1: IF button%=4 THEN PROCupdateicon(whandle%,2,1)
 1800              IF button%=1 THEN PROCupdateicon(whandle%,2,-1)
 1810      WHEN 3: IF button%=1 THEN PROCupdateicon(whandle%,2,1)
 1820              IF button%=4 THEN PROCupdateicon(whandle%,2,-1)
 1830      WHEN 4:printflag%=TRUE
 1840            pointer%=FNgetpointer(whandle%,12)
 1850            $pointer%="Printing"
 1860            sp%!0=whandle%:sp%!4=4:sp%!8=&A7000000:sp%!12=&FF000000
 1870            SYS "Wimp_SetIconState",,sp%
 1880            sp%!4=2:sp%!8=&0:sp%!12=&F000
 1890            SYS "Wimp_SetIconState",,sp%
 1900            SYS "Wimp_SetCaretPosition",-1 :REM Disown Caret
 1910   ENDCASE
 1920PROCupdateicons
 1930ENDIF
 1940SYS "Wimp_GetPointerInfo",,block%
 1950IF (block%!12=-2) AND (block%!8 AND 5) PROCmainopen:REM -2 is on icon bar
 1960SYS "Wimp_GetPointerInfo",,mu%
 1970IF (mu%!12=-2) AND (mu%!8 AND 2) PROCshowmenu(xm%,ym%)
 1980SYS "Wimp_GetPointerInfo",,block%
 1990ENDPROC
 2000:
 2010DEFPROCupdateicons
 2020pointer%=FNgetpointer(whandle%,2)
 2030temp$=$pointer%
 2040Y%=VAL(temp$)
 2050ENDPROC
 2060:
 2070DEFPROCkeypress
 2090IF (block%!4=2 OR block%!4=6 OR block%!4=10)AND block%!24=13 THEN PROCupdateicons:ENDPROC
 2110SYS "Wimp_ProcessKey",block%!24
 2130ENDPROC
 2140:
 2150DEFPROCprinter
 2160pointer%=FNgetpointer(whandle%,6)
 2170data$=$pointer%
 2180size%=size%*1000 :REM Size of text in millipoints
 2190linespace%=size%/10
 2200linespace%=linespace%*15
 2210SYS "Font_FindFont",,"Corpus.Medium",size%/65,size%/40 TO fhdl%
 2220size%=VAL(data$)
 2230PROCload_array(Y%)
 2240PROCprint_hr
 2250SYS "Font_LoseFont",fhdl%
 2260PROCchangesides
 2270ENDPROC
 2280:
 2290DEFPROCchangesides
 2300printflag%=FALSE
 2310   pointer%=FNgetpointer(whandle%,4)
 2320   message$="Again?"
 2330   $pointer%=message$
 2340   sp%!0=whandle%:sp%!4=4:sp%!8=&08000000:sp%!12=&FF000000
 2350   SYS "Wimp_SetIconState",,sp%
 2360   sp%!4=2:sp%!8=&F000:sp%!12=&F000
 2370   SYS "Wimp_SetIconState",,sp%
 2380PROCmainopen
 2390ENDPROC
 2400:
 2410DEFPROCupdateicon(whandle%,icon%,inc%)
 2420pointer%=FNgetpointer(whandle%,icon%)
 2430temp$=$pointer%
 2440temp%=VAL(temp$)
 2450temp%+=inc%
 2460temp$=STR$(temp%)
 2470$pointer%=temp$
 2480sp%!0=whandle%:sp%!4=icon%:sp%!8=0:sp%!12=0
 2490SYS "Wimp_SetIconState",,sp%
 2500ENDPROC
 2510:
 2520DEFPROCerror
 2530ON ERROR OFF
 2540$block%="TASK"
 2550SYS"Wimp_CloseDown",task%,!block%
 2560PRINT REPORT$; " at line ";ERL
 2570ENDPROC
 2580:
 2590DEFFNwimperror
 2600!block%=ERR
 2610$(block%+4)=REPORT$+" at line "+STR$ERL+CHR$(0)
 2620SYS "Wimp_ReportError",block%,3,"Calendar Printer" TO ,response%
 2630IF response%=2 THEN PROCclose:=TRUE
 2640ELSE
 2650=FALSE
 2660ENDIF
 2670:
 2680DEFFNquiterror
 2690!block%=ERR
 2700$(block%+4)="Printing in progress - Do you really want to quit ?"
 2710SYS "Wimp_ReportError",block%,&13,"Calendar Printer" TO ,response%
 2720IF response%=1 THEN
 2730=TRUE
 2740ELSE
 2750=FALSE
 2760ENDIF
 2770:
 2780DEFPROCdelay(n)
 2790TIME=0
 2800REPEAT UNTIL TIME>=n
 2810ENDPROC
 2820:
 2830DEFPROCdate(RETURN d%,RETURN m%,RETURN y%,RETURN dw%,RETURN dayno%)
 2840LOCAL y1%,m1%
 2850REM d is day of month, m is month, y is year, dw is day of week (0-6)
 2860IF y%<100 THEN y%+=cent%
 2870WHILE m%<1
 2880PROCdecyear(m%,y%)
 2890ENDWHILE
 2900WHILE m%>12
 2910PROCaddyear(m%,y%)
 2920ENDWHILE
 2930WHILE d%<1
 2940PROCsubmonth(d%,m%,y%)
 2950ENDWHILE
 2960WHILE d%> daysofmonth(m%)+FNleapyear(m%,y%)
 2970PROCaddmonth(d%,m%,y%)
 2980ENDWHILE
 2990dayno%=FNday(d%,m%,y%)
 3000dw%=dayno%MOD7
 3010ENDPROC
 3020:
 3030DEFPROCdecyear(RETURN m%,RETURN y%)
 3040y%-=1
 3050m%+=12
 3060ENDPROC
 3070:
 3080DEFPROCaddyear(RETURN m%,RETURN y%)
 3090y%+=1
 3100m%-=12
 3110ENDPROC
 3120:
 3130DEFPROCsubmonth(RETURN d%,RETURN m%,RETURN y%)
 3140m%-=1
 3150IF m%<1 THEN PROCdecyear(m%,y%)
 3160d%+=daysofmonth(m%)+FNleapyear(m%,y%)
 3170ENDPROC
 3180:
 3190DEFPROCaddmonth(RETURN d%,RETURN m%,RETURN y%)
 3200d%-=(daysofmonth(m%)+FNleapyear(m%,y%))
 3210m%+=1
 3220IF m%>12 THEN PROCaddyear(m%,y%)
 3230ENDPROC
 3240:
 3250DEFFNleapyear(m%,y%)
 3260=((0=y%MOD4 AND (y%MOD100<>0 OR y%MOD400=0)) AND m%=2)*-1
 3270:
 3280DEFFNday(d%,m%,y%)
 3290=(365*y%+y%DIV4-y%DIV100+y%DIV400+DaysGone%(m%-1)-(FNleapyear(2,y%)=1 AND m%>2)+d%-2-FNleapyear(2,y%))
 3300:
 3310:
 3320DEFPROCclear(A$())
 3330LOCAL I%
 3340FOR I%=0 TO 35
 3350A$(I%)=CR$+LF$
 3360NEXT I%
 3370A$(36)=CR$
 3380ENDPROC
 3390:
 3400DEFPROCload_array(y%)
 3410PROCclear(aline$())
 3420aline$(0)=STR$(y%)+CR$+LF$
 3430aline$(1)=month$(1)
 3440aline$(2)=adays$+sp$+adays$+sp$+adays$+CR$+LF$
 3450PROCfillcalendar(1,y%)
 3460aline$(3)=RIGHT$(line$(0),20)
 3470aline$(4)=RIGHT$(line$(1),20)
 3480aline$(5)=RIGHT$(line$(2),20)
 3490aline$(6)=RIGHT$(line$(3),20)
 3500aline$(7)=RIGHT$(line$(4),20)
 3510aline$(8)=RIGHT$(line$(5),20)
 3520PROCfillcalendar(2,y%)
 3530aline$(1)=LEFT$(aline$(1)+pad$,20)+sp$+month$(2)
 3540aline$(3)+=sp$+RIGHT$(line$(0),20)
 3550aline$(4)+=sp$+RIGHT$(line$(1),20)
 3560aline$(5)+=sp$+RIGHT$(line$(2),20)
 3570aline$(6)+=sp$+RIGHT$(line$(3),20)
 3580aline$(7)+=sp$+RIGHT$(line$(4),20)
 3590aline$(8)+=sp$+RIGHT$(line$(5),20)
 3600PROCfillcalendar(3,y%)
 3610aline$(1)=LEFT$(aline$(1)+pad$,42)+sp$+month$(3)+CR$+LF$
 3620aline$(3)+=sp$+RIGHT$(line$(0),20)+CR$+LF$
 3630aline$(4)+=sp$+RIGHT$(line$(1),20)+CR$+LF$
 3640aline$(5)+=sp$+RIGHT$(line$(2),20)+CR$+LF$
 3650aline$(6)+=sp$+RIGHT$(line$(3),20)+CR$+LF$
 3660aline$(7)+=sp$+RIGHT$(line$(4),20)+CR$+LF$
 3670aline$(8)+=sp$+RIGHT$(line$(5),20)+CR$+LF$
 3680aline$(10)=month$(4)
 3690aline$(11)=aline$(2)
 3700PROCfillcalendar(4,y%)
 3710aline$(12)=RIGHT$(line$(0),20)
 3720aline$(13)=RIGHT$(line$(1),20)
 3730aline$(14)=RIGHT$(line$(2),20)
 3740aline$(15)=RIGHT$(line$(3),20)
 3750aline$(16)=RIGHT$(line$(4),20)
 3760aline$(17)=RIGHT$(line$(5),20)
 3770PROCfillcalendar(5,y%)
 3780aline$(10)=LEFT$(aline$(10)+pad$,20)+sp$+month$(5)
 3790aline$(12)+=sp$+RIGHT$(line$(0),20)
 3800aline$(13)+=sp$+RIGHT$(line$(1),20)
 3810aline$(14)+=sp$+RIGHT$(line$(2),20)
 3820aline$(15)+=sp$+RIGHT$(line$(3),20)
 3830aline$(16)+=sp$+RIGHT$(line$(4),20)
 3840aline$(17)+=sp$+RIGHT$(line$(5),20)
 3850PROCfillcalendar(6,y%)
 3860aline$(10)=LEFT$(aline$(10)+pad$,42)+sp$+month$(6)+CR$+LF$
 3870aline$(12)+=sp$+RIGHT$(line$(0),20)+CR$+LF$
 3880aline$(13)+=sp$+RIGHT$(line$(1),20)+CR$+LF$
 3890aline$(14)+=sp$+RIGHT$(line$(2),20)+CR$+LF$
 3900aline$(15)+=sp$+RIGHT$(line$(3),20)+CR$+LF$
 3910aline$(16)+=sp$+RIGHT$(line$(4),20)+CR$+LF$
 3920aline$(17)+=sp$+RIGHT$(line$(5),20)+CR$+LF$
 3930aline$(19)=month$(7)
 3940aline$(20)=aline$(2)
 3950PROCfillcalendar(7,y%)
 3960aline$(21)=RIGHT$(line$(0),20)
 3970aline$(22)=RIGHT$(line$(1),20)
 3980aline$(23)=RIGHT$(line$(2),20)
 3990aline$(24)=RIGHT$(line$(3),20)
 4000aline$(25)=RIGHT$(line$(4),20)
 4010aline$(26)=RIGHT$(line$(5),20)
 4020PROCfillcalendar(8,y%)
 4030aline$(19)=LEFT$(aline$(19)+pad$,20)+sp$+month$(8)
 4040aline$(21)+=sp$+RIGHT$(line$(0),20)
 4050aline$(22)+=sp$+RIGHT$(line$(1),20)
 4060aline$(23)+=sp$+RIGHT$(line$(2),20)
 4070aline$(24)+=sp$+RIGHT$(line$(3),20)
 4080aline$(25)+=sp$+RIGHT$(line$(4),20)
 4090aline$(26)+=sp$+RIGHT$(line$(5),20)
 4100PROCfillcalendar(9,y%)
 4110aline$(19)=LEFT$(aline$(19)+pad$,42)+sp$+month$(9)+CR$+LF$
 4120aline$(21)+=sp$+RIGHT$(line$(0),20)+CR$+LF$
 4130aline$(22)+=sp$+RIGHT$(line$(1),20)+CR$+LF$
 4140aline$(23)+=sp$+RIGHT$(line$(2),20)+CR$+LF$
 4150aline$(24)+=sp$+RIGHT$(line$(3),20)+CR$+LF$
 4160aline$(25)+=sp$+RIGHT$(line$(4),20)+CR$+LF$
 4170aline$(26)+=sp$+RIGHT$(line$(5),20)+CR$+LF$
 4180aline$(28)=month$(10)
 4190aline$(29)=aline$(2)
 4200PROCfillcalendar(10,y%)
 4210aline$(30)=RIGHT$(line$(0),20)
 4220aline$(31)=RIGHT$(line$(1),20)
 4230aline$(32)=RIGHT$(line$(2),20)
 4240aline$(33)=RIGHT$(line$(3),20)
 4250aline$(34)=RIGHT$(line$(4),20)
 4260aline$(35)=RIGHT$(line$(5),20)
 4270PROCfillcalendar(11,y%)
 4280aline$(28)=LEFT$(aline$(28)+pad$,20)+sp$+month$(11)
 4290aline$(30)+=sp$+RIGHT$(line$(0),20)
 4300aline$(31)+=sp$+RIGHT$(line$(1),20)
 4310aline$(32)+=sp$+RIGHT$(line$(2),20)
 4320aline$(33)+=sp$+RIGHT$(line$(3),20)
 4330aline$(34)+=sp$+RIGHT$(line$(4),20)
 4340aline$(35)+=sp$+RIGHT$(line$(5),20)
 4350PROCfillcalendar(12,y%)
 4360aline$(28)=LEFT$(aline$(28)+pad$,42)+sp$+month$(12)+CR$+LF$
 4370aline$(30)+=sp$+RIGHT$(line$(0),20)+CR$+LF$
 4380aline$(31)+=sp$+RIGHT$(line$(1),20)+CR$+LF$
 4390aline$(32)+=sp$+RIGHT$(line$(2),20)+CR$+LF$
 4400aline$(33)+=sp$+RIGHT$(line$(3),20)+CR$+LF$
 4410aline$(34)+=sp$+RIGHT$(line$(4),20)+CR$+LF$
 4420aline$(35)+=sp$+RIGHT$(line$(5),20)+CR$+LF$
 4430ENDPROC
 4440:
 4450DEFPROCfillcalendar(month%,year%)
 4460LOCAL I%,d%,m%,y%,dw%,days%
 4470FOR I%=0 TO 41 STEP 1
 4480c$(month%-1,I%)="   "
 4490NEXT I%
 4500d%=1:m%=month%:y%=year%
 4510PROCdate(d%,m%,y%,dw%,days%)
 4520dw%=(dw%+8)MOD7
 4530count%=1
 4540FOR I%=dw% TO (dw%-1+daysofmonth(m%)+FNleapyear(m%,y%))
 4550c$(month%-1,I%)=RIGHT$("  "+STR$(count%),3)
 4560count%+=1
 4570NEXT I%
 4580line$()=""
 4590FOR I%=0 TO 6
 4600line$(0)+=c$(m%-1,I%)
 4610line$(1)+=c$(m%-1,I%+7)
 4620line$(2)+=c$(m%-1,I%+14)
 4630line$(3)+=c$(m%-1,I%+21)
 4640line$(4)+=c$(m%-1,I%+28)
 4650line$(5)+=c$(m%-1,I%+35)
 4660NEXT I%
 4670ENDPROC
 4680:
 4690DEFPROCprint_hr
 4700pointer%=FNgetpointer(whandle%,6)
 4710data$=$pointer%
 4720Size%=VAL(data$)
 4730size%=size%*1000 :REM Size of text in millipoints
 4740linespace%=size%/10
 4750linespace%=linespace%*15
 4760SYS "Font_FindFont",,"Corpus.Medium",size%/65,size%/40 TO fhdl%
 4770SYS "Hourglass_On"
 4780pf%=OPENOUT("printer:")
 4790IF pf%=0 THEN ERROR 255, "Printer not available"
 4800SYS "PDriver_SelectJob",pf%,"CalPrint"
 4810LOCAL ERROR
 4820ON ERROR LOCAL:RESTORE ERROR:SYS "PDriver_AbortJob",pf%:CLOSE#pf%:PROCclose:ENDPROC
 4830REM Set Up Rectangle to Print
 4840SYS "PDriver_PageSize" TO ,,,left%,bottom%,right%,top%  :REM millipoints
 4850left%=left%/400:bottom%=bottom%/400:right%=right%/400:top%=top%/400
 4860rect%!0=left%:rect%!4=bottom%:rect%!8=right%:rect%!12=top%
 4870REM Transformation (Null)
 4880trans%!0=1<<16:trans%!4=0<<16
 4890trans%!8=0<<16:trans%!12=1<<16
 4900REM Position to plot
 4910plotat%!0=left%*400+36000:plotat%!4=(bottom%)*400-3600
 4920SYS "PDriver_GiveRectangle",0,rect%,trans%,plotat%,&FFFFFF00
 4930SYS "PDriver_DrawPage",1,rectin%,0,0 TO more2%
 4940SYS "ColourTrans_SetFontColours",,&FFFFFF00,0,6
 4950SYS "Font_SetFont",fhdl%
 4960WHILE more2%
 4970PROCrewrite(left%,top%)
 4980SYS "PDriver_GetRectangle",,rectin% TO more2%
 4990ENDWHILE
 5000SYS "PDriver_EndJob",pf%
 5010SYS "Hourglass_Off"
 5020CLOSE#pf%
 5030ENDPROC
 5040:
 5050DEFPROCpagetoprinter
 5060LOCAL n%
 5070PROCpageset
 5080PROCmarginodd(xp%)
 5090FOR n%=0 TO 36 STEP 1
 5100PROCLprint(aline$(n%))
 5110NEXT n%
 5120PROCLprint(FF$)
 5130ENDPROC
 5140:
� > !RunImage
?� Personal Calendar Printing Program (Multitasking Version)
/� Last Edited 25/9/92:Date Checked 4.10.92.
(� Author Frank Clayton
2%� Copyright Archimedes World 1992
<:
F� � �error:�
PEsize%=6                       :� Size of text in preview (Points)
Z$currentyear$=��$,��$,".")-1),4)
dcent%=�(currentyear$)/100
ncent%=cent%*100
xtickflag%=0
� ll%=65:� Printed line length
�
CR$=�(13)
�
LF$=�(10)
�
FF$=�(12)
�Bell$=�(7)
�b$=�ll%,"_")+CR$+LF$
�pad$=�60," ")
�Ixp%=0     :� Printer offsett*****************************************
�4� aline$(36)        :� Array to hold output page
�� daysofmonth(12)
�7daysofmonth()=0,31,28,31,30,31,30,31,31,30,31,30,31
�2� Dummy Month at beginning of array ie month 0
�� DaysGone%(11)
:DaysGone%()=0,31,59,90,120,151,181,212,243,273,304,334
� month$(12)
�month$()="","January","February","March","April","May","June","July","August","September","October","November","December": � Dummy month at begining of array.
": 
,
� day$(6)
6Qday$()="Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"
@� c$(11,41),line$(5)
J5sp$="  " :� Spacing character for calander months
T!adays$="Su  M Tu  W Th  F Sa"
^4� Printer High Resolution Definitions Start Here
h-� trans% 16,rect% 16,plotat% 8,rectin% 16
r:
|S=� "<Diary$Dir>.!Sprites"
�*T%=�#S+16:�#S:� Get Sprite File Length
�4� sprites% T%      :� And Reserve space for data
�!sprites%=T%:sprites%!8=1
�@ș "OS_SpriteOp",&109,sprites%     :� Initialise Sprite Area
�9ș "OS_SpriteOp",&10A,sprites%,"<Diary$Dir>.!Sprites"
�:� block% &1000, wa% &800,sp% &800, menu% &800,mu% &800
�wamax%=wa%+&800
�printflag%=�
�quit%=�
�
l1%=10
�
l2%=19
�
l3%=28
�)�clear(aline$())    :� Null the array
=$block%="TASK"  :� Set the first four bytes of block TASK
Dș "Wimp_Initialise",200,!block%,"DiaryPrinter" � version%,task%
2 ș"Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
&F ș"Wimp_LoadTemplate",,block%,wa%,wamax%,-1,"main",0 � ,,wapoint%
0- ș"Wimp_CreateWindow",,block% � whandle%
:N ș"Wimp_LoadTemplate",,block%,wapoint%,wamax%,-1,"datainfo",0 �,,wapoint%
D. ș"Wimp_CreateWindow",,block% � muhandle%
N ș"Wimp_CloseTemplate"
X% pointer%=�getpointer(whandle%,2)
b $pointer%=currentyear$
l, sp%!0=whandle%:sp%!4=2:sp%!8=0:sp%!12=0
v ș"Wimp_SetIconState",,sp%
�Eblock%!0=whandle%  :� first pram tells which window to operate on
�9block%!0=-1                        :� Put on icon bar
�block%!4=0
�block%!8=0
�block%!12=63
�block%!16=68
�block%!20=&2102
�spname$="!mycaldr"
�� block%!24 (�(spname$)+1)
�$(block%!24)=spname$
�block%!28=sprites%
�block%!32=(�(spname$)+1)
�(ș "Wimp_CreateIcon",,block% � icon%
� � � �wimperror � �
ȕ �
#�poll :�  This is the WIMP POLL
 1�    :� until quit reset to TRUE by Procedure
* �
4
��poll
>)ș "Wimp_Poll",&1830,block% � reason%
HȎ reason% �
R'   � 0     :� printflag% � �printer
\,   � 2     :ș "Wimp_OpenWindow",,block%
f-   � 3     :ș "Wimp_CloseWindow",,block%
p   � 6     :�click
z   � 8     :�keypress
�   � 9     :�menuchoice
�!   � 17,18 :�message_received
��
��
�:
���rewrite(sx%,sy%)
�ș "Font_SetFont",fhdl%
�!ș "Wimp_SetFontColours",,0,7
�� I%
�3ș "Font_Converttopoints",,sx%,sy% � ,sxp%,syp%
�� I%=0 � 36 � 1
�@ș "Font_Paint",,aline$(I%),&0,sxp%,(syp%-linespace%*(I%+1))
�� I%
�
:
��message_received
$Ȏ block%!16 �
.!   � 0   :printflag%=�:�close
8   � 8   :�checkclose
B�
L�
V:
`��checkclose
jblock%!12=block%!8
tCș "Wimp_SendMessage",19,block%,block%!4 :� object to closedown
~� �quiterror �
�$block%="TASK"
�%ș "Wimp_CloseDown",task%,!block%
��
��
�:
���menuchoice
�choice%=!block%
�Ȏ choice% �
�� 1: �close
��
��
�:
#��getorigin(block%,� x0%,� y0%)

x0%=block%!4-block%!20
y0%=block%!16-block%!24
�
(:
2��close
<quit%=�
F%� printflag% �   quit%=�quiterror
P
� quit% �
Z$block%="TASK"
d%ș "Wimp_CloseDown",task%,!block%
n�
x�
�:
���mainopen
�block%!0=whandle%
�Bș "Wimp_GetWindowState",,block%  :� load block prams for open
�� (block%!32 � &10000)=0 �
�Gș "Wimp_OpenWindow",,block%      :� draws window when task lets go
��
��
�:
���showmenu(x%,y%)
�$menu%="CalendarPrint"
�menu%?12=7:menu%?13=2
�menu%?14=7:menu%?15=0
menu%!16=140:menu%!20=44
menu%!24=0:ptr%=menu%+28
      !ptr%=0
"      ptr%!4=muhandle%
,      ptr%!8=&7000021
6      $(ptr%+12)="Info"
@
J      ptr%+=24
T1      !ptr%=&80:  � Mark as Last Item in Menu
^      ptr%!4=-1
h      ptr%!8=&7000021
r      $(ptr%+12)="Quit"
|,ș "Wimp_CreateMenu",,menu%,x%-64,y%+184
��
�:
�ݤgetpointer(wh%,ih%)
�!sp%=wh%:sp%!4=ih%
�ș"Wimp_GetIconState",,sp%
�=sp%!28
�:
���click
�7xm%=!block%:ym%=block%!4         :� Mouse positions
�*� block%!12=whandle% � printflag%<>� �
�   button%=block%!8 � 7
�   Ȏ block%!16  �
�6      � 1: � button%=4 � �updateicon(whandle%,2,1)
:              � button%=1 � �updateicon(whandle%,2,-1)
6      � 3: � button%=1 � �updateicon(whandle%,2,1)
:              � button%=4 � �updateicon(whandle%,2,-1)
&      � 4:printflag%=�
01            pointer%=�getpointer(whandle%,12)
:$            $pointer%="Printing"
DG            sp%!0=whandle%:sp%!4=4:sp%!8=&A7000000:sp%!12=&FF000000
N+            ș "Wimp_SetIconState",,sp%
X-            sp%!4=2:sp%!8=&0:sp%!12=&F000
b+            ș "Wimp_SetIconState",,sp%
l=            ș "Wimp_SetCaretPosition",-1 :� Disown Caret
v   �
��updateicons
��
�$ș "Wimp_GetPointerInfo",,block%
�C� (block%!12=-2) � (block%!8 � 5) �mainopen:� -2 is on icon bar
�!ș "Wimp_GetPointerInfo",,mu%
�2� (mu%!12=-2) � (mu%!8 � 2) �showmenu(xm%,ym%)
�$ș "Wimp_GetPointerInfo",,block%
��
�:
���updateicons
�$pointer%=�getpointer(whandle%,2)
�temp$=$pointer%
�Y%=�(temp$)
�
:
��keypress
*L� (block%!4=2 � block%!4=6 � block%!4=10)� block%!24=13 � �updateicons:�
>"ș "Wimp_ProcessKey",block%!24
R�
\:
f
��printer
p$pointer%=�getpointer(whandle%,6)
zdata$=$pointer%
�3size%=size%*1000 :� Size of text in millipoints
�linespace%=size%/10
�linespace%=linespace%*15
�Aș "Font_FindFont",,"Corpus.Medium",size%/65,size%/40 � fhdl%
�size%=�(data$)
��load_array(Y%)
�
�print_hr
�ș "Font_LoseFont",fhdl%
��changesides
��
�:
���changesides
�printflag%=�
	'   pointer%=�getpointer(whandle%,4)
	   message$="Again?"
	   $pointer%=message$
	$>   sp%!0=whandle%:sp%!4=4:sp%!8=&08000000:sp%!12=&FF000000
	."   ș "Wimp_SetIconState",,sp%
	8'   sp%!4=2:sp%!8=&F000:sp%!12=&F000
	B"   ș "Wimp_SetIconState",,sp%
	L
�mainopen
	V�
	`:
	j%��updateicon(whandle%,icon%,inc%)
	t(pointer%=�getpointer(whandle%,icon%)
	~temp$=$pointer%
	�temp%=�(temp$)
	�temp%+=inc%
	�temp$=�(temp%)
	�$pointer%=temp$
	�/sp%!0=whandle%:sp%!4=icon%:sp%!8=0:sp%!12=0
	�ș "Wimp_SetIconState",,sp%
	��
	�:
	���error
	�	� � �
	�$block%="TASK"
	�$ș"Wimp_CloseDown",task%,!block%
� �$; " at line ";�

�
:
ݤwimperror
(
!block%=�
2&$(block%+4)=�$+" at line "+Þ+�(0)
<Bș "Wimp_ReportError",block%,3,"Calendar Printer" � ,response%
F� response%=2 � �close:=�
P�
Z=�
d�
n:
xݤquiterror
�
!block%=�
�E$(block%+4)="Printing in progress - Do you really want to quit ?"
�Dș "Wimp_ReportError",block%,&13,"Calendar Printer" � ,response%
�� response%=1 �
�=�
��
�=�
��
�:
���delay(n)
��=0
�� � �>=n
��
:
)��date(� d%,� m%,� y%,� dw%,� dayno%)

� y1%,m1%
"G� d is day of month, m is month, y is year, dw is day of week (0-6)
,� y%<100 � y%+=cent%
6ȕ m%<1
@�decyear(m%,y%)
J�
Tȕ m%>12
^�addyear(m%,y%)
h�
rȕ d%<1
|�submonth(d%,m%,y%)
��
�+ȕ d%> daysofmonth(m%)+�leapyear(m%,y%)
��addmonth(d%,m%,y%)
��
�dayno%=�day(d%,m%,y%)
�dw%=dayno%�7
��
�:
���decyear(� m%,� y%)
�	y%-=1
�
m%+=12
��
�:
��addyear(� m%,� y%)
	y%+=1

m%-=12
&�
0:
:��submonth(� d%,� m%,� y%)
D	m%-=1
N� m%<1 � �decyear(m%,y%)
X(d%+=daysofmonth(m%)+�leapyear(m%,y%)
b�
l:
v��addmonth(� d%,� m%,� y%)
�*d%-=(daysofmonth(m%)+�leapyear(m%,y%))
�	m%+=1
�� m%>12 � �addyear(m%,y%)
��
�:
�ݤleapyear(m%,y%)
�2=((0=y%�4 � (y%�100<>0 � y%�400=0)) � m%=2)*-1
�:
�ݤday(d%,m%,y%)
�`=(365*y%+y%�4-y%�100+y%�400+DaysGone%(m%-1)-(�leapyear(2,y%)=1 � m%>2)+d%-2-�leapyear(2,y%))
�:
�:
���clear(A$())

� I%

� I%=0 � 35

A$(I%)=CR$+LF$

 � I%

*A$(36)=CR$

4�

>:

H��load_array(y%)

R�clear(aline$())

\aline$(0)=�(y%)+CR$+LF$

faline$(1)=month$(1)

p2aline$(2)=adays$+sp$+adays$+sp$+adays$+CR$+LF$

z�fillcalendar(1,y%)

�aline$(3)=�line$(0),20)

�aline$(4)=�line$(1),20)

�aline$(5)=�line$(2),20)

�aline$(6)=�line$(3),20)

�aline$(7)=�line$(4),20)

�aline$(8)=�line$(5),20)

��fillcalendar(2,y%)

�/aline$(1)=�aline$(1)+pad$,20)+sp$+month$(2)

� aline$(3)+=sp$+�line$(0),20)

� aline$(4)+=sp$+�line$(1),20)

� aline$(5)+=sp$+�line$(2),20)

� aline$(6)+=sp$+�line$(3),20)

� aline$(7)+=sp$+�line$(4),20)
 aline$(8)+=sp$+�line$(5),20)
�fillcalendar(3,y%)
7aline$(1)=�aline$(1)+pad$,42)+sp$+month$(3)+CR$+LF$
$(aline$(3)+=sp$+�line$(0),20)+CR$+LF$
.(aline$(4)+=sp$+�line$(1),20)+CR$+LF$
8(aline$(5)+=sp$+�line$(2),20)+CR$+LF$
B(aline$(6)+=sp$+�line$(3),20)+CR$+LF$
L(aline$(7)+=sp$+�line$(4),20)+CR$+LF$
V(aline$(8)+=sp$+�line$(5),20)+CR$+LF$
`aline$(10)=month$(4)
jaline$(11)=aline$(2)
t�fillcalendar(4,y%)
~aline$(12)=�line$(0),20)
�aline$(13)=�line$(1),20)
�aline$(14)=�line$(2),20)
�aline$(15)=�line$(3),20)
�aline$(16)=�line$(4),20)
�aline$(17)=�line$(5),20)
��fillcalendar(5,y%)
�1aline$(10)=�aline$(10)+pad$,20)+sp$+month$(5)
�!aline$(12)+=sp$+�line$(0),20)
�!aline$(13)+=sp$+�line$(1),20)
�!aline$(14)+=sp$+�line$(2),20)
�!aline$(15)+=sp$+�line$(3),20)
�!aline$(16)+=sp$+�line$(4),20)
!aline$(17)+=sp$+�line$(5),20)

�fillcalendar(6,y%)
9aline$(10)=�aline$(10)+pad$,42)+sp$+month$(6)+CR$+LF$
)aline$(12)+=sp$+�line$(0),20)+CR$+LF$
()aline$(13)+=sp$+�line$(1),20)+CR$+LF$
2)aline$(14)+=sp$+�line$(2),20)+CR$+LF$
<)aline$(15)+=sp$+�line$(3),20)+CR$+LF$
F)aline$(16)+=sp$+�line$(4),20)+CR$+LF$
P)aline$(17)+=sp$+�line$(5),20)+CR$+LF$
Zaline$(19)=month$(7)
daline$(20)=aline$(2)
n�fillcalendar(7,y%)
xaline$(21)=�line$(0),20)
�aline$(22)=�line$(1),20)
�aline$(23)=�line$(2),20)
�aline$(24)=�line$(3),20)
�aline$(25)=�line$(4),20)
�aline$(26)=�line$(5),20)
��fillcalendar(8,y%)
�1aline$(19)=�aline$(19)+pad$,20)+sp$+month$(8)
�!aline$(21)+=sp$+�line$(0),20)
�!aline$(22)+=sp$+�line$(1),20)
�!aline$(23)+=sp$+�line$(2),20)
�!aline$(24)+=sp$+�line$(3),20)
�!aline$(25)+=sp$+�line$(4),20)
�!aline$(26)+=sp$+�line$(5),20)
�fillcalendar(9,y%)
9aline$(19)=�aline$(19)+pad$,42)+sp$+month$(9)+CR$+LF$
)aline$(21)+=sp$+�line$(0),20)+CR$+LF$
")aline$(22)+=sp$+�line$(1),20)+CR$+LF$
,)aline$(23)+=sp$+�line$(2),20)+CR$+LF$
6)aline$(24)+=sp$+�line$(3),20)+CR$+LF$
@)aline$(25)+=sp$+�line$(4),20)+CR$+LF$
J)aline$(26)+=sp$+�line$(5),20)+CR$+LF$
Taline$(28)=month$(10)
^aline$(29)=aline$(2)
h�fillcalendar(10,y%)
raline$(30)=�line$(0),20)
|aline$(31)=�line$(1),20)
�aline$(32)=�line$(2),20)
�aline$(33)=�line$(3),20)
�aline$(34)=�line$(4),20)
�aline$(35)=�line$(5),20)
��fillcalendar(11,y%)
�2aline$(28)=�aline$(28)+pad$,20)+sp$+month$(11)
�!aline$(30)+=sp$+�line$(0),20)
�!aline$(31)+=sp$+�line$(1),20)
�!aline$(32)+=sp$+�line$(2),20)
�!aline$(33)+=sp$+�line$(3),20)
�!aline$(34)+=sp$+�line$(4),20)
�!aline$(35)+=sp$+�line$(5),20)
��fillcalendar(12,y%)
:aline$(28)=�aline$(28)+pad$,42)+sp$+month$(12)+CR$+LF$
)aline$(30)+=sp$+�line$(0),20)+CR$+LF$
)aline$(31)+=sp$+�line$(1),20)+CR$+LF$
&)aline$(32)+=sp$+�line$(2),20)+CR$+LF$
0)aline$(33)+=sp$+�line$(3),20)+CR$+LF$
:)aline$(34)+=sp$+�line$(4),20)+CR$+LF$
D)aline$(35)+=sp$+�line$(5),20)+CR$+LF$
N�
X:
b ��fillcalendar(month%,year%)
l� I%,d%,m%,y%,dw%,days%
v� I%=0 � 41 � 1
�c$(month%-1,I%)="   "
�� I%
�d%=1:m%=month%:y%=year%
��date(d%,m%,y%,dw%,days%)
�dw%=(dw%+8)�7
�count%=1
�7� I%=dw% � (dw%-1+daysofmonth(m%)+�leapyear(m%,y%))
�&c$(month%-1,I%)=�"  "+�(count%),3)
�
count%+=1
�� I%
�line$()=""
�� I%=0 � 6
�line$(0)+=c$(m%-1,I%)
line$(1)+=c$(m%-1,I%+7)
line$(2)+=c$(m%-1,I%+14)
line$(3)+=c$(m%-1,I%+21)
 line$(4)+=c$(m%-1,I%+28)
*line$(5)+=c$(m%-1,I%+35)
4� I%
>�
H:
R��print_hr
\$pointer%=�getpointer(whandle%,6)
fdata$=$pointer%
pSize%=�(data$)
z3size%=size%*1000 :� Size of text in millipoints
�linespace%=size%/10
�linespace%=linespace%*15
�Aș "Font_FindFont",,"Corpus.Medium",size%/65,size%/40 � fhdl%
�ș "Hourglass_On"
�pf%=�("printer:")
�,� pf%=0 � � 255, "Printer not available"
�)ș "PDriver_SelectJob",pf%,"CalPrint"
�� �
�6� � �:� �:ș "PDriver_AbortJob",pf%:�#pf%:�close:�
�� Set Up Rectangle to Print
�Hș "PDriver_PageSize" � ,,,left%,bottom%,right%,top%  :� millipoints
�Gleft%=left%/400:bottom%=bottom%/400:right%=right%/400:top%=top%/400
�>rect%!0=left%:rect%!4=bottom%:rect%!8=right%:rect%!12=top%
� Transformation (Null)
!trans%!0=1<<16:trans%!4=0<<16
"trans%!8=0<<16:trans%!12=1<<16
$� Position to plot
.:plotat%!0=left%*400+36000:plotat%!4=(bottom%)*400-3600
8?ș "PDriver_GiveRectangle",0,rect%,trans%,plotat%,&FFFFFF00
B0ș "PDriver_DrawPage",1,rectin%,0,0 � more2%
L2ș "ColourTrans_SetFontColours",,&FFFFFF00,0,6
Vș "Font_SetFont",fhdl%
`
ȕ more2%
j�rewrite(left%,top%)
t/ș "PDriver_GetRectangle",,rectin% � more2%
~�
�ș "PDriver_EndJob",pf%
�ș "Hourglass_Off"
�	�#pf%
��
�:
���pagetoprinter
�� n%
��pageset
��marginodd(xp%)
�� n%=0 � 36 � 1
��Lprint(aline$(n%))
�� n%
�Lprint(FF$)

�
:
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 3f f4 20 50  65 72 73 6f 6e 61 6c 20  |e...?. Personal |
00000020  43 61 6c 65 6e 64 61 72  20 50 72 69 6e 74 69 6e  |Calendar Printin|
00000030  67 20 50 72 6f 67 72 61  6d 20 28 4d 75 6c 74 69  |g Program (Multi|
00000040  74 61 73 6b 69 6e 67 20  56 65 72 73 69 6f 6e 29  |tasking Version)|
00000050  0d 00 1e 2f f4 20 4c 61  73 74 20 45 64 69 74 65  |.../. Last Edite|
00000060  64 20 32 35 2f 39 2f 39  32 3a 44 61 74 65 20 43  |d 25/9/92:Date C|
00000070  68 65 63 6b 65 64 20 34  2e 31 30 2e 39 32 2e 0d  |hecked 4.10.92..|
00000080  00 28 1a f4 20 41 75 74  68 6f 72 20 46 72 61 6e  |.(.. Author Fran|
00000090  6b 20 43 6c 61 79 74 6f  6e 0d 00 32 25 f4 20 43  |k Clayton..2%. C|
000000a0  6f 70 79 72 69 67 68 74  20 41 72 63 68 69 6d 65  |opyright Archime|
000000b0  64 65 73 20 57 6f 72 6c  64 20 31 39 39 32 0d 00  |des World 1992..|
000000c0  3c 05 3a 0d 00 46 10 ee  20 85 20 f2 65 72 72 6f  |<.:..F.. . .erro|
000000d0  72 3a e0 0d 00 50 45 73  69 7a 65 25 3d 36 20 20  |r:...PEsize%=6  |
000000e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000f0  20 20 20 20 20 3a f4 20  53 69 7a 65 20 6f 66 20  |     :. Size of |
00000100  74 65 78 74 20 69 6e 20  70 72 65 76 69 65 77 20  |text in preview |
00000110  28 50 6f 69 6e 74 73 29  0d 00 5a 24 63 75 72 72  |(Points)..Z$curr|
00000120  65 6e 74 79 65 61 72 24  3d c2 c0 91 24 2c a7 91  |entyear$=...$,..|
00000130  24 2c 22 2e 22 29 2d 31  29 2c 34 29 0d 00 64 1d  |$,".")-1),4)..d.|
00000140  63 65 6e 74 25 3d bb 28  63 75 72 72 65 6e 74 79  |cent%=.(currenty|
00000150  65 61 72 24 29 2f 31 30  30 0d 00 6e 13 63 65 6e  |ear$)/100..n.cen|
00000160  74 25 3d 63 65 6e 74 25  2a 31 30 30 0d 00 78 0f  |t%=cent%*100..x.|
00000170  74 69 63 6b 66 6c 61 67  25 3d 30 0d 00 82 20 6c  |tickflag%=0... l|
00000180  6c 25 3d 36 35 3a f4 20  50 72 69 6e 74 65 64 20  |l%=65:. Printed |
00000190  6c 69 6e 65 20 6c 65 6e  67 74 68 0d 00 8c 0d 43  |line length....C|
000001a0  52 24 3d bd 28 31 33 29  0d 00 96 0d 4c 46 24 3d  |R$=.(13)....LF$=|
000001b0  bd 28 31 30 29 0d 00 a0  0d 46 46 24 3d bd 28 31  |.(10)....FF$=.(1|
000001c0  32 29 0d 00 aa 0e 42 65  6c 6c 24 3d bd 28 37 29  |2)....Bell$=.(7)|
000001d0  0d 00 b4 18 62 24 3d c4  6c 6c 25 2c 22 5f 22 29  |....b$=.ll%,"_")|
000001e0  2b 43 52 24 2b 4c 46 24  0d 00 be 11 70 61 64 24  |+CR$+LF$....pad$|
000001f0  3d c4 36 30 2c 22 20 22  29 0d 00 c8 49 78 70 25  |=.60," ")...Ixp%|
00000200  3d 30 20 20 20 20 20 3a  f4 20 50 72 69 6e 74 65  |=0     :. Printe|
00000210  72 20 6f 66 66 73 65 74  74 2a 2a 2a 2a 2a 2a 2a  |r offsett*******|
00000220  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000240  2a 2a 0d 00 d2 34 de 20  61 6c 69 6e 65 24 28 33  |**...4. aline$(3|
00000250  36 29 20 20 20 20 20 20  20 20 3a f4 20 41 72 72  |6)        :. Arr|
00000260  61 79 20 74 6f 20 68 6f  6c 64 20 6f 75 74 70 75  |ay to hold outpu|
00000270  74 20 70 61 67 65 0d 00  dc 15 de 20 64 61 79 73  |t page..... days|
00000280  6f 66 6d 6f 6e 74 68 28  31 32 29 0d 00 e6 37 64  |ofmonth(12)...7d|
00000290  61 79 73 6f 66 6d 6f 6e  74 68 28 29 3d 30 2c 33  |aysofmonth()=0,3|
000002a0  31 2c 32 38 2c 33 31 2c  33 30 2c 33 31 2c 33 30  |1,28,31,30,31,30|
000002b0  2c 33 31 2c 33 31 2c 33  30 2c 33 31 2c 33 30 2c  |,31,31,30,31,30,|
000002c0  33 31 0d 00 f0 32 f4 20  44 75 6d 6d 79 20 4d 6f  |31...2. Dummy Mo|
000002d0  6e 74 68 20 61 74 20 62  65 67 69 6e 6e 69 6e 67  |nth at beginning|
000002e0  20 6f 66 20 61 72 72 61  79 20 69 65 20 6d 6f 6e  | of array ie mon|
000002f0  74 68 20 30 0d 00 fa 13  de 20 44 61 79 73 47 6f  |th 0..... DaysGo|
00000300  6e 65 25 28 31 31 29 0d  01 04 3a 44 61 79 73 47  |ne%(11)...:DaysG|
00000310  6f 6e 65 25 28 29 3d 30  2c 33 31 2c 35 39 2c 39  |one%()=0,31,59,9|
00000320  30 2c 31 32 30 2c 31 35  31 2c 31 38 31 2c 32 31  |0,120,151,181,21|
00000330  32 2c 32 34 33 2c 32 37  33 2c 33 30 34 2c 33 33  |2,243,273,304,33|
00000340  34 0d 01 0e 10 de 20 6d  6f 6e 74 68 24 28 31 32  |4..... month$(12|
00000350  29 0d 01 18 a2 6d 6f 6e  74 68 24 28 29 3d 22 22  |)....month$()=""|
00000360  2c 22 4a 61 6e 75 61 72  79 22 2c 22 46 65 62 72  |,"January","Febr|
00000370  75 61 72 79 22 2c 22 4d  61 72 63 68 22 2c 22 41  |uary","March","A|
00000380  70 72 69 6c 22 2c 22 4d  61 79 22 2c 22 4a 75 6e  |pril","May","Jun|
00000390  65 22 2c 22 4a 75 6c 79  22 2c 22 41 75 67 75 73  |e","July","Augus|
000003a0  74 22 2c 22 53 65 70 74  65 6d 62 65 72 22 2c 22  |t","September","|
000003b0  4f 63 74 6f 62 65 72 22  2c 22 4e 6f 76 65 6d 62  |October","Novemb|
000003c0  65 72 22 2c 22 44 65 63  65 6d 62 65 72 22 3a 20  |er","December": |
000003d0  f4 20 44 75 6d 6d 79 20  6d 6f 6e 74 68 20 61 74  |. Dummy month at|
000003e0  20 62 65 67 69 6e 69 6e  67 20 6f 66 20 61 72 72  | begining of arr|
000003f0  61 79 2e 0d 01 22 06 3a  20 0d 01 2c 0d de 20 64  |ay...".: ..,.. d|
00000400  61 79 24 28 36 29 0d 01  36 51 64 61 79 24 28 29  |ay$(6)..6Qday$()|
00000410  3d 22 4d 6f 6e 64 61 79  22 2c 22 54 75 65 73 64  |="Monday","Tuesd|
00000420  61 79 22 2c 22 57 65 64  6e 65 73 64 61 79 22 2c  |ay","Wednesday",|
00000430  22 54 68 75 72 73 64 61  79 22 2c 22 46 72 69 64  |"Thursday","Frid|
00000440  61 79 22 2c 22 53 61 74  75 72 64 61 79 22 2c 22  |ay","Saturday","|
00000450  53 75 6e 64 61 79 22 0d  01 40 18 de 20 63 24 28  |Sunday"..@.. c$(|
00000460  31 31 2c 34 31 29 2c 6c  69 6e 65 24 28 35 29 0d  |11,41),line$(5).|
00000470  01 4a 35 73 70 24 3d 22  20 20 22 20 3a f4 20 53  |.J5sp$="  " :. S|
00000480  70 61 63 69 6e 67 20 63  68 61 72 61 63 74 65 72  |pacing character|
00000490  20 66 6f 72 20 63 61 6c  61 6e 64 65 72 20 6d 6f  | for calander mo|
000004a0  6e 74 68 73 0d 01 54 21  61 64 61 79 73 24 3d 22  |nths..T!adays$="|
000004b0  53 75 20 20 4d 20 54 75  20 20 57 20 54 68 20 20  |Su  M Tu  W Th  |
000004c0  46 20 53 61 22 0d 01 5e  34 f4 20 50 72 69 6e 74  |F Sa"..^4. Print|
000004d0  65 72 20 48 69 67 68 20  52 65 73 6f 6c 75 74 69  |er High Resoluti|
000004e0  6f 6e 20 44 65 66 69 6e  69 74 69 6f 6e 73 20 53  |on Definitions S|
000004f0  74 61 72 74 20 48 65 72  65 0d 01 68 2d de 20 74  |tart Here..h-. t|
00000500  72 61 6e 73 25 20 31 36  2c 72 65 63 74 25 20 31  |rans% 16,rect% 1|
00000510  36 2c 70 6c 6f 74 61 74  25 20 38 2c 72 65 63 74  |6,plotat% 8,rect|
00000520  69 6e 25 20 31 36 0d 01  72 05 3a 0d 01 7c 1e 53  |in% 16..r.:..|.S|
00000530  3d 8e 20 22 3c 44 69 61  72 79 24 44 69 72 3e 2e  |=. "<Diary$Dir>.|
00000540  21 53 70 72 69 74 65 73  22 0d 01 86 2a 54 25 3d  |!Sprites"...*T%=|
00000550  a2 23 53 2b 31 36 3a d9  23 53 3a f4 20 47 65 74  |.#S+16:.#S:. Get|
00000560  20 53 70 72 69 74 65 20  46 69 6c 65 20 4c 65 6e  | Sprite File Len|
00000570  67 74 68 0d 01 90 34 de  20 73 70 72 69 74 65 73  |gth...4. sprites|
00000580  25 20 54 25 20 20 20 20  20 20 3a f4 20 41 6e 64  |% T%      :. And|
00000590  20 52 65 73 65 72 76 65  20 73 70 61 63 65 20 66  | Reserve space f|
000005a0  6f 72 20 64 61 74 61 0d  01 9a 1d 21 73 70 72 69  |or data....!spri|
000005b0  74 65 73 25 3d 54 25 3a  73 70 72 69 74 65 73 25  |tes%=T%:sprites%|
000005c0  21 38 3d 31 0d 01 a4 40  c8 99 20 22 4f 53 5f 53  |!8=1...@.. "OS_S|
000005d0  70 72 69 74 65 4f 70 22  2c 26 31 30 39 2c 73 70  |priteOp",&109,sp|
000005e0  72 69 74 65 73 25 20 20  20 20 20 3a f4 20 49 6e  |rites%     :. In|
000005f0  69 74 69 61 6c 69 73 65  20 53 70 72 69 74 65 20  |itialise Sprite |
00000600  41 72 65 61 0d 01 ae 39  c8 99 20 22 4f 53 5f 53  |Area...9.. "OS_S|
00000610  70 72 69 74 65 4f 70 22  2c 26 31 30 41 2c 73 70  |priteOp",&10A,sp|
00000620  72 69 74 65 73 25 2c 22  3c 44 69 61 72 79 24 44  |rites%,"<Diary$D|
00000630  69 72 3e 2e 21 53 70 72  69 74 65 73 22 0d 01 b8  |ir>.!Sprites"...|
00000640  3a de 20 62 6c 6f 63 6b  25 20 26 31 30 30 30 2c  |:. block% &1000,|
00000650  20 77 61 25 20 26 38 30  30 2c 73 70 25 20 26 38  | wa% &800,sp% &8|
00000660  30 30 2c 20 6d 65 6e 75  25 20 26 38 30 30 2c 6d  |00, menu% &800,m|
00000670  75 25 20 26 38 30 30 0d  01 c2 13 77 61 6d 61 78  |u% &800....wamax|
00000680  25 3d 77 61 25 2b 26 38  30 30 0d 01 cc 10 70 72  |%=wa%+&800....pr|
00000690  69 6e 74 66 6c 61 67 25  3d a3 0d 01 d6 0b 71 75  |intflag%=.....qu|
000006a0  69 74 25 3d a3 0d 01 e0  0a 6c 31 25 3d 31 30 0d  |it%=.....l1%=10.|
000006b0  01 ea 0a 6c 32 25 3d 31  39 0d 01 f4 0a 6c 33 25  |...l2%=19....l3%|
000006c0  3d 32 38 0d 01 fe 29 f2  63 6c 65 61 72 28 61 6c  |=28...).clear(al|
000006d0  69 6e 65 24 28 29 29 20  20 20 20 3a f4 20 4e 75  |ine$())    :. Nu|
000006e0  6c 6c 20 74 68 65 20 61  72 72 61 79 0d 02 08 3d  |ll the array...=|
000006f0  24 62 6c 6f 63 6b 25 3d  22 54 41 53 4b 22 20 20  |$block%="TASK"  |
00000700  3a f4 20 53 65 74 20 74  68 65 20 66 69 72 73 74  |:. Set the first|
00000710  20 66 6f 75 72 20 62 79  74 65 73 20 6f 66 20 62  | four bytes of b|
00000720  6c 6f 63 6b 20 54 41 53  4b 0d 02 12 44 c8 99 20  |lock TASK...D.. |
00000730  22 57 69 6d 70 5f 49 6e  69 74 69 61 6c 69 73 65  |"Wimp_Initialise|
00000740  22 2c 32 30 30 2c 21 62  6c 6f 63 6b 25 2c 22 44  |",200,!block%,"D|
00000750  69 61 72 79 50 72 69 6e  74 65 72 22 20 b8 20 76  |iaryPrinter" . v|
00000760  65 72 73 69 6f 6e 25 2c  74 61 73 6b 25 0d 02 1c  |ersion%,task%...|
00000770  32 20 c8 99 22 57 69 6d  70 5f 4f 70 65 6e 54 65  |2 .."Wimp_OpenTe|
00000780  6d 70 6c 61 74 65 22 2c  2c 22 3c 4f 62 65 79 24  |mplate",,"<Obey$|
00000790  44 69 72 3e 2e 54 65 6d  70 6c 61 74 65 73 22 0d  |Dir>.Templates".|
000007a0  02 26 46 20 c8 99 22 57  69 6d 70 5f 4c 6f 61 64  |.&F .."Wimp_Load|
000007b0  54 65 6d 70 6c 61 74 65  22 2c 2c 62 6c 6f 63 6b  |Template",,block|
000007c0  25 2c 77 61 25 2c 77 61  6d 61 78 25 2c 2d 31 2c  |%,wa%,wamax%,-1,|
000007d0  22 6d 61 69 6e 22 2c 30  20 b8 20 2c 2c 77 61 70  |"main",0 . ,,wap|
000007e0  6f 69 6e 74 25 0d 02 30  2d 20 c8 99 22 57 69 6d  |oint%..0- .."Wim|
000007f0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00000800  2c 62 6c 6f 63 6b 25 20  b8 20 77 68 61 6e 64 6c  |,block% . whandl|
00000810  65 25 0d 02 3a 4e 20 c8  99 22 57 69 6d 70 5f 4c  |e%..:N .."Wimp_L|
00000820  6f 61 64 54 65 6d 70 6c  61 74 65 22 2c 2c 62 6c  |oadTemplate",,bl|
00000830  6f 63 6b 25 2c 77 61 70  6f 69 6e 74 25 2c 77 61  |ock%,wapoint%,wa|
00000840  6d 61 78 25 2c 2d 31 2c  22 64 61 74 61 69 6e 66  |max%,-1,"datainf|
00000850  6f 22 2c 30 20 b8 2c 2c  77 61 70 6f 69 6e 74 25  |o",0 .,,wapoint%|
00000860  0d 02 44 2e 20 c8 99 22  57 69 6d 70 5f 43 72 65  |..D. .."Wimp_Cre|
00000870  61 74 65 57 69 6e 64 6f  77 22 2c 2c 62 6c 6f 63  |ateWindow",,bloc|
00000880  6b 25 20 b8 20 6d 75 68  61 6e 64 6c 65 25 0d 02  |k% . muhandle%..|
00000890  4e 1b 20 c8 99 22 57 69  6d 70 5f 43 6c 6f 73 65  |N. .."Wimp_Close|
000008a0  54 65 6d 70 6c 61 74 65  22 0d 02 58 25 20 70 6f  |Template"..X% po|
000008b0  69 6e 74 65 72 25 3d a4  67 65 74 70 6f 69 6e 74  |inter%=.getpoint|
000008c0  65 72 28 77 68 61 6e 64  6c 65 25 2c 32 29 0d 02  |er(whandle%,2)..|
000008d0  62 1b 20 24 70 6f 69 6e  74 65 72 25 3d 63 75 72  |b. $pointer%=cur|
000008e0  72 65 6e 74 79 65 61 72  24 0d 02 6c 2c 20 73 70  |rentyear$..l, sp|
000008f0  25 21 30 3d 77 68 61 6e  64 6c 65 25 3a 73 70 25  |%!0=whandle%:sp%|
00000900  21 34 3d 32 3a 73 70 25  21 38 3d 30 3a 73 70 25  |!4=2:sp%!8=0:sp%|
00000910  21 31 32 3d 30 0d 02 76  1f 20 c8 99 22 57 69 6d  |!12=0..v. .."Wim|
00000920  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00000930  2c 73 70 25 0d 02 80 45  62 6c 6f 63 6b 25 21 30  |,sp%...Eblock%!0|
00000940  3d 77 68 61 6e 64 6c 65  25 20 20 3a f4 20 66 69  |=whandle%  :. fi|
00000950  72 73 74 20 70 72 61 6d  20 74 65 6c 6c 73 20 77  |rst pram tells w|
00000960  68 69 63 68 20 77 69 6e  64 6f 77 20 74 6f 20 6f  |hich window to o|
00000970  70 65 72 61 74 65 20 6f  6e 0d 02 8a 39 62 6c 6f  |perate on...9blo|
00000980  63 6b 25 21 30 3d 2d 31  20 20 20 20 20 20 20 20  |ck%!0=-1        |
00000990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009a0  3a f4 20 50 75 74 20 6f  6e 20 69 63 6f 6e 20 62  |:. Put on icon b|
000009b0  61 72 0d 02 94 0e 62 6c  6f 63 6b 25 21 34 3d 30  |ar....block%!4=0|
000009c0  0d 02 9e 0e 62 6c 6f 63  6b 25 21 38 3d 30 0d 02  |....block%!8=0..|
000009d0  a8 10 62 6c 6f 63 6b 25  21 31 32 3d 36 33 0d 02  |..block%!12=63..|
000009e0  b2 10 62 6c 6f 63 6b 25  21 31 36 3d 36 38 0d 02  |..block%!16=68..|
000009f0  bc 13 62 6c 6f 63 6b 25  21 32 30 3d 26 32 31 30  |..block%!20=&210|
00000a00  32 0d 02 c6 16 73 70 6e  61 6d 65 24 3d 22 21 6d  |2....spname$="!m|
00000a10  79 63 61 6c 64 72 22 0d  02 d0 1e de 20 62 6c 6f  |ycaldr"..... blo|
00000a20  63 6b 25 21 32 34 20 28  a9 28 73 70 6e 61 6d 65  |ck%!24 (.(spname|
00000a30  24 29 2b 31 29 0d 02 da  18 24 28 62 6c 6f 63 6b  |$)+1)....$(block|
00000a40  25 21 32 34 29 3d 73 70  6e 61 6d 65 24 0d 02 e4  |%!24)=spname$...|
00000a50  16 62 6c 6f 63 6b 25 21  32 38 3d 73 70 72 69 74  |.block%!28=sprit|
00000a60  65 73 25 0d 02 ee 1c 62  6c 6f 63 6b 25 21 33 32  |es%....block%!32|
00000a70  3d 28 a9 28 73 70 6e 61  6d 65 24 29 2b 31 29 0d  |=(.(spname$)+1).|
00000a80  02 f8 28 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |..(.. "Wimp_Crea|
00000a90  74 65 49 63 6f 6e 22 2c  2c 62 6c 6f 63 6b 25 20  |teIcon",,block% |
00000aa0  b8 20 69 63 6f 6e 25 0d  03 02 18 ee 20 85 20 e7  |. icon%..... . .|
00000ab0  20 a4 77 69 6d 70 65 72  72 6f 72 20 8c 20 e0 0d  | .wimperror . ..|
00000ac0  03 0c 08 c8 95 20 b9 0d  03 16 23 f2 70 6f 6c 6c  |..... ....#.poll|
00000ad0  20 3a f4 20 20 54 68 69  73 20 69 73 20 74 68 65  | :.  This is the|
00000ae0  20 57 49 4d 50 20 50 4f  4c 4c 0d 03 20 31 ce 20  | WIMP POLL.. 1. |
00000af0  20 20 20 3a f4 20 75 6e  74 69 6c 20 71 75 69 74  |   :. until quit|
00000b00  20 72 65 73 65 74 20 74  6f 20 54 52 55 45 20 62  | reset to TRUE b|
00000b10  79 20 50 72 6f 63 65 64  75 72 65 0d 03 2a 06 20  |y Procedure..*. |
00000b20  e0 0d 03 34 0a dd f2 70  6f 6c 6c 0d 03 3e 29 c8  |...4...poll..>).|
00000b30  99 20 22 57 69 6d 70 5f  50 6f 6c 6c 22 2c 26 31  |. "Wimp_Poll",&1|
00000b40  38 33 30 2c 62 6c 6f 63  6b 25 20 b8 20 72 65 61  |830,block% . rea|
00000b50  73 6f 6e 25 0d 03 48 10  c8 8e 20 72 65 61 73 6f  |son%..H... reaso|
00000b60  6e 25 20 ca 0d 03 52 27  20 20 20 c9 20 30 20 20  |n% ...R'   . 0  |
00000b70  20 20 20 3a e7 20 70 72  69 6e 74 66 6c 61 67 25  |   :. printflag%|
00000b80  20 8c 20 f2 70 72 69 6e  74 65 72 0d 03 5c 2c 20  | . .printer..\, |
00000b90  20 20 c9 20 32 20 20 20  20 20 3a c8 99 20 22 57  |  . 2     :.. "W|
00000ba0  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
00000bb0  2c 62 6c 6f 63 6b 25 0d  03 66 2d 20 20 20 c9 20  |,block%..f-   . |
00000bc0  33 20 20 20 20 20 3a c8  99 20 22 57 69 6d 70 5f  |3     :.. "Wimp_|
00000bd0  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6c  |CloseWindow",,bl|
00000be0  6f 63 6b 25 0d 03 70 16  20 20 20 c9 20 36 20 20  |ock%..p.   . 6  |
00000bf0  20 20 20 3a f2 63 6c 69  63 6b 0d 03 7a 19 20 20  |   :.click..z.  |
00000c00  20 c9 20 38 20 20 20 20  20 3a f2 6b 65 79 70 72  | . 8     :.keypr|
00000c10  65 73 73 0d 03 84 1b 20  20 20 c9 20 39 20 20 20  |ess....   . 9   |
00000c20  20 20 3a f2 6d 65 6e 75  63 68 6f 69 63 65 0d 03  |  :.menuchoice..|
00000c30  8e 21 20 20 20 c9 20 31  37 2c 31 38 20 3a f2 6d  |.!   . 17,18 :.m|
00000c40  65 73 73 61 67 65 5f 72  65 63 65 69 76 65 64 0d  |essage_received.|
00000c50  03 98 05 cb 0d 03 a2 05  e1 0d 03 ac 05 3a 0d 03  |.............:..|
00000c60  b6 16 dd f2 72 65 77 72  69 74 65 28 73 78 25 2c  |....rewrite(sx%,|
00000c70  73 79 25 29 0d 03 c0 1b  c8 99 20 22 46 6f 6e 74  |sy%)...... "Font|
00000c80  5f 53 65 74 46 6f 6e 74  22 2c 66 68 64 6c 25 0d  |_SetFont",fhdl%.|
00000c90  03 ca 21 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |..!.. "Wimp_SetF|
00000ca0  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 30 2c 37  |ontColours",,0,7|
00000cb0  0d 03 d4 08 ea 20 49 25  0d 03 de 33 c8 99 20 22  |..... I%...3.. "|
00000cc0  46 6f 6e 74 5f 43 6f 6e  76 65 72 74 74 6f 70 6f  |Font_Converttopo|
00000cd0  69 6e 74 73 22 2c 2c 73  78 25 2c 73 79 25 20 b8  |ints",,sx%,sy% .|
00000ce0  20 2c 73 78 70 25 2c 73  79 70 25 0d 03 e8 13 e3  | ,sxp%,syp%.....|
00000cf0  20 49 25 3d 30 20 b8 20  33 36 20 88 20 31 0d 03  | I%=0 . 36 . 1..|
00000d00  f2 40 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |.@.. "Font_Paint|
00000d10  22 2c 2c 61 6c 69 6e 65  24 28 49 25 29 2c 26 30  |",,aline$(I%),&0|
00000d20  2c 73 78 70 25 2c 28 73  79 70 25 2d 6c 69 6e 65  |,sxp%,(syp%-line|
00000d30  73 70 61 63 65 25 2a 28  49 25 2b 31 29 29 0d 03  |space%*(I%+1))..|
00000d40  fc 08 ed 20 49 25 0d 04  06 05 e1 0d 04 10 05 3a  |... I%.........:|
00000d50  0d 04 1a 16 dd f2 6d 65  73 73 61 67 65 5f 72 65  |......message_re|
00000d60  63 65 69 76 65 64 0d 04  24 12 c8 8e 20 62 6c 6f  |ceived..$... blo|
00000d70  63 6b 25 21 31 36 20 ca  0d 04 2e 21 20 20 20 c9  |ck%!16 ....!   .|
00000d80  20 30 20 20 20 3a 70 72  69 6e 74 66 6c 61 67 25  | 0   :printflag%|
00000d90  3d a3 3a f2 63 6c 6f 73  65 0d 04 38 19 20 20 20  |=.:.close..8.   |
00000da0  c9 20 38 20 20 20 3a f2  63 68 65 63 6b 63 6c 6f  |. 8   :.checkclo|
00000db0  73 65 0d 04 42 05 cb 0d  04 4c 05 e1 0d 04 56 05  |se..B....L....V.|
00000dc0  3a 0d 04 60 10 dd f2 63  68 65 63 6b 63 6c 6f 73  |:..`...checkclos|
00000dd0  65 0d 04 6a 16 62 6c 6f  63 6b 25 21 31 32 3d 62  |e..j.block%!12=b|
00000de0  6c 6f 63 6b 25 21 38 0d  04 74 43 c8 99 20 22 57  |lock%!8..tC.. "W|
00000df0  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
00000e00  2c 31 39 2c 62 6c 6f 63  6b 25 2c 62 6c 6f 63 6b  |,19,block%,block|
00000e10  25 21 34 20 3a f4 20 6f  62 6a 65 63 74 20 74 6f  |%!4 :. object to|
00000e20  20 63 6c 6f 73 65 64 6f  77 6e 0d 04 7e 12 e7 20  | closedown..~.. |
00000e30  a4 71 75 69 74 65 72 72  6f 72 20 8c 0d 04 88 12  |.quiterror .....|
00000e40  24 62 6c 6f 63 6b 25 3d  22 54 41 53 4b 22 0d 04  |$block%="TASK"..|
00000e50  92 25 c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |.%.. "Wimp_Close|
00000e60  44 6f 77 6e 22 2c 74 61  73 6b 25 2c 21 62 6c 6f  |Down",task%,!blo|
00000e70  63 6b 25 0d 04 9c 05 cd  0d 04 a6 05 e1 0d 04 b0  |ck%.............|
00000e80  05 3a 0d 04 ba 10 dd f2  6d 65 6e 75 63 68 6f 69  |.:......menuchoi|
00000e90  63 65 0d 04 c4 13 63 68  6f 69 63 65 25 3d 21 62  |ce....choice%=!b|
00000ea0  6c 6f 63 6b 25 0d 04 ce  10 c8 8e 20 63 68 6f 69  |lock%...... choi|
00000eb0  63 65 25 20 ca 0d 04 d8  0f c9 20 31 3a 20 f2 63  |ce% ...... 1: .c|
00000ec0  6c 6f 73 65 0d 04 e2 05  cb 0d 04 ec 05 e1 0d 04  |lose............|
00000ed0  f6 05 3a 0d 05 00 23 dd  f2 67 65 74 6f 72 69 67  |..:...#..getorig|
00000ee0  69 6e 28 62 6c 6f 63 6b  25 2c f8 20 78 30 25 2c  |in(block%,. x0%,|
00000ef0  f8 20 79 30 25 29 0d 05  0a 1a 78 30 25 3d 62 6c  |. y0%)....x0%=bl|
00000f00  6f 63 6b 25 21 34 2d 62  6c 6f 63 6b 25 21 32 30  |ock%!4-block%!20|
00000f10  0d 05 14 1b 79 30 25 3d  62 6c 6f 63 6b 25 21 31  |....y0%=block%!1|
00000f20  36 2d 62 6c 6f 63 6b 25  21 32 34 0d 05 1e 05 e1  |6-block%!24.....|
00000f30  0d 05 28 05 3a 0d 05 32  0b dd f2 63 6c 6f 73 65  |..(.:..2...close|
00000f40  0d 05 3c 0b 71 75 69 74  25 3d b9 0d 05 46 25 e7  |..<.quit%=...F%.|
00000f50  20 70 72 69 6e 74 66 6c  61 67 25 20 8c 20 20 20  | printflag% .   |
00000f60  71 75 69 74 25 3d a4 71  75 69 74 65 72 72 6f 72  |quit%=.quiterror|
00000f70  0d 05 50 0d e7 20 71 75  69 74 25 20 8c 0d 05 5a  |..P.. quit% ...Z|
00000f80  12 24 62 6c 6f 63 6b 25  3d 22 54 41 53 4b 22 0d  |.$block%="TASK".|
00000f90  05 64 25 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |.d%.. "Wimp_Clos|
00000fa0  65 44 6f 77 6e 22 2c 74  61 73 6b 25 2c 21 62 6c  |eDown",task%,!bl|
00000fb0  6f 63 6b 25 0d 05 6e 05  cd 0d 05 78 05 e1 0d 05  |ock%..n....x....|
00000fc0  82 05 3a 0d 05 8c 0e dd  f2 6d 61 69 6e 6f 70 65  |..:......mainope|
00000fd0  6e 0d 05 96 15 62 6c 6f  63 6b 25 21 30 3d 77 68  |n....block%!0=wh|
00000fe0  61 6e 64 6c 65 25 0d 05  a0 42 c8 99 20 22 57 69  |andle%...B.. "Wi|
00000ff0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00001000  65 22 2c 2c 62 6c 6f 63  6b 25 20 20 3a f4 20 6c  |e",,block%  :. l|
00001010  6f 61 64 20 62 6c 6f 63  6b 20 70 72 61 6d 73 20  |oad block prams |
00001020  66 6f 72 20 6f 70 65 6e  0d 05 aa 1e e7 20 28 62  |for open..... (b|
00001030  6c 6f 63 6b 25 21 33 32  20 80 20 26 31 30 30 30  |lock%!32 . &1000|
00001040  30 29 3d 30 20 8c 0d 05  b4 47 c8 99 20 22 57 69  |0)=0 ....G.. "Wi|
00001050  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00001060  62 6c 6f 63 6b 25 20 20  20 20 20 20 3a f4 20 64  |block%      :. d|
00001070  72 61 77 73 20 77 69 6e  64 6f 77 20 77 68 65 6e  |raws window when|
00001080  20 74 61 73 6b 20 6c 65  74 73 20 67 6f 0d 05 be  | task lets go...|
00001090  05 cd 0d 05 c8 05 e1 0d  05 d2 05 3a 0d 05 dc 15  |...........:....|
000010a0  dd f2 73 68 6f 77 6d 65  6e 75 28 78 25 2c 79 25  |..showmenu(x%,y%|
000010b0  29 0d 05 e6 1a 24 6d 65  6e 75 25 3d 22 43 61 6c  |)....$menu%="Cal|
000010c0  65 6e 64 61 72 50 72 69  6e 74 22 0d 05 f0 19 6d  |endarPrint"....m|
000010d0  65 6e 75 25 3f 31 32 3d  37 3a 6d 65 6e 75 25 3f  |enu%?12=7:menu%?|
000010e0  31 33 3d 32 0d 05 fa 19  6d 65 6e 75 25 3f 31 34  |13=2....menu%?14|
000010f0  3d 37 3a 6d 65 6e 75 25  3f 31 35 3d 30 0d 06 04  |=7:menu%?15=0...|
00001100  1c 6d 65 6e 75 25 21 31  36 3d 31 34 30 3a 6d 65  |.menu%!16=140:me|
00001110  6e 75 25 21 32 30 3d 34  34 0d 06 0e 1c 6d 65 6e  |nu%!20=44....men|
00001120  75 25 21 32 34 3d 30 3a  70 74 72 25 3d 6d 65 6e  |u%!24=0:ptr%=men|
00001130  75 25 2b 32 38 0d 06 18  11 20 20 20 20 20 20 21  |u%+28....      !|
00001140  70 74 72 25 3d 30 0d 06  22 1a 20 20 20 20 20 20  |ptr%=0..".      |
00001150  70 74 72 25 21 34 3d 6d  75 68 61 6e 64 6c 65 25  |ptr%!4=muhandle%|
00001160  0d 06 2c 19 20 20 20 20  20 20 70 74 72 25 21 38  |..,.      ptr%!8|
00001170  3d 26 37 30 30 30 30 32  31 0d 06 36 1b 20 20 20  |=&7000021..6.   |
00001180  20 20 20 24 28 70 74 72  25 2b 31 32 29 3d 22 49  |   $(ptr%+12)="I|
00001190  6e 66 6f 22 0d 06 40 04  0d 06 4a 12 20 20 20 20  |nfo"..@...J.    |
000011a0  20 20 70 74 72 25 2b 3d  32 34 0d 06 54 31 20 20  |  ptr%+=24..T1  |
000011b0  20 20 20 20 21 70 74 72  25 3d 26 38 30 3a 20 20  |    !ptr%=&80:  |
000011c0  f4 20 4d 61 72 6b 20 61  73 20 4c 61 73 74 20 49  |. Mark as Last I|
000011d0  74 65 6d 20 69 6e 20 4d  65 6e 75 0d 06 5e 13 20  |tem in Menu..^. |
000011e0  20 20 20 20 20 70 74 72  25 21 34 3d 2d 31 0d 06  |     ptr%!4=-1..|
000011f0  68 19 20 20 20 20 20 20  70 74 72 25 21 38 3d 26  |h.      ptr%!8=&|
00001200  37 30 30 30 30 32 31 0d  06 72 1b 20 20 20 20 20  |7000021..r.     |
00001210  20 24 28 70 74 72 25 2b  31 32 29 3d 22 51 75 69  | $(ptr%+12)="Qui|
00001220  74 22 0d 06 7c 2c c8 99  20 22 57 69 6d 70 5f 43  |t"..|,.. "Wimp_C|
00001230  72 65 61 74 65 4d 65 6e  75 22 2c 2c 6d 65 6e 75  |reateMenu",,menu|
00001240  25 2c 78 25 2d 36 34 2c  79 25 2b 31 38 34 0d 06  |%,x%-64,y%+184..|
00001250  86 05 e1 0d 06 90 05 3a  0d 06 9a 19 dd a4 67 65  |.......:......ge|
00001260  74 70 6f 69 6e 74 65 72  28 77 68 25 2c 69 68 25  |tpointer(wh%,ih%|
00001270  29 0d 06 a4 16 21 73 70  25 3d 77 68 25 3a 73 70  |)....!sp%=wh%:sp|
00001280  25 21 34 3d 69 68 25 0d  06 ae 1e c8 99 22 57 69  |%!4=ih%......"Wi|
00001290  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000012a0  2c 2c 73 70 25 0d 06 b8  0b 3d 73 70 25 21 32 38  |,,sp%....=sp%!28|
000012b0  0d 06 c2 05 3a 0d 06 cc  0b dd f2 63 6c 69 63 6b  |....:......click|
000012c0  0d 06 d6 37 78 6d 25 3d  21 62 6c 6f 63 6b 25 3a  |...7xm%=!block%:|
000012d0  79 6d 25 3d 62 6c 6f 63  6b 25 21 34 20 20 20 20  |ym%=block%!4    |
000012e0  20 20 20 20 20 3a f4 20  4d 6f 75 73 65 20 70 6f  |     :. Mouse po|
000012f0  73 69 74 69 6f 6e 73 0d  06 e0 2a e7 20 62 6c 6f  |sitions...*. blo|
00001300  63 6b 25 21 31 32 3d 77  68 61 6e 64 6c 65 25 20  |ck%!12=whandle% |
00001310  80 20 70 72 69 6e 74 66  6c 61 67 25 3c 3e b9 20  |. printflag%<>. |
00001320  8c 0d 06 ea 1b 20 20 20  62 75 74 74 6f 6e 25 3d  |.....   button%=|
00001330  62 6c 6f 63 6b 25 21 38  20 80 20 37 0d 06 f4 16  |block%!8 . 7....|
00001340  20 20 20 c8 8e 20 62 6c  6f 63 6b 25 21 31 36 20  |   .. block%!16 |
00001350  20 ca 0d 06 fe 36 20 20  20 20 20 20 c9 20 31 3a  | ....6      . 1:|
00001360  20 e7 20 62 75 74 74 6f  6e 25 3d 34 20 8c 20 f2  | . button%=4 . .|
00001370  75 70 64 61 74 65 69 63  6f 6e 28 77 68 61 6e 64  |updateicon(whand|
00001380  6c 65 25 2c 32 2c 31 29  0d 07 08 3a 20 20 20 20  |le%,2,1)...:    |
00001390  20 20 20 20 20 20 20 20  20 20 e7 20 62 75 74 74  |          . butt|
000013a0  6f 6e 25 3d 31 20 8c 20  f2 75 70 64 61 74 65 69  |on%=1 . .updatei|
000013b0  63 6f 6e 28 77 68 61 6e  64 6c 65 25 2c 32 2c 2d  |con(whandle%,2,-|
000013c0  31 29 0d 07 12 36 20 20  20 20 20 20 c9 20 33 3a  |1)...6      . 3:|
000013d0  20 e7 20 62 75 74 74 6f  6e 25 3d 31 20 8c 20 f2  | . button%=1 . .|
000013e0  75 70 64 61 74 65 69 63  6f 6e 28 77 68 61 6e 64  |updateicon(whand|
000013f0  6c 65 25 2c 32 2c 31 29  0d 07 1c 3a 20 20 20 20  |le%,2,1)...:    |
00001400  20 20 20 20 20 20 20 20  20 20 e7 20 62 75 74 74  |          . butt|
00001410  6f 6e 25 3d 34 20 8c 20  f2 75 70 64 61 74 65 69  |on%=4 . .updatei|
00001420  63 6f 6e 28 77 68 61 6e  64 6c 65 25 2c 32 2c 2d  |con(whandle%,2,-|
00001430  31 29 0d 07 26 1a 20 20  20 20 20 20 c9 20 34 3a  |1)..&.      . 4:|
00001440  70 72 69 6e 74 66 6c 61  67 25 3d b9 0d 07 30 31  |printflag%=...01|
00001450  20 20 20 20 20 20 20 20  20 20 20 20 70 6f 69 6e  |            poin|
00001460  74 65 72 25 3d a4 67 65  74 70 6f 69 6e 74 65 72  |ter%=.getpointer|
00001470  28 77 68 61 6e 64 6c 65  25 2c 31 32 29 0d 07 3a  |(whandle%,12)..:|
00001480  24 20 20 20 20 20 20 20  20 20 20 20 20 24 70 6f  |$            $po|
00001490  69 6e 74 65 72 25 3d 22  50 72 69 6e 74 69 6e 67  |inter%="Printing|
000014a0  22 0d 07 44 47 20 20 20  20 20 20 20 20 20 20 20  |"..DG           |
000014b0  20 73 70 25 21 30 3d 77  68 61 6e 64 6c 65 25 3a  | sp%!0=whandle%:|
000014c0  73 70 25 21 34 3d 34 3a  73 70 25 21 38 3d 26 41  |sp%!4=4:sp%!8=&A|
000014d0  37 30 30 30 30 30 30 3a  73 70 25 21 31 32 3d 26  |7000000:sp%!12=&|
000014e0  46 46 30 30 30 30 30 30  0d 07 4e 2b 20 20 20 20  |FF000000..N+    |
000014f0  20 20 20 20 20 20 20 20  c8 99 20 22 57 69 6d 70  |        .. "Wimp|
00001500  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
00001510  73 70 25 0d 07 58 2d 20  20 20 20 20 20 20 20 20  |sp%..X-         |
00001520  20 20 20 73 70 25 21 34  3d 32 3a 73 70 25 21 38  |   sp%!4=2:sp%!8|
00001530  3d 26 30 3a 73 70 25 21  31 32 3d 26 46 30 30 30  |=&0:sp%!12=&F000|
00001540  0d 07 62 2b 20 20 20 20  20 20 20 20 20 20 20 20  |..b+            |
00001550  c8 99 20 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |.. "Wimp_SetIcon|
00001560  53 74 61 74 65 22 2c 2c  73 70 25 0d 07 6c 3d 20  |State",,sp%..l= |
00001570  20 20 20 20 20 20 20 20  20 20 20 c8 99 20 22 57  |           .. "W|
00001580  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00001590  74 69 6f 6e 22 2c 2d 31  20 3a f4 20 44 69 73 6f  |tion",-1 :. Diso|
000015a0  77 6e 20 43 61 72 65 74  0d 07 76 08 20 20 20 cb  |wn Caret..v.   .|
000015b0  0d 07 80 10 f2 75 70 64  61 74 65 69 63 6f 6e 73  |.....updateicons|
000015c0  0d 07 8a 05 cd 0d 07 94  24 c8 99 20 22 57 69 6d  |........$.. "Wim|
000015d0  70 5f 47 65 74 50 6f 69  6e 74 65 72 49 6e 66 6f  |p_GetPointerInfo|
000015e0  22 2c 2c 62 6c 6f 63 6b  25 0d 07 9e 43 e7 20 28  |",,block%...C. (|
000015f0  62 6c 6f 63 6b 25 21 31  32 3d 2d 32 29 20 80 20  |block%!12=-2) . |
00001600  28 62 6c 6f 63 6b 25 21  38 20 80 20 35 29 20 f2  |(block%!8 . 5) .|
00001610  6d 61 69 6e 6f 70 65 6e  3a f4 20 2d 32 20 69 73  |mainopen:. -2 is|
00001620  20 6f 6e 20 69 63 6f 6e  20 62 61 72 0d 07 a8 21  | on icon bar...!|
00001630  c8 99 20 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |.. "Wimp_GetPoin|
00001640  74 65 72 49 6e 66 6f 22  2c 2c 6d 75 25 0d 07 b2  |terInfo",,mu%...|
00001650  32 e7 20 28 6d 75 25 21  31 32 3d 2d 32 29 20 80  |2. (mu%!12=-2) .|
00001660  20 28 6d 75 25 21 38 20  80 20 32 29 20 f2 73 68  | (mu%!8 . 2) .sh|
00001670  6f 77 6d 65 6e 75 28 78  6d 25 2c 79 6d 25 29 0d  |owmenu(xm%,ym%).|
00001680  07 bc 24 c8 99 20 22 57  69 6d 70 5f 47 65 74 50  |..$.. "Wimp_GetP|
00001690  6f 69 6e 74 65 72 49 6e  66 6f 22 2c 2c 62 6c 6f  |ointerInfo",,blo|
000016a0  63 6b 25 0d 07 c6 05 e1  0d 07 d0 05 3a 0d 07 da  |ck%.........:...|
000016b0  11 dd f2 75 70 64 61 74  65 69 63 6f 6e 73 0d 07  |...updateicons..|
000016c0  e4 24 70 6f 69 6e 74 65  72 25 3d a4 67 65 74 70  |.$pointer%=.getp|
000016d0  6f 69 6e 74 65 72 28 77  68 61 6e 64 6c 65 25 2c  |ointer(whandle%,|
000016e0  32 29 0d 07 ee 13 74 65  6d 70 24 3d 24 70 6f 69  |2)....temp$=$poi|
000016f0  6e 74 65 72 25 0d 07 f8  0f 59 25 3d bb 28 74 65  |nter%....Y%=.(te|
00001700  6d 70 24 29 0d 08 02 05  e1 0d 08 0c 05 3a 0d 08  |mp$).........:..|
00001710  16 0e dd f2 6b 65 79 70  72 65 73 73 0d 08 2a 4c  |....keypress..*L|
00001720  e7 20 28 62 6c 6f 63 6b  25 21 34 3d 32 20 84 20  |. (block%!4=2 . |
00001730  62 6c 6f 63 6b 25 21 34  3d 36 20 84 20 62 6c 6f  |block%!4=6 . blo|
00001740  63 6b 25 21 34 3d 31 30  29 80 20 62 6c 6f 63 6b  |ck%!4=10). block|
00001750  25 21 32 34 3d 31 33 20  8c 20 f2 75 70 64 61 74  |%!24=13 . .updat|
00001760  65 69 63 6f 6e 73 3a e1  0d 08 3e 22 c8 99 20 22  |eicons:...>".. "|
00001770  57 69 6d 70 5f 50 72 6f  63 65 73 73 4b 65 79 22  |Wimp_ProcessKey"|
00001780  2c 62 6c 6f 63 6b 25 21  32 34 0d 08 52 05 e1 0d  |,block%!24..R...|
00001790  08 5c 05 3a 0d 08 66 0d  dd f2 70 72 69 6e 74 65  |.\.:..f...printe|
000017a0  72 0d 08 70 24 70 6f 69  6e 74 65 72 25 3d a4 67  |r..p$pointer%=.g|
000017b0  65 74 70 6f 69 6e 74 65  72 28 77 68 61 6e 64 6c  |etpointer(whandl|
000017c0  65 25 2c 36 29 0d 08 7a  13 64 61 74 61 24 3d 24  |e%,6)..z.data$=$|
000017d0  70 6f 69 6e 74 65 72 25  0d 08 84 33 73 69 7a 65  |pointer%...3size|
000017e0  25 3d 73 69 7a 65 25 2a  31 30 30 30 20 3a f4 20  |%=size%*1000 :. |
000017f0  53 69 7a 65 20 6f 66 20  74 65 78 74 20 69 6e 20  |Size of text in |
00001800  6d 69 6c 6c 69 70 6f 69  6e 74 73 0d 08 8e 17 6c  |millipoints....l|
00001810  69 6e 65 73 70 61 63 65  25 3d 73 69 7a 65 25 2f  |inespace%=size%/|
00001820  31 30 0d 08 98 1c 6c 69  6e 65 73 70 61 63 65 25  |10....linespace%|
00001830  3d 6c 69 6e 65 73 70 61  63 65 25 2a 31 35 0d 08  |=linespace%*15..|
00001840  a2 41 c8 99 20 22 46 6f  6e 74 5f 46 69 6e 64 46  |.A.. "Font_FindF|
00001850  6f 6e 74 22 2c 2c 22 43  6f 72 70 75 73 2e 4d 65  |ont",,"Corpus.Me|
00001860  64 69 75 6d 22 2c 73 69  7a 65 25 2f 36 35 2c 73  |dium",size%/65,s|
00001870  69 7a 65 25 2f 34 30 20  b8 20 66 68 64 6c 25 0d  |ize%/40 . fhdl%.|
00001880  08 ac 12 73 69 7a 65 25  3d bb 28 64 61 74 61 24  |...size%=.(data$|
00001890  29 0d 08 b6 13 f2 6c 6f  61 64 5f 61 72 72 61 79  |).....load_array|
000018a0  28 59 25 29 0d 08 c0 0d  f2 70 72 69 6e 74 5f 68  |(Y%).....print_h|
000018b0  72 0d 08 ca 1c c8 99 20  22 46 6f 6e 74 5f 4c 6f  |r...... "Font_Lo|
000018c0  73 65 46 6f 6e 74 22 2c  66 68 64 6c 25 0d 08 d4  |seFont",fhdl%...|
000018d0  10 f2 63 68 61 6e 67 65  73 69 64 65 73 0d 08 de  |..changesides...|
000018e0  05 e1 0d 08 e8 05 3a 0d  08 f2 11 dd f2 63 68 61  |......:......cha|
000018f0  6e 67 65 73 69 64 65 73  0d 08 fc 10 70 72 69 6e  |ngesides....prin|
00001900  74 66 6c 61 67 25 3d a3  0d 09 06 27 20 20 20 70  |tflag%=....'   p|
00001910  6f 69 6e 74 65 72 25 3d  a4 67 65 74 70 6f 69 6e  |ointer%=.getpoin|
00001920  74 65 72 28 77 68 61 6e  64 6c 65 25 2c 34 29 0d  |ter(whandle%,4).|
00001930  09 10 18 20 20 20 6d 65  73 73 61 67 65 24 3d 22  |...   message$="|
00001940  41 67 61 69 6e 3f 22 0d  09 1a 19 20 20 20 24 70  |Again?"....   $p|
00001950  6f 69 6e 74 65 72 25 3d  6d 65 73 73 61 67 65 24  |ointer%=message$|
00001960  0d 09 24 3e 20 20 20 73  70 25 21 30 3d 77 68 61  |..$>   sp%!0=wha|
00001970  6e 64 6c 65 25 3a 73 70  25 21 34 3d 34 3a 73 70  |ndle%:sp%!4=4:sp|
00001980  25 21 38 3d 26 30 38 30  30 30 30 30 30 3a 73 70  |%!8=&08000000:sp|
00001990  25 21 31 32 3d 26 46 46  30 30 30 30 30 30 0d 09  |%!12=&FF000000..|
000019a0  2e 22 20 20 20 c8 99 20  22 57 69 6d 70 5f 53 65  |."   .. "Wimp_Se|
000019b0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 73 70 25  |tIconState",,sp%|
000019c0  0d 09 38 27 20 20 20 73  70 25 21 34 3d 32 3a 73  |..8'   sp%!4=2:s|
000019d0  70 25 21 38 3d 26 46 30  30 30 3a 73 70 25 21 31  |p%!8=&F000:sp%!1|
000019e0  32 3d 26 46 30 30 30 0d  09 42 22 20 20 20 c8 99  |2=&F000..B"   ..|
000019f0  20 22 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  | "Wimp_SetIconSt|
00001a00  61 74 65 22 2c 2c 73 70  25 0d 09 4c 0d f2 6d 61  |ate",,sp%..L..ma|
00001a10  69 6e 6f 70 65 6e 0d 09  56 05 e1 0d 09 60 05 3a  |inopen..V....`.:|
00001a20  0d 09 6a 25 dd f2 75 70  64 61 74 65 69 63 6f 6e  |..j%..updateicon|
00001a30  28 77 68 61 6e 64 6c 65  25 2c 69 63 6f 6e 25 2c  |(whandle%,icon%,|
00001a40  69 6e 63 25 29 0d 09 74  28 70 6f 69 6e 74 65 72  |inc%)..t(pointer|
00001a50  25 3d a4 67 65 74 70 6f  69 6e 74 65 72 28 77 68  |%=.getpointer(wh|
00001a60  61 6e 64 6c 65 25 2c 69  63 6f 6e 25 29 0d 09 7e  |andle%,icon%)..~|
00001a70  13 74 65 6d 70 24 3d 24  70 6f 69 6e 74 65 72 25  |.temp$=$pointer%|
00001a80  0d 09 88 12 74 65 6d 70  25 3d bb 28 74 65 6d 70  |....temp%=.(temp|
00001a90  24 29 0d 09 92 0f 74 65  6d 70 25 2b 3d 69 6e 63  |$)....temp%+=inc|
00001aa0  25 0d 09 9c 12 74 65 6d  70 24 3d c3 28 74 65 6d  |%....temp$=.(tem|
00001ab0  70 25 29 0d 09 a6 13 24  70 6f 69 6e 74 65 72 25  |p%)....$pointer%|
00001ac0  3d 74 65 6d 70 24 0d 09  b0 2f 73 70 25 21 30 3d  |=temp$.../sp%!0=|
00001ad0  77 68 61 6e 64 6c 65 25  3a 73 70 25 21 34 3d 69  |whandle%:sp%!4=i|
00001ae0  63 6f 6e 25 3a 73 70 25  21 38 3d 30 3a 73 70 25  |con%:sp%!8=0:sp%|
00001af0  21 31 32 3d 30 0d 09 ba  1f c8 99 20 22 57 69 6d  |!12=0...... "Wim|
00001b00  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00001b10  2c 73 70 25 0d 09 c4 05  e1 0d 09 ce 05 3a 0d 09  |,sp%.........:..|
00001b20  d8 0b dd f2 65 72 72 6f  72 0d 09 e2 09 ee 20 85  |....error..... .|
00001b30  20 87 0d 09 ec 12 24 62  6c 6f 63 6b 25 3d 22 54  | .....$block%="T|
00001b40  41 53 4b 22 0d 09 f6 24  c8 99 22 57 69 6d 70 5f  |ASK"...$.."Wimp_|
00001b50  43 6c 6f 73 65 44 6f 77  6e 22 2c 74 61 73 6b 25  |CloseDown",task%|
00001b60  2c 21 62 6c 6f 63 6b 25  0d 0a 00 17 f1 20 f6 24  |,!block%..... .$|
00001b70  3b 20 22 20 61 74 20 6c  69 6e 65 20 22 3b 9e 0d  |; " at line ";..|
00001b80  0a 0a 05 e1 0d 0a 14 05  3a 0d 0a 1e 0f dd a4 77  |........:......w|
00001b90  69 6d 70 65 72 72 6f 72  0d 0a 28 0d 21 62 6c 6f  |imperror..(.!blo|
00001ba0  63 6b 25 3d 9f 0d 0a 32  26 24 28 62 6c 6f 63 6b  |ck%=...2&$(block|
00001bb0  25 2b 34 29 3d f6 24 2b  22 20 61 74 20 6c 69 6e  |%+4)=.$+" at lin|
00001bc0  65 20 22 2b c3 9e 2b bd  28 30 29 0d 0a 3c 42 c8  |e "+..+.(0)..<B.|
00001bd0  99 20 22 57 69 6d 70 5f  52 65 70 6f 72 74 45 72  |. "Wimp_ReportEr|
00001be0  72 6f 72 22 2c 62 6c 6f  63 6b 25 2c 33 2c 22 43  |ror",block%,3,"C|
00001bf0  61 6c 65 6e 64 61 72 20  50 72 69 6e 74 65 72 22  |alendar Printer"|
00001c00  20 b8 20 2c 72 65 73 70  6f 6e 73 65 25 0d 0a 46  | . ,response%..F|
00001c10  1d e7 20 72 65 73 70 6f  6e 73 65 25 3d 32 20 8c  |.. response%=2 .|
00001c20  20 f2 63 6c 6f 73 65 3a  3d b9 0d 0a 50 05 cc 0d  | .close:=...P...|
00001c30  0a 5a 06 3d a3 0d 0a 64  05 cd 0d 0a 6e 05 3a 0d  |.Z.=...d....n.:.|
00001c40  0a 78 0f dd a4 71 75 69  74 65 72 72 6f 72 0d 0a  |.x...quiterror..|
00001c50  82 0d 21 62 6c 6f 63 6b  25 3d 9f 0d 0a 8c 45 24  |..!block%=....E$|
00001c60  28 62 6c 6f 63 6b 25 2b  34 29 3d 22 50 72 69 6e  |(block%+4)="Prin|
00001c70  74 69 6e 67 20 69 6e 20  70 72 6f 67 72 65 73 73  |ting in progress|
00001c80  20 2d 20 44 6f 20 79 6f  75 20 72 65 61 6c 6c 79  | - Do you really|
00001c90  20 77 61 6e 74 20 74 6f  20 71 75 69 74 20 3f 22  | want to quit ?"|
00001ca0  0d 0a 96 44 c8 99 20 22  57 69 6d 70 5f 52 65 70  |...D.. "Wimp_Rep|
00001cb0  6f 72 74 45 72 72 6f 72  22 2c 62 6c 6f 63 6b 25  |ortError",block%|
00001cc0  2c 26 31 33 2c 22 43 61  6c 65 6e 64 61 72 20 50  |,&13,"Calendar P|
00001cd0  72 69 6e 74 65 72 22 20  b8 20 2c 72 65 73 70 6f  |rinter" . ,respo|
00001ce0  6e 73 65 25 0d 0a a0 13  e7 20 72 65 73 70 6f 6e  |nse%..... respon|
00001cf0  73 65 25 3d 31 20 8c 0d  0a aa 06 3d b9 0d 0a b4  |se%=1 .....=....|
00001d00  05 cc 0d 0a be 06 3d a3  0d 0a c8 05 cd 0d 0a d2  |......=.........|
00001d10  05 3a 0d 0a dc 0e dd f2  64 65 6c 61 79 28 6e 29  |.:......delay(n)|
00001d20  0d 0a e6 07 d1 3d 30 0d  0a f0 0c f5 20 fd 20 91  |.....=0..... . .|
00001d30  3e 3d 6e 0d 0a fa 05 e1  0d 0b 04 05 3a 0d 0b 0e  |>=n.........:...|
00001d40  29 dd f2 64 61 74 65 28  f8 20 64 25 2c f8 20 6d  |)..date(. d%,. m|
00001d50  25 2c f8 20 79 25 2c f8  20 64 77 25 2c f8 20 64  |%,. y%,. dw%,. d|
00001d60  61 79 6e 6f 25 29 0d 0b  18 0d ea 20 79 31 25 2c  |ayno%)..... y1%,|
00001d70  6d 31 25 0d 0b 22 47 f4  20 64 20 69 73 20 64 61  |m1%.."G. d is da|
00001d80  79 20 6f 66 20 6d 6f 6e  74 68 2c 20 6d 20 69 73  |y of month, m is|
00001d90  20 6d 6f 6e 74 68 2c 20  79 20 69 73 20 79 65 61  | month, y is yea|
00001da0  72 2c 20 64 77 20 69 73  20 64 61 79 20 6f 66 20  |r, dw is day of |
00001db0  77 65 65 6b 20 28 30 2d  36 29 0d 0b 2c 18 e7 20  |week (0-6)..,.. |
00001dc0  79 25 3c 31 30 30 20 8c  20 79 25 2b 3d 63 65 6e  |y%<100 . y%+=cen|
00001dd0  74 25 0d 0b 36 0b c8 95  20 6d 25 3c 31 0d 0b 40  |t%..6... m%<1..@|
00001de0  13 f2 64 65 63 79 65 61  72 28 6d 25 2c 79 25 29  |..decyear(m%,y%)|
00001df0  0d 0b 4a 05 ce 0d 0b 54  0c c8 95 20 6d 25 3e 31  |..J....T... m%>1|
00001e00  32 0d 0b 5e 13 f2 61 64  64 79 65 61 72 28 6d 25  |2..^..addyear(m%|
00001e10  2c 79 25 29 0d 0b 68 05  ce 0d 0b 72 0b c8 95 20  |,y%)..h....r... |
00001e20  64 25 3c 31 0d 0b 7c 17  f2 73 75 62 6d 6f 6e 74  |d%<1..|..submont|
00001e30  68 28 64 25 2c 6d 25 2c  79 25 29 0d 0b 86 05 ce  |h(d%,m%,y%).....|
00001e40  0d 0b 90 2b c8 95 20 64  25 3e 20 64 61 79 73 6f  |...+.. d%> dayso|
00001e50  66 6d 6f 6e 74 68 28 6d  25 29 2b a4 6c 65 61 70  |fmonth(m%)+.leap|
00001e60  79 65 61 72 28 6d 25 2c  79 25 29 0d 0b 9a 17 f2  |year(m%,y%).....|
00001e70  61 64 64 6d 6f 6e 74 68  28 64 25 2c 6d 25 2c 79  |addmonth(d%,m%,y|
00001e80  25 29 0d 0b a4 05 ce 0d  0b ae 19 64 61 79 6e 6f  |%).........dayno|
00001e90  25 3d a4 64 61 79 28 64  25 2c 6d 25 2c 79 25 29  |%=.day(d%,m%,y%)|
00001ea0  0d 0b b8 10 64 77 25 3d  64 61 79 6e 6f 25 83 37  |....dw%=dayno%.7|
00001eb0  0d 0b c2 05 e1 0d 0b cc  05 3a 0d 0b d6 18 dd f2  |.........:......|
00001ec0  64 65 63 79 65 61 72 28  f8 20 6d 25 2c f8 20 79  |decyear(. m%,. y|
00001ed0  25 29 0d 0b e0 09 79 25  2d 3d 31 0d 0b ea 0a 6d  |%)....y%-=1....m|
00001ee0  25 2b 3d 31 32 0d 0b f4  05 e1 0d 0b fe 05 3a 0d  |%+=12.........:.|
00001ef0  0c 08 18 dd f2 61 64 64  79 65 61 72 28 f8 20 6d  |.....addyear(. m|
00001f00  25 2c f8 20 79 25 29 0d  0c 12 09 79 25 2b 3d 31  |%,. y%)....y%+=1|
00001f10  0d 0c 1c 0a 6d 25 2d 3d  31 32 0d 0c 26 05 e1 0d  |....m%-=12..&...|
00001f20  0c 30 05 3a 0d 0c 3a 1e  dd f2 73 75 62 6d 6f 6e  |.0.:..:...submon|
00001f30  74 68 28 f8 20 64 25 2c  f8 20 6d 25 2c f8 20 79  |th(. d%,. m%,. y|
00001f40  25 29 0d 0c 44 09 6d 25  2d 3d 31 0d 0c 4e 1c e7  |%)..D.m%-=1..N..|
00001f50  20 6d 25 3c 31 20 8c 20  f2 64 65 63 79 65 61 72  | m%<1 . .decyear|
00001f60  28 6d 25 2c 79 25 29 0d  0c 58 28 64 25 2b 3d 64  |(m%,y%)..X(d%+=d|
00001f70  61 79 73 6f 66 6d 6f 6e  74 68 28 6d 25 29 2b a4  |aysofmonth(m%)+.|
00001f80  6c 65 61 70 79 65 61 72  28 6d 25 2c 79 25 29 0d  |leapyear(m%,y%).|
00001f90  0c 62 05 e1 0d 0c 6c 05  3a 0d 0c 76 1e dd f2 61  |.b....l.:..v...a|
00001fa0  64 64 6d 6f 6e 74 68 28  f8 20 64 25 2c f8 20 6d  |ddmonth(. d%,. m|
00001fb0  25 2c f8 20 79 25 29 0d  0c 80 2a 64 25 2d 3d 28  |%,. y%)...*d%-=(|
00001fc0  64 61 79 73 6f 66 6d 6f  6e 74 68 28 6d 25 29 2b  |daysofmonth(m%)+|
00001fd0  a4 6c 65 61 70 79 65 61  72 28 6d 25 2c 79 25 29  |.leapyear(m%,y%)|
00001fe0  29 0d 0c 8a 09 6d 25 2b  3d 31 0d 0c 94 1d e7 20  |)....m%+=1..... |
00001ff0  6d 25 3e 31 32 20 8c 20  f2 61 64 64 79 65 61 72  |m%>12 . .addyear|
00002000  28 6d 25 2c 79 25 29 0d  0c 9e 05 e1 0d 0c a8 05  |(m%,y%).........|
00002010  3a 0d 0c b2 15 dd a4 6c  65 61 70 79 65 61 72 28  |:......leapyear(|
00002020  6d 25 2c 79 25 29 0d 0c  bc 32 3d 28 28 30 3d 79  |m%,y%)...2=((0=y|
00002030  25 83 34 20 80 20 28 79  25 83 31 30 30 3c 3e 30  |%.4 . (y%.100<>0|
00002040  20 84 20 79 25 83 34 30  30 3d 30 29 29 20 80 20  | . y%.400=0)) . |
00002050  6d 25 3d 32 29 2a 2d 31  0d 0c c6 05 3a 0d 0c d0  |m%=2)*-1....:...|
00002060  13 dd a4 64 61 79 28 64  25 2c 6d 25 2c 79 25 29  |...day(d%,m%,y%)|
00002070  0d 0c da 60 3d 28 33 36  35 2a 79 25 2b 79 25 81  |...`=(365*y%+y%.|
00002080  34 2d 79 25 81 31 30 30  2b 79 25 81 34 30 30 2b  |4-y%.100+y%.400+|
00002090  44 61 79 73 47 6f 6e 65  25 28 6d 25 2d 31 29 2d  |DaysGone%(m%-1)-|
000020a0  28 a4 6c 65 61 70 79 65  61 72 28 32 2c 79 25 29  |(.leapyear(2,y%)|
000020b0  3d 31 20 80 20 6d 25 3e  32 29 2b 64 25 2d 32 2d  |=1 . m%>2)+d%-2-|
000020c0  a4 6c 65 61 70 79 65 61  72 28 32 2c 79 25 29 29  |.leapyear(2,y%))|
000020d0  0d 0c e4 05 3a 0d 0c ee  05 3a 0d 0c f8 11 dd f2  |....:....:......|
000020e0  63 6c 65 61 72 28 41 24  28 29 29 0d 0d 02 08 ea  |clear(A$()).....|
000020f0  20 49 25 0d 0d 0c 0f e3  20 49 25 3d 30 20 b8 20  | I%..... I%=0 . |
00002100  33 35 0d 0d 16 12 41 24  28 49 25 29 3d 43 52 24  |35....A$(I%)=CR$|
00002110  2b 4c 46 24 0d 0d 20 08  ed 20 49 25 0d 0d 2a 0e  |+LF$.. .. I%..*.|
00002120  41 24 28 33 36 29 3d 43  52 24 0d 0d 34 05 e1 0d  |A$(36)=CR$..4...|
00002130  0d 3e 05 3a 0d 0d 48 14  dd f2 6c 6f 61 64 5f 61  |.>.:..H...load_a|
00002140  72 72 61 79 28 79 25 29  0d 0d 52 14 f2 63 6c 65  |rray(y%)..R..cle|
00002150  61 72 28 61 6c 69 6e 65  24 28 29 29 0d 0d 5c 1b  |ar(aline$())..\.|
00002160  61 6c 69 6e 65 24 28 30  29 3d c3 28 79 25 29 2b  |aline$(0)=.(y%)+|
00002170  43 52 24 2b 4c 46 24 0d  0d 66 17 61 6c 69 6e 65  |CR$+LF$..f.aline|
00002180  24 28 31 29 3d 6d 6f 6e  74 68 24 28 31 29 0d 0d  |$(1)=month$(1)..|
00002190  70 32 61 6c 69 6e 65 24  28 32 29 3d 61 64 61 79  |p2aline$(2)=aday|
000021a0  73 24 2b 73 70 24 2b 61  64 61 79 73 24 2b 73 70  |s$+sp$+adays$+sp|
000021b0  24 2b 61 64 61 79 73 24  2b 43 52 24 2b 4c 46 24  |$+adays$+CR$+LF$|
000021c0  0d 0d 7a 17 f2 66 69 6c  6c 63 61 6c 65 6e 64 61  |..z..fillcalenda|
000021d0  72 28 31 2c 79 25 29 0d  0d 84 1b 61 6c 69 6e 65  |r(1,y%)....aline|
000021e0  24 28 33 29 3d c2 6c 69  6e 65 24 28 30 29 2c 32  |$(3)=.line$(0),2|
000021f0  30 29 0d 0d 8e 1b 61 6c  69 6e 65 24 28 34 29 3d  |0)....aline$(4)=|
00002200  c2 6c 69 6e 65 24 28 31  29 2c 32 30 29 0d 0d 98  |.line$(1),20)...|
00002210  1b 61 6c 69 6e 65 24 28  35 29 3d c2 6c 69 6e 65  |.aline$(5)=.line|
00002220  24 28 32 29 2c 32 30 29  0d 0d a2 1b 61 6c 69 6e  |$(2),20)....alin|
00002230  65 24 28 36 29 3d c2 6c  69 6e 65 24 28 33 29 2c  |e$(6)=.line$(3),|
00002240  32 30 29 0d 0d ac 1b 61  6c 69 6e 65 24 28 37 29  |20)....aline$(7)|
00002250  3d c2 6c 69 6e 65 24 28  34 29 2c 32 30 29 0d 0d  |=.line$(4),20)..|
00002260  b6 1b 61 6c 69 6e 65 24  28 38 29 3d c2 6c 69 6e  |..aline$(8)=.lin|
00002270  65 24 28 35 29 2c 32 30  29 0d 0d c0 17 f2 66 69  |e$(5),20).....fi|
00002280  6c 6c 63 61 6c 65 6e 64  61 72 28 32 2c 79 25 29  |llcalendar(2,y%)|
00002290  0d 0d ca 2f 61 6c 69 6e  65 24 28 31 29 3d c0 61  |.../aline$(1)=.a|
000022a0  6c 69 6e 65 24 28 31 29  2b 70 61 64 24 2c 32 30  |line$(1)+pad$,20|
000022b0  29 2b 73 70 24 2b 6d 6f  6e 74 68 24 28 32 29 0d  |)+sp$+month$(2).|
000022c0  0d d4 20 61 6c 69 6e 65  24 28 33 29 2b 3d 73 70  |.. aline$(3)+=sp|
000022d0  24 2b c2 6c 69 6e 65 24  28 30 29 2c 32 30 29 0d  |$+.line$(0),20).|
000022e0  0d de 20 61 6c 69 6e 65  24 28 34 29 2b 3d 73 70  |.. aline$(4)+=sp|
000022f0  24 2b c2 6c 69 6e 65 24  28 31 29 2c 32 30 29 0d  |$+.line$(1),20).|
00002300  0d e8 20 61 6c 69 6e 65  24 28 35 29 2b 3d 73 70  |.. aline$(5)+=sp|
00002310  24 2b c2 6c 69 6e 65 24  28 32 29 2c 32 30 29 0d  |$+.line$(2),20).|
00002320  0d f2 20 61 6c 69 6e 65  24 28 36 29 2b 3d 73 70  |.. aline$(6)+=sp|
00002330  24 2b c2 6c 69 6e 65 24  28 33 29 2c 32 30 29 0d  |$+.line$(3),20).|
00002340  0d fc 20 61 6c 69 6e 65  24 28 37 29 2b 3d 73 70  |.. aline$(7)+=sp|
00002350  24 2b c2 6c 69 6e 65 24  28 34 29 2c 32 30 29 0d  |$+.line$(4),20).|
00002360  0e 06 20 61 6c 69 6e 65  24 28 38 29 2b 3d 73 70  |.. aline$(8)+=sp|
00002370  24 2b c2 6c 69 6e 65 24  28 35 29 2c 32 30 29 0d  |$+.line$(5),20).|
00002380  0e 10 17 f2 66 69 6c 6c  63 61 6c 65 6e 64 61 72  |....fillcalendar|
00002390  28 33 2c 79 25 29 0d 0e  1a 37 61 6c 69 6e 65 24  |(3,y%)...7aline$|
000023a0  28 31 29 3d c0 61 6c 69  6e 65 24 28 31 29 2b 70  |(1)=.aline$(1)+p|
000023b0  61 64 24 2c 34 32 29 2b  73 70 24 2b 6d 6f 6e 74  |ad$,42)+sp$+mont|
000023c0  68 24 28 33 29 2b 43 52  24 2b 4c 46 24 0d 0e 24  |h$(3)+CR$+LF$..$|
000023d0  28 61 6c 69 6e 65 24 28  33 29 2b 3d 73 70 24 2b  |(aline$(3)+=sp$+|
000023e0  c2 6c 69 6e 65 24 28 30  29 2c 32 30 29 2b 43 52  |.line$(0),20)+CR|
000023f0  24 2b 4c 46 24 0d 0e 2e  28 61 6c 69 6e 65 24 28  |$+LF$...(aline$(|
00002400  34 29 2b 3d 73 70 24 2b  c2 6c 69 6e 65 24 28 31  |4)+=sp$+.line$(1|
00002410  29 2c 32 30 29 2b 43 52  24 2b 4c 46 24 0d 0e 38  |),20)+CR$+LF$..8|
00002420  28 61 6c 69 6e 65 24 28  35 29 2b 3d 73 70 24 2b  |(aline$(5)+=sp$+|
00002430  c2 6c 69 6e 65 24 28 32  29 2c 32 30 29 2b 43 52  |.line$(2),20)+CR|
00002440  24 2b 4c 46 24 0d 0e 42  28 61 6c 69 6e 65 24 28  |$+LF$..B(aline$(|
00002450  36 29 2b 3d 73 70 24 2b  c2 6c 69 6e 65 24 28 33  |6)+=sp$+.line$(3|
00002460  29 2c 32 30 29 2b 43 52  24 2b 4c 46 24 0d 0e 4c  |),20)+CR$+LF$..L|
00002470  28 61 6c 69 6e 65 24 28  37 29 2b 3d 73 70 24 2b  |(aline$(7)+=sp$+|
00002480  c2 6c 69 6e 65 24 28 34  29 2c 32 30 29 2b 43 52  |.line$(4),20)+CR|
00002490  24 2b 4c 46 24 0d 0e 56  28 61 6c 69 6e 65 24 28  |$+LF$..V(aline$(|
000024a0  38 29 2b 3d 73 70 24 2b  c2 6c 69 6e 65 24 28 35  |8)+=sp$+.line$(5|
000024b0  29 2c 32 30 29 2b 43 52  24 2b 4c 46 24 0d 0e 60  |),20)+CR$+LF$..`|
000024c0  18 61 6c 69 6e 65 24 28  31 30 29 3d 6d 6f 6e 74  |.aline$(10)=mont|
000024d0  68 24 28 34 29 0d 0e 6a  18 61 6c 69 6e 65 24 28  |h$(4)..j.aline$(|
000024e0  31 31 29 3d 61 6c 69 6e  65 24 28 32 29 0d 0e 74  |11)=aline$(2)..t|
000024f0  17 f2 66 69 6c 6c 63 61  6c 65 6e 64 61 72 28 34  |..fillcalendar(4|
00002500  2c 79 25 29 0d 0e 7e 1c  61 6c 69 6e 65 24 28 31  |,y%)..~.aline$(1|
00002510  32 29 3d c2 6c 69 6e 65  24 28 30 29 2c 32 30 29  |2)=.line$(0),20)|
00002520  0d 0e 88 1c 61 6c 69 6e  65 24 28 31 33 29 3d c2  |....aline$(13)=.|
00002530  6c 69 6e 65 24 28 31 29  2c 32 30 29 0d 0e 92 1c  |line$(1),20)....|
00002540  61 6c 69 6e 65 24 28 31  34 29 3d c2 6c 69 6e 65  |aline$(14)=.line|
00002550  24 28 32 29 2c 32 30 29  0d 0e 9c 1c 61 6c 69 6e  |$(2),20)....alin|
00002560  65 24 28 31 35 29 3d c2  6c 69 6e 65 24 28 33 29  |e$(15)=.line$(3)|
00002570  2c 32 30 29 0d 0e a6 1c  61 6c 69 6e 65 24 28 31  |,20)....aline$(1|
00002580  36 29 3d c2 6c 69 6e 65  24 28 34 29 2c 32 30 29  |6)=.line$(4),20)|
00002590  0d 0e b0 1c 61 6c 69 6e  65 24 28 31 37 29 3d c2  |....aline$(17)=.|
000025a0  6c 69 6e 65 24 28 35 29  2c 32 30 29 0d 0e ba 17  |line$(5),20)....|
000025b0  f2 66 69 6c 6c 63 61 6c  65 6e 64 61 72 28 35 2c  |.fillcalendar(5,|
000025c0  79 25 29 0d 0e c4 31 61  6c 69 6e 65 24 28 31 30  |y%)...1aline$(10|
000025d0  29 3d c0 61 6c 69 6e 65  24 28 31 30 29 2b 70 61  |)=.aline$(10)+pa|
000025e0  64 24 2c 32 30 29 2b 73  70 24 2b 6d 6f 6e 74 68  |d$,20)+sp$+month|
000025f0  24 28 35 29 0d 0e ce 21  61 6c 69 6e 65 24 28 31  |$(5)...!aline$(1|
00002600  32 29 2b 3d 73 70 24 2b  c2 6c 69 6e 65 24 28 30  |2)+=sp$+.line$(0|
00002610  29 2c 32 30 29 0d 0e d8  21 61 6c 69 6e 65 24 28  |),20)...!aline$(|
00002620  31 33 29 2b 3d 73 70 24  2b c2 6c 69 6e 65 24 28  |13)+=sp$+.line$(|
00002630  31 29 2c 32 30 29 0d 0e  e2 21 61 6c 69 6e 65 24  |1),20)...!aline$|
00002640  28 31 34 29 2b 3d 73 70  24 2b c2 6c 69 6e 65 24  |(14)+=sp$+.line$|
00002650  28 32 29 2c 32 30 29 0d  0e ec 21 61 6c 69 6e 65  |(2),20)...!aline|
00002660  24 28 31 35 29 2b 3d 73  70 24 2b c2 6c 69 6e 65  |$(15)+=sp$+.line|
00002670  24 28 33 29 2c 32 30 29  0d 0e f6 21 61 6c 69 6e  |$(3),20)...!alin|
00002680  65 24 28 31 36 29 2b 3d  73 70 24 2b c2 6c 69 6e  |e$(16)+=sp$+.lin|
00002690  65 24 28 34 29 2c 32 30  29 0d 0f 00 21 61 6c 69  |e$(4),20)...!ali|
000026a0  6e 65 24 28 31 37 29 2b  3d 73 70 24 2b c2 6c 69  |ne$(17)+=sp$+.li|
000026b0  6e 65 24 28 35 29 2c 32  30 29 0d 0f 0a 17 f2 66  |ne$(5),20).....f|
000026c0  69 6c 6c 63 61 6c 65 6e  64 61 72 28 36 2c 79 25  |illcalendar(6,y%|
000026d0  29 0d 0f 14 39 61 6c 69  6e 65 24 28 31 30 29 3d  |)...9aline$(10)=|
000026e0  c0 61 6c 69 6e 65 24 28  31 30 29 2b 70 61 64 24  |.aline$(10)+pad$|
000026f0  2c 34 32 29 2b 73 70 24  2b 6d 6f 6e 74 68 24 28  |,42)+sp$+month$(|
00002700  36 29 2b 43 52 24 2b 4c  46 24 0d 0f 1e 29 61 6c  |6)+CR$+LF$...)al|
00002710  69 6e 65 24 28 31 32 29  2b 3d 73 70 24 2b c2 6c  |ine$(12)+=sp$+.l|
00002720  69 6e 65 24 28 30 29 2c  32 30 29 2b 43 52 24 2b  |ine$(0),20)+CR$+|
00002730  4c 46 24 0d 0f 28 29 61  6c 69 6e 65 24 28 31 33  |LF$..()aline$(13|
00002740  29 2b 3d 73 70 24 2b c2  6c 69 6e 65 24 28 31 29  |)+=sp$+.line$(1)|
00002750  2c 32 30 29 2b 43 52 24  2b 4c 46 24 0d 0f 32 29  |,20)+CR$+LF$..2)|
00002760  61 6c 69 6e 65 24 28 31  34 29 2b 3d 73 70 24 2b  |aline$(14)+=sp$+|
00002770  c2 6c 69 6e 65 24 28 32  29 2c 32 30 29 2b 43 52  |.line$(2),20)+CR|
00002780  24 2b 4c 46 24 0d 0f 3c  29 61 6c 69 6e 65 24 28  |$+LF$..<)aline$(|
00002790  31 35 29 2b 3d 73 70 24  2b c2 6c 69 6e 65 24 28  |15)+=sp$+.line$(|
000027a0  33 29 2c 32 30 29 2b 43  52 24 2b 4c 46 24 0d 0f  |3),20)+CR$+LF$..|
000027b0  46 29 61 6c 69 6e 65 24  28 31 36 29 2b 3d 73 70  |F)aline$(16)+=sp|
000027c0  24 2b c2 6c 69 6e 65 24  28 34 29 2c 32 30 29 2b  |$+.line$(4),20)+|
000027d0  43 52 24 2b 4c 46 24 0d  0f 50 29 61 6c 69 6e 65  |CR$+LF$..P)aline|
000027e0  24 28 31 37 29 2b 3d 73  70 24 2b c2 6c 69 6e 65  |$(17)+=sp$+.line|
000027f0  24 28 35 29 2c 32 30 29  2b 43 52 24 2b 4c 46 24  |$(5),20)+CR$+LF$|
00002800  0d 0f 5a 18 61 6c 69 6e  65 24 28 31 39 29 3d 6d  |..Z.aline$(19)=m|
00002810  6f 6e 74 68 24 28 37 29  0d 0f 64 18 61 6c 69 6e  |onth$(7)..d.alin|
00002820  65 24 28 32 30 29 3d 61  6c 69 6e 65 24 28 32 29  |e$(20)=aline$(2)|
00002830  0d 0f 6e 17 f2 66 69 6c  6c 63 61 6c 65 6e 64 61  |..n..fillcalenda|
00002840  72 28 37 2c 79 25 29 0d  0f 78 1c 61 6c 69 6e 65  |r(7,y%)..x.aline|
00002850  24 28 32 31 29 3d c2 6c  69 6e 65 24 28 30 29 2c  |$(21)=.line$(0),|
00002860  32 30 29 0d 0f 82 1c 61  6c 69 6e 65 24 28 32 32  |20)....aline$(22|
00002870  29 3d c2 6c 69 6e 65 24  28 31 29 2c 32 30 29 0d  |)=.line$(1),20).|
00002880  0f 8c 1c 61 6c 69 6e 65  24 28 32 33 29 3d c2 6c  |...aline$(23)=.l|
00002890  69 6e 65 24 28 32 29 2c  32 30 29 0d 0f 96 1c 61  |ine$(2),20)....a|
000028a0  6c 69 6e 65 24 28 32 34  29 3d c2 6c 69 6e 65 24  |line$(24)=.line$|
000028b0  28 33 29 2c 32 30 29 0d  0f a0 1c 61 6c 69 6e 65  |(3),20)....aline|
000028c0  24 28 32 35 29 3d c2 6c  69 6e 65 24 28 34 29 2c  |$(25)=.line$(4),|
000028d0  32 30 29 0d 0f aa 1c 61  6c 69 6e 65 24 28 32 36  |20)....aline$(26|
000028e0  29 3d c2 6c 69 6e 65 24  28 35 29 2c 32 30 29 0d  |)=.line$(5),20).|
000028f0  0f b4 17 f2 66 69 6c 6c  63 61 6c 65 6e 64 61 72  |....fillcalendar|
00002900  28 38 2c 79 25 29 0d 0f  be 31 61 6c 69 6e 65 24  |(8,y%)...1aline$|
00002910  28 31 39 29 3d c0 61 6c  69 6e 65 24 28 31 39 29  |(19)=.aline$(19)|
00002920  2b 70 61 64 24 2c 32 30  29 2b 73 70 24 2b 6d 6f  |+pad$,20)+sp$+mo|
00002930  6e 74 68 24 28 38 29 0d  0f c8 21 61 6c 69 6e 65  |nth$(8)...!aline|
00002940  24 28 32 31 29 2b 3d 73  70 24 2b c2 6c 69 6e 65  |$(21)+=sp$+.line|
00002950  24 28 30 29 2c 32 30 29  0d 0f d2 21 61 6c 69 6e  |$(0),20)...!alin|
00002960  65 24 28 32 32 29 2b 3d  73 70 24 2b c2 6c 69 6e  |e$(22)+=sp$+.lin|
00002970  65 24 28 31 29 2c 32 30  29 0d 0f dc 21 61 6c 69  |e$(1),20)...!ali|
00002980  6e 65 24 28 32 33 29 2b  3d 73 70 24 2b c2 6c 69  |ne$(23)+=sp$+.li|
00002990  6e 65 24 28 32 29 2c 32  30 29 0d 0f e6 21 61 6c  |ne$(2),20)...!al|
000029a0  69 6e 65 24 28 32 34 29  2b 3d 73 70 24 2b c2 6c  |ine$(24)+=sp$+.l|
000029b0  69 6e 65 24 28 33 29 2c  32 30 29 0d 0f f0 21 61  |ine$(3),20)...!a|
000029c0  6c 69 6e 65 24 28 32 35  29 2b 3d 73 70 24 2b c2  |line$(25)+=sp$+.|
000029d0  6c 69 6e 65 24 28 34 29  2c 32 30 29 0d 0f fa 21  |line$(4),20)...!|
000029e0  61 6c 69 6e 65 24 28 32  36 29 2b 3d 73 70 24 2b  |aline$(26)+=sp$+|
000029f0  c2 6c 69 6e 65 24 28 35  29 2c 32 30 29 0d 10 04  |.line$(5),20)...|
00002a00  17 f2 66 69 6c 6c 63 61  6c 65 6e 64 61 72 28 39  |..fillcalendar(9|
00002a10  2c 79 25 29 0d 10 0e 39  61 6c 69 6e 65 24 28 31  |,y%)...9aline$(1|
00002a20  39 29 3d c0 61 6c 69 6e  65 24 28 31 39 29 2b 70  |9)=.aline$(19)+p|
00002a30  61 64 24 2c 34 32 29 2b  73 70 24 2b 6d 6f 6e 74  |ad$,42)+sp$+mont|
00002a40  68 24 28 39 29 2b 43 52  24 2b 4c 46 24 0d 10 18  |h$(9)+CR$+LF$...|
00002a50  29 61 6c 69 6e 65 24 28  32 31 29 2b 3d 73 70 24  |)aline$(21)+=sp$|
00002a60  2b c2 6c 69 6e 65 24 28  30 29 2c 32 30 29 2b 43  |+.line$(0),20)+C|
00002a70  52 24 2b 4c 46 24 0d 10  22 29 61 6c 69 6e 65 24  |R$+LF$..")aline$|
00002a80  28 32 32 29 2b 3d 73 70  24 2b c2 6c 69 6e 65 24  |(22)+=sp$+.line$|
00002a90  28 31 29 2c 32 30 29 2b  43 52 24 2b 4c 46 24 0d  |(1),20)+CR$+LF$.|
00002aa0  10 2c 29 61 6c 69 6e 65  24 28 32 33 29 2b 3d 73  |.,)aline$(23)+=s|
00002ab0  70 24 2b c2 6c 69 6e 65  24 28 32 29 2c 32 30 29  |p$+.line$(2),20)|
00002ac0  2b 43 52 24 2b 4c 46 24  0d 10 36 29 61 6c 69 6e  |+CR$+LF$..6)alin|
00002ad0  65 24 28 32 34 29 2b 3d  73 70 24 2b c2 6c 69 6e  |e$(24)+=sp$+.lin|
00002ae0  65 24 28 33 29 2c 32 30  29 2b 43 52 24 2b 4c 46  |e$(3),20)+CR$+LF|
00002af0  24 0d 10 40 29 61 6c 69  6e 65 24 28 32 35 29 2b  |$..@)aline$(25)+|
00002b00  3d 73 70 24 2b c2 6c 69  6e 65 24 28 34 29 2c 32  |=sp$+.line$(4),2|
00002b10  30 29 2b 43 52 24 2b 4c  46 24 0d 10 4a 29 61 6c  |0)+CR$+LF$..J)al|
00002b20  69 6e 65 24 28 32 36 29  2b 3d 73 70 24 2b c2 6c  |ine$(26)+=sp$+.l|
00002b30  69 6e 65 24 28 35 29 2c  32 30 29 2b 43 52 24 2b  |ine$(5),20)+CR$+|
00002b40  4c 46 24 0d 10 54 19 61  6c 69 6e 65 24 28 32 38  |LF$..T.aline$(28|
00002b50  29 3d 6d 6f 6e 74 68 24  28 31 30 29 0d 10 5e 18  |)=month$(10)..^.|
00002b60  61 6c 69 6e 65 24 28 32  39 29 3d 61 6c 69 6e 65  |aline$(29)=aline|
00002b70  24 28 32 29 0d 10 68 18  f2 66 69 6c 6c 63 61 6c  |$(2)..h..fillcal|
00002b80  65 6e 64 61 72 28 31 30  2c 79 25 29 0d 10 72 1c  |endar(10,y%)..r.|
00002b90  61 6c 69 6e 65 24 28 33  30 29 3d c2 6c 69 6e 65  |aline$(30)=.line|
00002ba0  24 28 30 29 2c 32 30 29  0d 10 7c 1c 61 6c 69 6e  |$(0),20)..|.alin|
00002bb0  65 24 28 33 31 29 3d c2  6c 69 6e 65 24 28 31 29  |e$(31)=.line$(1)|
00002bc0  2c 32 30 29 0d 10 86 1c  61 6c 69 6e 65 24 28 33  |,20)....aline$(3|
00002bd0  32 29 3d c2 6c 69 6e 65  24 28 32 29 2c 32 30 29  |2)=.line$(2),20)|
00002be0  0d 10 90 1c 61 6c 69 6e  65 24 28 33 33 29 3d c2  |....aline$(33)=.|
00002bf0  6c 69 6e 65 24 28 33 29  2c 32 30 29 0d 10 9a 1c  |line$(3),20)....|
00002c00  61 6c 69 6e 65 24 28 33  34 29 3d c2 6c 69 6e 65  |aline$(34)=.line|
00002c10  24 28 34 29 2c 32 30 29  0d 10 a4 1c 61 6c 69 6e  |$(4),20)....alin|
00002c20  65 24 28 33 35 29 3d c2  6c 69 6e 65 24 28 35 29  |e$(35)=.line$(5)|
00002c30  2c 32 30 29 0d 10 ae 18  f2 66 69 6c 6c 63 61 6c  |,20).....fillcal|
00002c40  65 6e 64 61 72 28 31 31  2c 79 25 29 0d 10 b8 32  |endar(11,y%)...2|
00002c50  61 6c 69 6e 65 24 28 32  38 29 3d c0 61 6c 69 6e  |aline$(28)=.alin|
00002c60  65 24 28 32 38 29 2b 70  61 64 24 2c 32 30 29 2b  |e$(28)+pad$,20)+|
00002c70  73 70 24 2b 6d 6f 6e 74  68 24 28 31 31 29 0d 10  |sp$+month$(11)..|
00002c80  c2 21 61 6c 69 6e 65 24  28 33 30 29 2b 3d 73 70  |.!aline$(30)+=sp|
00002c90  24 2b c2 6c 69 6e 65 24  28 30 29 2c 32 30 29 0d  |$+.line$(0),20).|
00002ca0  10 cc 21 61 6c 69 6e 65  24 28 33 31 29 2b 3d 73  |..!aline$(31)+=s|
00002cb0  70 24 2b c2 6c 69 6e 65  24 28 31 29 2c 32 30 29  |p$+.line$(1),20)|
00002cc0  0d 10 d6 21 61 6c 69 6e  65 24 28 33 32 29 2b 3d  |...!aline$(32)+=|
00002cd0  73 70 24 2b c2 6c 69 6e  65 24 28 32 29 2c 32 30  |sp$+.line$(2),20|
00002ce0  29 0d 10 e0 21 61 6c 69  6e 65 24 28 33 33 29 2b  |)...!aline$(33)+|
00002cf0  3d 73 70 24 2b c2 6c 69  6e 65 24 28 33 29 2c 32  |=sp$+.line$(3),2|
00002d00  30 29 0d 10 ea 21 61 6c  69 6e 65 24 28 33 34 29  |0)...!aline$(34)|
00002d10  2b 3d 73 70 24 2b c2 6c  69 6e 65 24 28 34 29 2c  |+=sp$+.line$(4),|
00002d20  32 30 29 0d 10 f4 21 61  6c 69 6e 65 24 28 33 35  |20)...!aline$(35|
00002d30  29 2b 3d 73 70 24 2b c2  6c 69 6e 65 24 28 35 29  |)+=sp$+.line$(5)|
00002d40  2c 32 30 29 0d 10 fe 18  f2 66 69 6c 6c 63 61 6c  |,20).....fillcal|
00002d50  65 6e 64 61 72 28 31 32  2c 79 25 29 0d 11 08 3a  |endar(12,y%)...:|
00002d60  61 6c 69 6e 65 24 28 32  38 29 3d c0 61 6c 69 6e  |aline$(28)=.alin|
00002d70  65 24 28 32 38 29 2b 70  61 64 24 2c 34 32 29 2b  |e$(28)+pad$,42)+|
00002d80  73 70 24 2b 6d 6f 6e 74  68 24 28 31 32 29 2b 43  |sp$+month$(12)+C|
00002d90  52 24 2b 4c 46 24 0d 11  12 29 61 6c 69 6e 65 24  |R$+LF$...)aline$|
00002da0  28 33 30 29 2b 3d 73 70  24 2b c2 6c 69 6e 65 24  |(30)+=sp$+.line$|
00002db0  28 30 29 2c 32 30 29 2b  43 52 24 2b 4c 46 24 0d  |(0),20)+CR$+LF$.|
00002dc0  11 1c 29 61 6c 69 6e 65  24 28 33 31 29 2b 3d 73  |..)aline$(31)+=s|
00002dd0  70 24 2b c2 6c 69 6e 65  24 28 31 29 2c 32 30 29  |p$+.line$(1),20)|
00002de0  2b 43 52 24 2b 4c 46 24  0d 11 26 29 61 6c 69 6e  |+CR$+LF$..&)alin|
00002df0  65 24 28 33 32 29 2b 3d  73 70 24 2b c2 6c 69 6e  |e$(32)+=sp$+.lin|
00002e00  65 24 28 32 29 2c 32 30  29 2b 43 52 24 2b 4c 46  |e$(2),20)+CR$+LF|
00002e10  24 0d 11 30 29 61 6c 69  6e 65 24 28 33 33 29 2b  |$..0)aline$(33)+|
00002e20  3d 73 70 24 2b c2 6c 69  6e 65 24 28 33 29 2c 32  |=sp$+.line$(3),2|
00002e30  30 29 2b 43 52 24 2b 4c  46 24 0d 11 3a 29 61 6c  |0)+CR$+LF$..:)al|
00002e40  69 6e 65 24 28 33 34 29  2b 3d 73 70 24 2b c2 6c  |ine$(34)+=sp$+.l|
00002e50  69 6e 65 24 28 34 29 2c  32 30 29 2b 43 52 24 2b  |ine$(4),20)+CR$+|
00002e60  4c 46 24 0d 11 44 29 61  6c 69 6e 65 24 28 33 35  |LF$..D)aline$(35|
00002e70  29 2b 3d 73 70 24 2b c2  6c 69 6e 65 24 28 35 29  |)+=sp$+.line$(5)|
00002e80  2c 32 30 29 2b 43 52 24  2b 4c 46 24 0d 11 4e 05  |,20)+CR$+LF$..N.|
00002e90  e1 0d 11 58 05 3a 0d 11  62 20 dd f2 66 69 6c 6c  |...X.:..b ..fill|
00002ea0  63 61 6c 65 6e 64 61 72  28 6d 6f 6e 74 68 25 2c  |calendar(month%,|
00002eb0  79 65 61 72 25 29 0d 11  6c 1b ea 20 49 25 2c 64  |year%)..l.. I%,d|
00002ec0  25 2c 6d 25 2c 79 25 2c  64 77 25 2c 64 61 79 73  |%,m%,y%,dw%,days|
00002ed0  25 0d 11 76 13 e3 20 49  25 3d 30 20 b8 20 34 31  |%..v.. I%=0 . 41|
00002ee0  20 88 20 31 0d 11 80 19  63 24 28 6d 6f 6e 74 68  | . 1....c$(month|
00002ef0  25 2d 31 2c 49 25 29 3d  22 20 20 20 22 0d 11 8a  |%-1,I%)="   "...|
00002f00  08 ed 20 49 25 0d 11 94  1b 64 25 3d 31 3a 6d 25  |.. I%....d%=1:m%|
00002f10  3d 6d 6f 6e 74 68 25 3a  79 25 3d 79 65 61 72 25  |=month%:y%=year%|
00002f20  0d 11 9e 1d f2 64 61 74  65 28 64 25 2c 6d 25 2c  |.....date(d%,m%,|
00002f30  79 25 2c 64 77 25 2c 64  61 79 73 25 29 0d 11 a8  |y%,dw%,days%)...|
00002f40  11 64 77 25 3d 28 64 77  25 2b 38 29 83 37 0d 11  |.dw%=(dw%+8).7..|
00002f50  b2 0c 63 6f 75 6e 74 25  3d 31 0d 11 bc 37 e3 20  |..count%=1...7. |
00002f60  49 25 3d 64 77 25 20 b8  20 28 64 77 25 2d 31 2b  |I%=dw% . (dw%-1+|
00002f70  64 61 79 73 6f 66 6d 6f  6e 74 68 28 6d 25 29 2b  |daysofmonth(m%)+|
00002f80  a4 6c 65 61 70 79 65 61  72 28 6d 25 2c 79 25 29  |.leapyear(m%,y%)|
00002f90  29 0d 11 c6 26 63 24 28  6d 6f 6e 74 68 25 2d 31  |)...&c$(month%-1|
00002fa0  2c 49 25 29 3d c2 22 20  20 22 2b c3 28 63 6f 75  |,I%)=."  "+.(cou|
00002fb0  6e 74 25 29 2c 33 29 0d  11 d0 0d 63 6f 75 6e 74  |nt%),3)....count|
00002fc0  25 2b 3d 31 0d 11 da 08  ed 20 49 25 0d 11 e4 0e  |%+=1..... I%....|
00002fd0  6c 69 6e 65 24 28 29 3d  22 22 0d 11 ee 0e e3 20  |line$()=""..... |
00002fe0  49 25 3d 30 20 b8 20 36  0d 11 f8 19 6c 69 6e 65  |I%=0 . 6....line|
00002ff0  24 28 30 29 2b 3d 63 24  28 6d 25 2d 31 2c 49 25  |$(0)+=c$(m%-1,I%|
00003000  29 0d 12 02 1b 6c 69 6e  65 24 28 31 29 2b 3d 63  |)....line$(1)+=c|
00003010  24 28 6d 25 2d 31 2c 49  25 2b 37 29 0d 12 0c 1c  |$(m%-1,I%+7)....|
00003020  6c 69 6e 65 24 28 32 29  2b 3d 63 24 28 6d 25 2d  |line$(2)+=c$(m%-|
00003030  31 2c 49 25 2b 31 34 29  0d 12 16 1c 6c 69 6e 65  |1,I%+14)....line|
00003040  24 28 33 29 2b 3d 63 24  28 6d 25 2d 31 2c 49 25  |$(3)+=c$(m%-1,I%|
00003050  2b 32 31 29 0d 12 20 1c  6c 69 6e 65 24 28 34 29  |+21).. .line$(4)|
00003060  2b 3d 63 24 28 6d 25 2d  31 2c 49 25 2b 32 38 29  |+=c$(m%-1,I%+28)|
00003070  0d 12 2a 1c 6c 69 6e 65  24 28 35 29 2b 3d 63 24  |..*.line$(5)+=c$|
00003080  28 6d 25 2d 31 2c 49 25  2b 33 35 29 0d 12 34 08  |(m%-1,I%+35)..4.|
00003090  ed 20 49 25 0d 12 3e 05  e1 0d 12 48 05 3a 0d 12  |. I%..>....H.:..|
000030a0  52 0e dd f2 70 72 69 6e  74 5f 68 72 0d 12 5c 24  |R...print_hr..\$|
000030b0  70 6f 69 6e 74 65 72 25  3d a4 67 65 74 70 6f 69  |pointer%=.getpoi|
000030c0  6e 74 65 72 28 77 68 61  6e 64 6c 65 25 2c 36 29  |nter(whandle%,6)|
000030d0  0d 12 66 13 64 61 74 61  24 3d 24 70 6f 69 6e 74  |..f.data$=$point|
000030e0  65 72 25 0d 12 70 12 53  69 7a 65 25 3d bb 28 64  |er%..p.Size%=.(d|
000030f0  61 74 61 24 29 0d 12 7a  33 73 69 7a 65 25 3d 73  |ata$)..z3size%=s|
00003100  69 7a 65 25 2a 31 30 30  30 20 3a f4 20 53 69 7a  |ize%*1000 :. Siz|
00003110  65 20 6f 66 20 74 65 78  74 20 69 6e 20 6d 69 6c  |e of text in mil|
00003120  6c 69 70 6f 69 6e 74 73  0d 12 84 17 6c 69 6e 65  |lipoints....line|
00003130  73 70 61 63 65 25 3d 73  69 7a 65 25 2f 31 30 0d  |space%=size%/10.|
00003140  12 8e 1c 6c 69 6e 65 73  70 61 63 65 25 3d 6c 69  |...linespace%=li|
00003150  6e 65 73 70 61 63 65 25  2a 31 35 0d 12 98 41 c8  |nespace%*15...A.|
00003160  99 20 22 46 6f 6e 74 5f  46 69 6e 64 46 6f 6e 74  |. "Font_FindFont|
00003170  22 2c 2c 22 43 6f 72 70  75 73 2e 4d 65 64 69 75  |",,"Corpus.Mediu|
00003180  6d 22 2c 73 69 7a 65 25  2f 36 35 2c 73 69 7a 65  |m",size%/65,size|
00003190  25 2f 34 30 20 b8 20 66  68 64 6c 25 0d 12 a2 15  |%/40 . fhdl%....|
000031a0  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 6e  |.. "Hourglass_On|
000031b0  22 0d 12 ac 15 70 66 25  3d ae 28 22 70 72 69 6e  |"....pf%=.("prin|
000031c0  74 65 72 3a 22 29 0d 12  b6 2c e7 20 70 66 25 3d  |ter:")...,. pf%=|
000031d0  30 20 8c 20 85 20 32 35  35 2c 20 22 50 72 69 6e  |0 . . 255, "Prin|
000031e0  74 65 72 20 6e 6f 74 20  61 76 61 69 6c 61 62 6c  |ter not availabl|
000031f0  65 22 0d 12 c0 29 c8 99  20 22 50 44 72 69 76 65  |e"...).. "PDrive|
00003200  72 5f 53 65 6c 65 63 74  4a 6f 62 22 2c 70 66 25  |r_SelectJob",pf%|
00003210  2c 22 43 61 6c 50 72 69  6e 74 22 0d 12 ca 07 ea  |,"CalPrint".....|
00003220  20 85 0d 12 d4 36 ee 20  85 20 ea 3a f7 20 85 3a  | ....6. . .:. .:|
00003230  c8 99 20 22 50 44 72 69  76 65 72 5f 41 62 6f 72  |.. "PDriver_Abor|
00003240  74 4a 6f 62 22 2c 70 66  25 3a d9 23 70 66 25 3a  |tJob",pf%:.#pf%:|
00003250  f2 63 6c 6f 73 65 3a e1  0d 12 de 1f f4 20 53 65  |.close:...... Se|
00003260  74 20 55 70 20 52 65 63  74 61 6e 67 6c 65 20 74  |t Up Rectangle t|
00003270  6f 20 50 72 69 6e 74 0d  12 e8 48 c8 99 20 22 50  |o Print...H.. "P|
00003280  44 72 69 76 65 72 5f 50  61 67 65 53 69 7a 65 22  |Driver_PageSize"|
00003290  20 b8 20 2c 2c 2c 6c 65  66 74 25 2c 62 6f 74 74  | . ,,,left%,bott|
000032a0  6f 6d 25 2c 72 69 67 68  74 25 2c 74 6f 70 25 20  |om%,right%,top% |
000032b0  20 3a f4 20 6d 69 6c 6c  69 70 6f 69 6e 74 73 0d  | :. millipoints.|
000032c0  12 f2 47 6c 65 66 74 25  3d 6c 65 66 74 25 2f 34  |..Gleft%=left%/4|
000032d0  30 30 3a 62 6f 74 74 6f  6d 25 3d 62 6f 74 74 6f  |00:bottom%=botto|
000032e0  6d 25 2f 34 30 30 3a 72  69 67 68 74 25 3d 72 69  |m%/400:right%=ri|
000032f0  67 68 74 25 2f 34 30 30  3a 74 6f 70 25 3d 74 6f  |ght%/400:top%=to|
00003300  70 25 2f 34 30 30 0d 12  fc 3e 72 65 63 74 25 21  |p%/400...>rect%!|
00003310  30 3d 6c 65 66 74 25 3a  72 65 63 74 25 21 34 3d  |0=left%:rect%!4=|
00003320  62 6f 74 74 6f 6d 25 3a  72 65 63 74 25 21 38 3d  |bottom%:rect%!8=|
00003330  72 69 67 68 74 25 3a 72  65 63 74 25 21 31 32 3d  |right%:rect%!12=|
00003340  74 6f 70 25 0d 13 06 1b  f4 20 54 72 61 6e 73 66  |top%..... Transf|
00003350  6f 72 6d 61 74 69 6f 6e  20 28 4e 75 6c 6c 29 0d  |ormation (Null).|
00003360  13 10 21 74 72 61 6e 73  25 21 30 3d 31 3c 3c 31  |..!trans%!0=1<<1|
00003370  36 3a 74 72 61 6e 73 25  21 34 3d 30 3c 3c 31 36  |6:trans%!4=0<<16|
00003380  0d 13 1a 22 74 72 61 6e  73 25 21 38 3d 30 3c 3c  |..."trans%!8=0<<|
00003390  31 36 3a 74 72 61 6e 73  25 21 31 32 3d 31 3c 3c  |16:trans%!12=1<<|
000033a0  31 36 0d 13 24 16 f4 20  50 6f 73 69 74 69 6f 6e  |16..$.. Position|
000033b0  20 74 6f 20 70 6c 6f 74  0d 13 2e 3a 70 6c 6f 74  | to plot...:plot|
000033c0  61 74 25 21 30 3d 6c 65  66 74 25 2a 34 30 30 2b  |at%!0=left%*400+|
000033d0  33 36 30 30 30 3a 70 6c  6f 74 61 74 25 21 34 3d  |36000:plotat%!4=|
000033e0  28 62 6f 74 74 6f 6d 25  29 2a 34 30 30 2d 33 36  |(bottom%)*400-36|
000033f0  30 30 0d 13 38 3f c8 99  20 22 50 44 72 69 76 65  |00..8?.. "PDrive|
00003400  72 5f 47 69 76 65 52 65  63 74 61 6e 67 6c 65 22  |r_GiveRectangle"|
00003410  2c 30 2c 72 65 63 74 25  2c 74 72 61 6e 73 25 2c  |,0,rect%,trans%,|
00003420  70 6c 6f 74 61 74 25 2c  26 46 46 46 46 46 46 30  |plotat%,&FFFFFF0|
00003430  30 0d 13 42 30 c8 99 20  22 50 44 72 69 76 65 72  |0..B0.. "PDriver|
00003440  5f 44 72 61 77 50 61 67  65 22 2c 31 2c 72 65 63  |_DrawPage",1,rec|
00003450  74 69 6e 25 2c 30 2c 30  20 b8 20 6d 6f 72 65 32  |tin%,0,0 . more2|
00003460  25 0d 13 4c 32 c8 99 20  22 43 6f 6c 6f 75 72 54  |%..L2.. "ColourT|
00003470  72 61 6e 73 5f 53 65 74  46 6f 6e 74 43 6f 6c 6f  |rans_SetFontColo|
00003480  75 72 73 22 2c 2c 26 46  46 46 46 46 46 30 30 2c  |urs",,&FFFFFF00,|
00003490  30 2c 36 0d 13 56 1b c8  99 20 22 46 6f 6e 74 5f  |0,6..V... "Font_|
000034a0  53 65 74 46 6f 6e 74 22  2c 66 68 64 6c 25 0d 13  |SetFont",fhdl%..|
000034b0  60 0d c8 95 20 6d 6f 72  65 32 25 0d 13 6a 18 f2  |`... more2%..j..|
000034c0  72 65 77 72 69 74 65 28  6c 65 66 74 25 2c 74 6f  |rewrite(left%,to|
000034d0  70 25 29 0d 13 74 2f c8  99 20 22 50 44 72 69 76  |p%)..t/.. "PDriv|
000034e0  65 72 5f 47 65 74 52 65  63 74 61 6e 67 6c 65 22  |er_GetRectangle"|
000034f0  2c 2c 72 65 63 74 69 6e  25 20 b8 20 6d 6f 72 65  |,,rectin% . more|
00003500  32 25 0d 13 7e 05 ce 0d  13 88 1b c8 99 20 22 50  |2%..~........ "P|
00003510  44 72 69 76 65 72 5f 45  6e 64 4a 6f 62 22 2c 70  |Driver_EndJob",p|
00003520  66 25 0d 13 92 16 c8 99  20 22 48 6f 75 72 67 6c  |f%...... "Hourgl|
00003530  61 73 73 5f 4f 66 66 22  0d 13 9c 09 d9 23 70 66  |ass_Off".....#pf|
00003540  25 0d 13 a6 05 e1 0d 13  b0 05 3a 0d 13 ba 13 dd  |%.........:.....|
00003550  f2 70 61 67 65 74 6f 70  72 69 6e 74 65 72 0d 13  |.pagetoprinter..|
00003560  c4 08 ea 20 6e 25 0d 13  ce 0c f2 70 61 67 65 73  |... n%.....pages|
00003570  65 74 0d 13 d8 13 f2 6d  61 72 67 69 6e 6f 64 64  |et.....marginodd|
00003580  28 78 70 25 29 0d 13 e2  13 e3 20 6e 25 3d 30 20  |(xp%)..... n%=0 |
00003590  b8 20 33 36 20 88 20 31  0d 13 ec 17 f2 4c 70 72  |. 36 . 1.....Lpr|
000035a0  69 6e 74 28 61 6c 69 6e  65 24 28 6e 25 29 29 0d  |int(aline$(n%)).|
000035b0  13 f6 08 ed 20 6e 25 0d  14 00 10 f2 4c 70 72 69  |.... n%.....Lpri|
000035c0  6e 74 28 46 46 24 29 0d  14 0a 05 e1 0d 14 14 05  |nt(FF$).........|
000035d0  3a 0d ff                                          |:..|
000035d3