Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 » StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Utils/!SiteEdit/!RunImageU

StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Utils/!SiteEdit/!RunImageU

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2
Filename: StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Utils/!SiteEdit/!RunImageU
Read OK:
File size: 28C3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20testing%=FALSE
   30LIBRARY "<HeapLibrary$File>"
   40LIBRARY "<BasicLibrary$File>":PROCinitlibrary
   50LIBRARY "<HeapLibrary$File>":PROCinitheap
   60LIBRARY "<DynMenuLibrary$File>":PROCinit_dynmenu
   70ON ERROR PROCclosemessages:PROCeerror:IF testing%=TRUE THENOSCLI("Spool"):END ELSE END
   80IF testing%=TRUE THEN*Spool Spooled
   90IF testing%=TRUE THENTRACE ON:TRACE PROC
  100REM Appname$ is used for task manager & Appname$Dir
  110REM shortname$ is used for iconbar name and should usually be null
  120REM longname$ is used for info window
  130REM AppURL$ is used to for clicks on the version icon
  140useiconbar=FALSE
  150Appname$="SiteEdit":version$="1.00 (17 Jun 1997)"
  160Appdir$=FNsystemvar(Appname$+"$Dir")
  170AppURL$="http://users.essex.ac.uk/users/gerph/acorn/internet.html#netgame"
  180PROCinitwimp
  190quit%=FALSE:init%=FALSE
  200ON ERROR PROCerror
  210IF NOT init% THEN
  220 go$=FNGetEnv:init%=TRUE
  230 IF go$<>"" THEN
  240  SYS "XOS_ReadArgs","site/A,app,task/K,port/K",go$,b%,1024 TO;flags
  250  IF (flags AND 1) THEN
  260   reply=FNerrorbox(">Message",">BadParams",%10010)
  270   quit%=TRUE
  280  ELSE
  290   sitefile$=FNstring0(b%!0)
  300   IF b%!4<>0 THENsiteapp$=FNstring0(b%!4) ELSEsiteapp$=""
  310   IF b%!8<>0 THENsitetask=EVAL(FNstring0(b%!8)) ELSEsitetask=0
  320   IF b%!12<>0 THENsiteport$=FNstring0(b%!12) ELSEsiteport$=""
  330   IF useiconbar THENibhandle=FNCreateIconBarIcon("!SiteEdit",siteapp$,1) ELSEibhandle=-1
  340   IF siteapp$="" THENsiteapp$="someone..."
  350   longname$="Sites for "+siteapp$
  360   PROCseticontext(infobox%,2,longname$)
  370   !b%=252:b%!12=0:b%!16=&90282:REM ConfigPlus_EditingSite (!)
  380   $(b%+20)=FNlongfilename(sitefile$):REM Tell us about it
  390   SYS "Wimp_SendMessage",17,b%,0:REM broadcast
  400  ENDIF
  410 ELSE
  420  reply=FNerrorbox(">Message",">NeedAFilename",%10010)
  430  quit%=TRUE
  440 ENDIF
  450ENDIF
  460IF NOT quit% THENPROCinitprog:PROCopensites
  470WHILE quit%=FALSE
  480 PROCPoll
  490ENDWHILE
  500SYS "Wimp_CloseDown"
  510PROCclosemessages
  520IF testing%=TRUE THEN*SPOOL
  530END
  540REM quit%=-1 for user quit, -2 for taskmanager quit
  550:
  560DEFPROCPoll
  570SYS "OS_ReadMonotonicTime" TOt%
  580SYS "Wimp_PollIdle",1,b%,t%+15 TO reason%
  590CASE reason% OF
  600 REM 0 = Null events
  610 REM 1 = Redraw
  620 WHEN 2:SYS "Wimp_OpenWindow",,b%
  630 WHEN 3:SYS "Wimp_CloseWindow",,b%
  640  IF !b%=seditwin% AND NOT useiconbar THENquit%=TRUE
  650 WHEN 6:PROCmouseclick(b%!8,b%!12,b%!16)
  660 WHEN 8:PROCprocesskey(b%!0,b%!4,b%!24)
  670 WHEN 9:PROCmenuchoice
  680 WHEN 17,18:PROCreceive(b%!16)
  690 WHEN 19:PROCreceiveack(b%!16)
  700ENDCASE
  710ENDPROC
  720:
  730REM Buttons : 1 = Adjust, 2 = Menu, 4 = Select
  740DEFPROCmouseclick(but,win,icon)
  750CASE win OF
  760 WHEN -2
  770  CASE but OF
  780   WHEN 2:PROCibmenu
  790   WHEN 1,4:REM Opens the site edit window
  800    PROCopensites
  810  ENDCASE
  820 WHEN infobox%
  830  CASE icon OF
  840   WHEN 1:PROCshowfree
  850   WHEN 3:PROCFetchPage("http://users.essex.ac.uk/users/gerph/")
  860   WHEN 4:PROCFetchPage(AppURL$)
  870  ENDCASE
  880 WHEN seditwin%:REM The site edit window
  890  IF but=2 THEN
  900   IF NOT useiconbar THENPROCmenu(ibmenu%,-1,-1)
  910  ELSE
  920   CASE icon OF
  930    WHEN 2:REM Next site
  940     editsite%+=1+(but=1)*2:PROCgetsite
  950    WHEN 3:REM Last site
  960     editsite%-=1+(but=1)*2:PROCgetsite
  970    WHEN 9:REM Services menu
  980     SYS "Internet_GetServicesMenu",FNgeticontext(seditwin%,7),"tcp" TO servmenu%
  990     IF servmenu%=0 THENVDU7
 1000     PROCmenu(servmenu%,-1,-1):REM Open services menu
 1010    WHEN 10:REM Update
 1020     PROCupdatesite:IF but=4 THENPROCclosewin(seditwin%)
 1030    WHEN 11:REM Delete
 1040     PROCdeletesite:IF but=4 THENPROCclosewin(seditwin%)
 1050   ENDCASE
 1060  ENDIF
 1070ENDCASE
 1080ENDPROC
 1090:
 1100DEFPROCupdatesite
 1110LOCAL p%,s%
 1120IF editsite%>0 THEN
 1130 s%=editsite%:REM Update a current entry
 1140 p%=siteslist%:REM The list of sites
 1150 WHILE p%<>0
 1160  s%-=1:IF s%=0 THEN
 1170   PROCrelease(p%!4):REM Release name
 1180   PROCrelease(p%!8):REM Release host
 1190   PROCrelease(p%!12):REM Release port
 1200   p%!4=FNstrdup(FNgeticontext(seditwin%,1)):REM Store name
 1210   p%!8=FNstrdup(FNgeticontext(seditwin%,6)):REM Store hostname
 1220   p%!12=FNstrdup(FNgeticontext(seditwin%,7)):REM Store port
 1230  ENDIF
 1240  p%=!p%
 1250 ENDWHILE
 1260ELSE
 1270 p%=FNclaim(16):REM Claim space for block
 1280 !p%=siteslist%:siteslist%=p%:REM Add it to the list
 1290 p%!4=FNstrdup(FNgeticontext(seditwin%,1)):REM Store name
 1300 p%!8=FNstrdup(FNgeticontext(seditwin%,6)):REM Store hostname
 1310 p%!12=FNstrdup(FNgeticontext(seditwin%,7)):REM Store port
 1320 editsite%=1:REM Look at the added site
 1330ENDIF
 1340PROCwritesites
 1350PROCgetsite
 1360ENDPROC
 1370:
 1380DEFPROCdeletesite
 1390LOCAL l%,p%,s%,n%
 1400IF editsite%>0 THEN
 1410 REM A 'real' site
 1420 l%=0:p%=siteslist%:s%=editsite%
 1430 WHILE p%<>0
 1440  n%=!p%:s%-=1:IF s%=0 THEN
 1450   PROCrelease(p%!4):REM Release name
 1460   PROCrelease(p%!8):REM Release hostname
 1470   PROCrelease(p%!12):REM Release port
 1480   PROCrelease(p%):REM Release the entry itself
 1490   IF l%<>0 THEN!l%=n% ELSEsiteslist%=n%
 1500   p%=l%:REM Link subsequents to prior
 1510  ENDIF
 1520  l%=p%:p%=n%:REM Next entry
 1530 ENDWHILE
 1540 REM The PROCgetsite will handle clearing the entry for us if
 1550 REM 'new'
 1560ENDIF
 1570PROCwritesites
 1580PROCgetsite
 1590ENDPROC
 1600:
 1610DEFFNsitesmenu
 1620LOCAL menu%,p%
 1630PROCdynmenu_restore(sitespres%)
 1640PROCdynmenu_menu("Sites")
 1650p%=siteslist%:REM The list of sites
 1660WHILE p%<>0
 1670 PROCdynmenu_add($(p%!4),"",0):REM Add entry
 1680 p%=!p%:REM Next item
 1690ENDWHILE
 1700menu%=FNdynmenu_end
 1710sitespres%=FNdynmenu_preserve
 1720=menu%
 1730:
 1740DEFPROCreadsites
 1750LOCAL i%,n%,a$,b$,p%
 1760REM First release any space already claimed
 1770WHILE siteslist%<>0
 1780 n%=!siteslist%:REM The next entry
 1790 PROCrelease(siteslist%!4):REM Release it's name
 1800 PROCrelease(siteslist%!8):REM Release the host
 1810 PROCrelease(siteslist%!12):REM Release the port name
 1820 PROCrelease(siteslist%):REM Release the site entry
 1830 siteslist%=n%
 1840ENDWHILE
 1850i%=OPENIN(sitefile$)
 1860IF i%<>0 THEN
 1870 WHILE NOT EOF#i%
 1880  a$=GET$#i%
 1890  IF LEFT$(a$,1)<>"#" AND NOT EOF#i% THEN
 1900   b$=GET$#i%:REM Host <space> port
 1910   p%=FNclaim(16):REM Claim space for the block
 1920   !p%=siteslist%:siteslist%=p%:REM Add it to the list
 1930   p%!4=FNstrdup(a$)
 1940   p%!8=FNstrdup(LEFT$(b$,INSTR(b$+" "," ")-1))
 1950   p%!12=FNstrdup(FNstripspaces(MID$(b$,INSTR(b$+" "," ")+1)))
 1960  ENDIF
 1970 ENDWHILE
 1980 CLOSE#i%
 1990ENDIF
 2000ENDPROC
 2010:
 2020DEFPROCwritesites
 2030LOCAL p%,n%
 2040p%=siteslist%:REM reverse the list
 2050siteslist%=0:REM The list is zeroed
 2060WHILE p%<>0:n%=!p%:!p%=siteslist%:siteslist%=p%:p%=n%:ENDWHILE
 2070REM Now save it out
 2080o%=OPENOUT(sitefile$)
 2090p%=siteslist%:REM The list of sites
 2100BPUT#o%,"# Sites list, generated by SiteEdit for "+siteapp$
 2110BPUT#o%,"# Format 1 :"
 2120BPUT#o%,"# <site name>"
 2130BPUT#o%,"# <hostname> <port>"
 2140WHILE p%<>0
 2150 BPUT#o%,$(p%!4):REM Write site name
 2160 BPUT#o%,$(p%!8)+" "+$(p%!12):REM Write host/port
 2170 p%=!p%:REM Next item
 2180ENDWHILE
 2190CLOSE#o%
 2200SYS "OS_File",18,sitefile$,&FFF:REM Set it as text
 2210IF sitetask<>0 THEN
 2220 !b%=20:b%!12=0:b%!16=&90281:REM ConfigPlus_SiteChanged (!)
 2230 SYS "Wimp_SendMessage",17,b%,sitetask
 2240ENDIF
 2250p%=siteslist%:REM reverse the list
 2260siteslist%=0:REM The list is zeroed
 2270WHILE p%<>0:n%=!p%:!p%=siteslist%:siteslist%=p%:p%=n%:ENDWHILE
 2280ENDPROC
 2290:
 2300DEFPROCprocesskey(win,icon,key)
 2310LOCAL keydone:keydone=FALSE
 2320CASE win OF
 2330 WHEN seditwin%:REM Site Edit window
 2340  CASE key OF
 2350   WHEN &19E:REM Page Down
 2360    editsite%-=1+(but=1)*2:PROCgetsite:keydone=TRUE
 2370   WHEN &19F:REM Page Up
 2380    editsite%+=1+(but=1)*2:PROCgetsite:keydone=TRUE
 2390   WHEN 10,13:PROCupdatesite
 2400    IF useiconbar THENPROCclosewin(seditwin%):keydone=TRUE
 2410   WHEN 27
 2420    IF useiconbar THENPROCclosewin(seditwin%):keydone=FALSE ELSEquit%=TRUE
 2430  ENDCASE
 2440ENDCASE
 2450IF NOT keydone THENSYS "Wimp_ProcessKey",key
 2460ENDPROC
 2470:
 2480DEFPROCmenuchoice
 2490SYS"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
 2500m$=FNdecodemenu(curmenu%)
 2510CASE curmenu% OF
 2520 WHEN sitesmenu%:REM The list of sites (we do nothing)
 2530 WHEN servmenu%:REM The services menu
 2540  PROCmenuuntick(servmenu%,0,-1):PROCmenutick(servmenu%,b%!0,1)
 2550  PROCseticontext(seditwin%,7,m$)
 2560 WHEN ibmenu%
 2570  CASE m$ OF
 2580   WHEN "Sites...":PROCopensites
 2590   WHEN "Quit":quit%=TRUE
 2600  ENDCASE
 2610ENDCASE
 2620IF (mbut%AND1)=1 THENPROCrecreatemenu ELSEcurmenu%=-1
 2630ENDPROC
 2640:
 2650DEFPROCreceive(mess)
 2660CASE mess OF
 2670 WHEN &400C0:REM Menu opening warning
 2680  CASE curmenu% OF
 2690   WHEN ibmenu%
 2700    sitesmenu%=FNsitesmenu
 2710    ibmenu%!(32+24*b%!32)=sitesmenu%
 2720    SYS "Wimp_CreateSubMenu",,sitesmenu%,b%!24,b%!28
 2730  ENDCASE
 2740 REM &400C1 = mode change
 2750 REM &400C2 = task start up
 2760 REM &400C3 = task shut down
 2770 WHEN 0:quit%=TRUE*2
 2780 WHEN &90282:REM EditingSite (quit if already editing)
 2790  IF FNlongfilename(sitefile$)=$(b%+20) AND b%!4<>taskhandle THENquit%=TRUE
 2800 WHEN &502:PROCHelp(b%!32,b%!36,b%!4)
 2810ENDCASE
 2820ENDPROC
 2830:
 2840DEFPROCreceiveack(mess)
 2850CASE mess OF
 2860ENDCASE
 2870ENDPROC
 2880:
 2890DEFPROCgetsite
 2900LOCAL p%,s%:p%=0
 2910WHILE p%=0 AND editsite%>0
 2920 p%=siteslist%:s%=editsite%-1
 2930 WHILE p%<>0 AND s%>0:p%=!p%:s%-=1:ENDWHILE
 2940 IF p%=0 THENeditsite%-=1
 2950ENDWHILE
 2960IF editsite%<1 THEN
 2970 PROCseticontext(seditwin%,4,"(New)"):REM A new entry
 2980 PROCseticontext(seditwin%,1,""):REM Wipe the site name
 2990 PROCseticontext(seditwin%,6,""):REM Wipe hostname
 3000 PROCseticontext(seditwin%,7,siteport$):REM Wipe port
 3010 editsite%=0:REM Ensure it is 0
 3020ELSE
 3030 PROCseticontext(seditwin%,4,"("+STR$editsite%+")")
 3040 PROCseticontext(seditwin%,1,$(p%!4)):REM Set the site name
 3050 PROCseticontext(seditwin%,6,$(p%!8)):REM Set hostname
 3060 PROCseticontext(seditwin%,7,$(p%!12)):REM Set port
 3070ENDIF
 3080ENDPROC
 3090:
 3100DEFPROCloadfile(file$,type)
 3110CASE type OF
 3120ENDCASE
 3130ENDPROC
 3140:
 3150REM Any messages to be received MUST be noted
 3160DEFPROCinitwimp
 3170DIM messagelist% 256:messptr%=0
 3180PROCnotemessage(&502):PROCnotemessage(&90282)
 3190PROCnotemessage(&400C0)
 3200PROCnotemessage(0)
 3210SYS "Wimp_Initialise",310,&4B534154,Appname$,messagelist% TO wimpversion,taskhandle
 3220indl%=1024:menul%=1024:DIM b% 2048,ind% indl%,menu% menul%,wspc% &800
 3230curmenu%=-1
 3240PROCopenmessages
 3250REM sprites%=FNloadsprites(Appdir$+".Sprites")
 3260infobox%=FNloadtemplate("Info",1)
 3270seditwin%=FNloadtemplate("EditSite",1)
 3280PROCseticontext(infobox%,1,Appname$)
 3290PROCseticontext(infobox%,4,version$)
 3300IF useiconbar THENibmenu%=FNcreatemenu(Appname$+"|Info]>infobox%|Sites...|Test sites]M>1|Quit") ELSEibmenu%=FNcreatemenu(Appname$+"|Info]>infobox%|Test sites]M>1|Quit")
 3310iboptions%=options%
 3320ENDPROC
 3330:
 3340DEFPROCinitprog
 3350REM Variables
 3360editsite%=1:REM We're looking at the first site in the file
 3370consmenu%=0:REM Connections menu, for checking
 3380conspres%=0:REM No connections preserve block (dynmenu)
 3390siteslist%=0:REM The cached list of sites
 3400sitesmenu%=0:REM Sites menu, for checking
 3410sitespres%=0:REM No sites preserve block (dynmenu)
 3420servmenu%=-1:REM No services menu
 3430REM Initialisation stuff
 3440PROCreadsites:REM Read the sites file in
 3450ENDPROC
 3460ENDPROC
 3470:
 3480DEFPROCHelp(win,icon,to)
 3490RESTORE +1:PROCreadhelp(win,icon,to)
 3500ENDPROC
 3510REM Windows
 3520DATA infobox%,">HInfobox"
 3530DATA 3,">HInfobox3"
 3540DATA 4,">HInfobox4"
 3550DATA -2,">HIconbar"
 3560DATA seditwin%,">HSEdit"
 3570DATA 1,">HSEditName"
 3580DATA 2,">HSEditUp"
 3590DATA 3,">HSEditDown"
 3600DATA 4,">HSEditNum"
 3610DATA 6,">HSEditHost"
 3620DATA 7,">HSEditPort"
 3630DATA 9,">HPortMenu"
 3640DATA 10,">HSEditUpdate"
 3650DATA 11,">HSEditDelete"
 3660DATA -1,-1
 3670REM Menus
 3680DATA -2,-2,-2,-2
 3690:
 3700DEFPROCFetchPage(f$)
 3710REM XURI_Dispatch - this protocol is still being decided !
 3720SYS &6E381,%000,f$+CHR$0
 3730ENDPROC
 3740:
 3750DEFPROCopensites
 3760PROCgetsite:REM Read the site
 3770PROCopenwin(seditwin%):PROCsetcaretend(seditwin%,1)
 3780ENDPROC

� >!RunImage
testing%=�
ț "<HeapLibrary$File>"
()ț "<BasicLibrary$File>":�initlibrary
2%ț "<HeapLibrary$File>":�initheap
<,ț "<DynMenuLibrary$File>":�init_dynmenu
F=� � �closemessages:�eerror:� testing%=� ��("Spool"):� � �
P � testing%=� �*Spool Spooled
Z� testing%=� �� �:� �
d5� Appname$ is used for task manager & Appname$Dir
nD� shortname$ is used for iconbar name and should usually be null
x'� longname$ is used for info window
�7� AppURL$ is used to for clicks on the version icon
�useiconbar=�
�5Appname$="SiteEdit":version$="1.00 (17 Jun 1997)"
�'Appdir$=�systemvar(Appname$+"$Dir")
�NAppURL$="http://users.essex.ac.uk/users/gerph/acorn/internet.html#netgame"
�
�initwimp
�quit%=�:init%=�
�� � �error
�� � init% �
� go$=�GetEnv:init%=�
� � go$<>"" �
�F  ș "XOS_ReadArgs","site/A,app,task/K,port/K",go$,b%,1024 �;flags
�  � (flags � 1) �
6   reply=�errorbox(">Message",">BadParams",%10010)
   quit%=�
  �
"   sitefile$=�string0(b%!0)
,6   � b%!4<>0 �siteapp$=�string0(b%!4) �siteapp$=""
68   � b%!8<>0 �sitetask=�(�string0(b%!8)) �sitetask=0
@:   � b%!12<>0 �siteport$=�string0(b%!12) �siteport$=""
JU   � useiconbar �ibhandle=�CreateIconBarIcon("!SiteEdit",siteapp$,1) �ibhandle=-1
T+   � siteapp$="" �siteapp$="someone..."
^&   longname$="Sites for "+siteapp$
h)   �seticontext(infobox%,2,longname$)
r@   !b%=252:b%!12=0:b%!16=&90282:� ConfigPlus_EditingSite (!)
|;   $(b%+20)=�longfilename(sitefile$):� Tell us about it
�0   ș "Wimp_SendMessage",17,b%,0:� broadcast
�  �
� �
�9  reply=�errorbox(">Message",">NeedAFilename",%10010)
�
  quit%=�
� �
��
�#� � quit% ��initprog:�opensites
�ȕ quit%=�
�
 �Poll
��
�ș "Wimp_CloseDown"
��closemessages
� testing%=� �*SPOOL
�
5� quit%=-1 for user quit, -2 for taskmanager quit
&:
0
��Poll
:!ș "OS_ReadMonotonicTime" �t%
D+ș "Wimp_PollIdle",1,b%,t%+15 � reason%
NȎ reason% �
X � 0 = Null events
b � 1 = Redraw
l! � 2:ș "Wimp_OpenWindow",,b%
v" � 3:ș "Wimp_CloseWindow",,b%
�-  � !b%=seditwin% � � useiconbar �quit%=�
�& � 6:�mouseclick(b%!8,b%!12,b%!16)
�% � 8:�processkey(b%!0,b%!4,b%!24)
� � 9:�menuchoice
� � 17,18:�receive(b%!16)
� � 19:�receiveack(b%!16)
��
��
�:
�0� Buttons : 1 = Adjust, 2 = Menu, 4 = Select
���mouseclick(but,win,icon)
�Ȏ win �
�	 � -2
  Ȏ but �
   � 2:�ibmenu
)   � 1,4:� Opens the site edit window
     �opensites
*  �
4 � infobox%
>  Ȏ icon �
H   � 1:�showfree
R>   � 3:�FetchPage("http://users.essex.ac.uk/users/gerph/")
\   � 4:�FetchPage(AppURL$)
f  �
p' � seditwin%:� The site edit window
z  � but=2 �
�+   � � useiconbar ��menu(ibmenu%,-1,-1)
�  �
�   Ȏ icon �
�    � 2:� Next site
�(     editsite%+=1+(but=1)*2:�getsite
�    � 3:� Last site
�(     editsite%-=1+(but=1)*2:�getsite
�    � 9:� Services menu
�R     ș "Internet_GetServicesMenu",�geticontext(seditwin%,7),"tcp" � servmenu%
�     � servmenu%=0 ��7
�4     �menu(servmenu%,-1,-1):� Open services menu
�    � 10:� Update
�2     �updatesite:� but=4 ��closewin(seditwin%)
    � 11:� Delete
2     �deletesite:� but=4 ��closewin(seditwin%)
   �
$  �
.�
8�
B:
L��updatesite
V� p%,s%
`� editsite%>0 �
j* s%=editsite%:� Update a current entry
t& p%=siteslist%:� The list of sites
~
 ȕ p%<>0
�  s%-=1:� s%=0 �
�$   �release(p%!4):� Release name
�$   �release(p%!8):� Release host
�%   �release(p%!12):� Release port
�;   p%!4=�strdup(�geticontext(seditwin%,1)):� Store name
�?   p%!8=�strdup(�geticontext(seditwin%,6)):� Store hostname
�<   p%!12=�strdup(�geticontext(seditwin%,7)):� Store port
�  �
�  p%=!p%
� �
��
�* p%=�claim(16):� Claim space for block
6 !p%=siteslist%:siteslist%=p%:� Add it to the list

9 p%!4=�strdup(�geticontext(seditwin%,1)):� Store name
= p%!8=�strdup(�geticontext(seditwin%,6)):� Store hostname
: p%!12=�strdup(�geticontext(seditwin%,7)):� Store port
() editsite%=1:� Look at the added site
2�
<�writesites
F�getsite
P�
Z:
d��deletesite
n� l%,p%,s%,n%
x� editsite%>0 �
� � A 'real' site
�$ l%=0:p%=siteslist%:s%=editsite%
�
 ȕ p%<>0
�  n%=!p%:s%-=1:� s%=0 �
�$   �release(p%!4):� Release name
�(   �release(p%!8):� Release hostname
�%   �release(p%!12):� Release port
�.   �release(p%):� Release the entry itself
�%   � l%<>0 �!l%=n% �siteslist%=n%
�(   p%=l%:� Link subsequents to prior
�  �
�  l%=p%:p%=n%:� Next entry
� �
? � The PROCgetsite will handle clearing the entry for us if
 � 'new'
�
"�writesites
,�getsite
6�
@:
Jݤsitesmenu
T� menu%,p%
^ �dynmenu_restore(sitespres%)
h�dynmenu_menu("Sites")
r%p%=siteslist%:� The list of sites
|ȕ p%<>0
�+ �dynmenu_add($(p%!4),"",0):� Add entry
� p%=!p%:� Next item
��
�menu%=�dynmenu_end
� sitespres%=�dynmenu_preserve
�
=menu%
�:
���readsites
�� i%,n%,a$,b$,p%
�-� First release any space already claimed
�ȕ siteslist%<>0
�$ n%=!siteslist%:� The next entry
�/ �release(siteslist%!4):� Release it's name
. �release(siteslist%!8):� Release the host
4 �release(siteslist%!12):� Release the port name
2 �release(siteslist%):� Release the site entry
& siteslist%=n%
0�
:i%=�(sitefile$)
D
� i%<>0 �
N ȕ � �#i%
X
  a$=�#i%
b  � �a$,1)<>"#" � � �#i% �
l"   b$=�#i%:� Host <space> port
v0   p%=�claim(16):� Claim space for the block
�8   !p%=siteslist%:siteslist%=p%:� Add it to the list
�   p%!4=�strdup(a$)
�(   p%!8=�strdup(�b$,�b$+" "," ")-1))
�7   p%!12=�strdup(�stripspaces(�b$,�b$+" "," ")+1)))
�  �
� �
�	 �#i%
��
��
�:
���writesites
�� p%,n%
�$p%=siteslist%:� reverse the list
%siteslist%=0:� The list is zeroed
8ȕ p%<>0:n%=!p%:!p%=siteslist%:siteslist%=p%:p%=n%:�
� Now save it out
 o%=�(sitefile$)
*%p%=siteslist%:� The list of sites
4<�#o%,"# Sites list, generated by SiteEdit for "+siteapp$
>�#o%,"# Format 1 :"
H�#o%,"# <site name>"
R�#o%,"# <hostname> <port>"
\ȕ p%<>0
f# �#o%,$(p%!4):� Write site name
p0 �#o%,$(p%!8)+" "+$(p%!12):� Write host/port
z p%=!p%:� Next item
��
��#o%
�3ș "OS_File",18,sitefile$,&FFF:� Set it as text
�� sitetask<>0 �
�= !b%=20:b%!12=0:b%!16=&90281:� ConfigPlus_SiteChanged (!)
�) ș "Wimp_SendMessage",17,b%,sitetask
��
�$p%=siteslist%:� reverse the list
�%siteslist%=0:� The list is zeroed
�8ȕ p%<>0:n%=!p%:!p%=siteslist%:siteslist%=p%:p%=n%:�
��
�:
���processkey(win,icon,key)
	� keydone:keydone=�
	Ȏ win �
	# � seditwin%:� Site Edit window
	$  Ȏ key �
	.   � &19E:� Page Down
	81    editsite%-=1+(but=1)*2:�getsite:keydone=�
	B   � &19F:� Page Up
	L1    editsite%+=1+(but=1)*2:�getsite:keydone=�
	V   � 10,13:�updatesite
	`4    � useiconbar ��closewin(seditwin%):keydone=�
	j   � 27
	t=    � useiconbar ��closewin(seditwin%):keydone=� �quit%=�
	~  �
	��
	�)� � keydone �ș "Wimp_ProcessKey",key
	��
	�:
	���menuchoice
	�Dș"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
	�m$=�decodemenu(curmenu%)
	�Ȏ curmenu% �
	�5 � sitesmenu%:� The list of sites (we do nothing)
	�$ � servmenu%:� The services menu
	�=  �menuuntick(servmenu%,0,-1):�menutick(servmenu%,b%!0,1)
	�"  �seticontext(seditwin%,7,m$)
 � ibmenu%


  Ȏ m$ �
   � "Sites...":�opensites
   � "Quit":quit%=�
(  �
2�
<-� (mbut%�1)=1 ��recreatemenu �curmenu%=-1
F�
P:
Z��receive(mess)
d
Ȏ mess �
n$ � &400C0:� Menu opening warning
x  Ȏ curmenu% �
�   � ibmenu%
�    sitesmenu%=�sitesmenu
�(    ibmenu%!(32+24*b%!32)=sitesmenu%
�7    ș "Wimp_CreateSubMenu",,sitesmenu%,b%!24,b%!28
�  �
� � &400C1 = mode change
� � &400C2 = task start up
� � &400C3 = task shut down
� � 0:quit%=�*2
�5 � &90282:� EditingSite (quit if already editing)
�E  � �longfilename(sitefile$)=$(b%+20) � b%!4<>taskhandle �quit%=�
�# � &502:�Help(b%!32,b%!36,b%!4)
��
�
:
��receiveack(mess)
"
Ȏ mess �
,�
6�
@:
J
��getsite
T� p%,s%:p%=0
^ȕ p%=0 � editsite%>0
h! p%=siteslist%:s%=editsite%-1
r# ȕ p%<>0 � s%>0:p%=!p%:s%-=1:�
| � p%=0 �editsite%-=1
��
�� editsite%<1 �
�4 �seticontext(seditwin%,4,"(New)"):� A new entry
�6 �seticontext(seditwin%,1,""):� Wipe the site name
�1 �seticontext(seditwin%,6,""):� Wipe hostname
�4 �seticontext(seditwin%,7,siteport$):� Wipe port
�! editsite%=0:� Ensure it is 0
��
�1 �seticontext(seditwin%,4,"("+�editsite%+")")
�: �seticontext(seditwin%,1,$(p%!4)):� Set the site name
�5 �seticontext(seditwin%,6,$(p%!8)):� Set hostname
�2 �seticontext(seditwin%,7,$(p%!12)):� Set port
��
�
:
��loadfile(file$,type)
&
Ȏ type �
0�
:�
D:
N/� Any messages to be received MUST be noted
X��initwimp
b!� messagelist% 256:messptr%=0
l+�notemessage(&502):�notemessage(&90282)
v�notemessage(&400C0)
��notemessage(0)
�Uș "Wimp_Initialise",310,&4B534154,Appname$,messagelist% � wimpversion,taskhandle
�Gindl%=1024:menul%=1024:� b% 2048,ind% indl%,menu% menul%,wspc% &800
�curmenu%=-1
��openmessages
�0� sprites%=FNloadsprites(Appdir$+".Sprites")
�$infobox%=�loadtemplate("Info",1)
�)seditwin%=�loadtemplate("EditSite",1)
�%�seticontext(infobox%,1,Appname$)
�%�seticontext(infobox%,4,version$)
�� useiconbar �ibmenu%=�createmenu(Appname$+"|Info]>infobox%|Sites...|Test sites]M>1|Quit") �ibmenu%=�createmenu(Appname$+"|Info]>infobox%|Test sites]M>1|Quit")
�iboptions%=options%
��

:

��initprog

� Variables

 =editsite%=1:� We're looking at the first site in the file

*0consmenu%=0:� Connections menu, for checking

49conspres%=0:� No connections preserve block (dynmenu)

>+siteslist%=0:� The cached list of sites

H+sitesmenu%=0:� Sites menu, for checking

R4sitespres%=0:� No sites preserve block (dynmenu)

\#servmenu%=-1:� No services menu

f� Initialisation stuff

p'�readsites:� Read the sites file in

z�

��

�:

���Help(win,icon,to)

�� +1:�readhelp(win,icon,to)

��

�
� Windows

�� infobox%,">HInfobox"

�� 3,">HInfobox3"

�� 4,">HInfobox4"

�� -2,">HIconbar"

�� seditwin%,">HSEdit"

�� 1,">HSEditName"

�� 2,">HSEditUp"
� 3,">HSEditDown"
� 4,">HSEditNum"
� 6,">HSEditHost"
$� 7,">HSEditPort"
.� 9,">HPortMenu"
8� 10,">HSEditUpdate"
B� 11,">HSEditDelete"
L� -1,-1
V� Menus
`� -2,-2,-2,-2
j:
t��FetchPage(f$)
~<� XURI_Dispatch - this protocol is still being decided !
�ș &6E381,%000,f$+�0
��
�:
���opensites
��getsite:� Read the site
�1�openwin(seditwin%):�setcaretend(seditwin%,1)
��
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 0e 74 65 73 74  69 6e 67 25 3d a3 0d 00  |....testing%=...|
00000020  1e 1b c8 9b 20 22 3c 48  65 61 70 4c 69 62 72 61  |.... "<HeapLibra|
00000030  72 79 24 46 69 6c 65 3e  22 0d 00 28 29 c8 9b 20  |ry$File>"..().. |
00000040  22 3c 42 61 73 69 63 4c  69 62 72 61 72 79 24 46  |"<BasicLibrary$F|
00000050  69 6c 65 3e 22 3a f2 69  6e 69 74 6c 69 62 72 61  |ile>":.initlibra|
00000060  72 79 0d 00 32 25 c8 9b  20 22 3c 48 65 61 70 4c  |ry..2%.. "<HeapL|
00000070  69 62 72 61 72 79 24 46  69 6c 65 3e 22 3a f2 69  |ibrary$File>":.i|
00000080  6e 69 74 68 65 61 70 0d  00 3c 2c c8 9b 20 22 3c  |nitheap..<,.. "<|
00000090  44 79 6e 4d 65 6e 75 4c  69 62 72 61 72 79 24 46  |DynMenuLibrary$F|
000000a0  69 6c 65 3e 22 3a f2 69  6e 69 74 5f 64 79 6e 6d  |ile>":.init_dynm|
000000b0  65 6e 75 0d 00 46 3d ee  20 85 20 f2 63 6c 6f 73  |enu..F=. . .clos|
000000c0  65 6d 65 73 73 61 67 65  73 3a f2 65 65 72 72 6f  |emessages:.eerro|
000000d0  72 3a e7 20 74 65 73 74  69 6e 67 25 3d b9 20 8c  |r:. testing%=. .|
000000e0  ff 28 22 53 70 6f 6f 6c  22 29 3a e0 20 8b 20 e0  |.("Spool"):. . .|
000000f0  0d 00 50 20 e7 20 74 65  73 74 69 6e 67 25 3d b9  |..P . testing%=.|
00000100  20 8c 2a 53 70 6f 6f 6c  20 53 70 6f 6f 6c 65 64  | .*Spool Spooled|
00000110  0d 00 5a 19 e7 20 74 65  73 74 69 6e 67 25 3d b9  |..Z.. testing%=.|
00000120  20 8c fc 20 ee 3a fc 20  f2 0d 00 64 35 f4 20 41  | .. .:. ...d5. A|
00000130  70 70 6e 61 6d 65 24 20  69 73 20 75 73 65 64 20  |ppname$ is used |
00000140  66 6f 72 20 74 61 73 6b  20 6d 61 6e 61 67 65 72  |for task manager|
00000150  20 26 20 41 70 70 6e 61  6d 65 24 44 69 72 0d 00  | & Appname$Dir..|
00000160  6e 44 f4 20 73 68 6f 72  74 6e 61 6d 65 24 20 69  |nD. shortname$ i|
00000170  73 20 75 73 65 64 20 66  6f 72 20 69 63 6f 6e 62  |s used for iconb|
00000180  61 72 20 6e 61 6d 65 20  61 6e 64 20 73 68 6f 75  |ar name and shou|
00000190  6c 64 20 75 73 75 61 6c  6c 79 20 62 65 20 6e 75  |ld usually be nu|
000001a0  6c 6c 0d 00 78 27 f4 20  6c 6f 6e 67 6e 61 6d 65  |ll..x'. longname|
000001b0  24 20 69 73 20 75 73 65  64 20 66 6f 72 20 69 6e  |$ is used for in|
000001c0  66 6f 20 77 69 6e 64 6f  77 0d 00 82 37 f4 20 41  |fo window...7. A|
000001d0  70 70 55 52 4c 24 20 69  73 20 75 73 65 64 20 74  |ppURL$ is used t|
000001e0  6f 20 66 6f 72 20 63 6c  69 63 6b 73 20 6f 6e 20  |o for clicks on |
000001f0  74 68 65 20 76 65 72 73  69 6f 6e 20 69 63 6f 6e  |the version icon|
00000200  0d 00 8c 10 75 73 65 69  63 6f 6e 62 61 72 3d a3  |....useiconbar=.|
00000210  0d 00 96 35 41 70 70 6e  61 6d 65 24 3d 22 53 69  |...5Appname$="Si|
00000220  74 65 45 64 69 74 22 3a  76 65 72 73 69 6f 6e 24  |teEdit":version$|
00000230  3d 22 31 2e 30 30 20 28  31 37 20 4a 75 6e 20 31  |="1.00 (17 Jun 1|
00000240  39 39 37 29 22 0d 00 a0  27 41 70 70 64 69 72 24  |997)"...'Appdir$|
00000250  3d a4 73 79 73 74 65 6d  76 61 72 28 41 70 70 6e  |=.systemvar(Appn|
00000260  61 6d 65 24 2b 22 24 44  69 72 22 29 0d 00 aa 4e  |ame$+"$Dir")...N|
00000270  41 70 70 55 52 4c 24 3d  22 68 74 74 70 3a 2f 2f  |AppURL$="http://|
00000280  75 73 65 72 73 2e 65 73  73 65 78 2e 61 63 2e 75  |users.essex.ac.u|
00000290  6b 2f 75 73 65 72 73 2f  67 65 72 70 68 2f 61 63  |k/users/gerph/ac|
000002a0  6f 72 6e 2f 69 6e 74 65  72 6e 65 74 2e 68 74 6d  |orn/internet.htm|
000002b0  6c 23 6e 65 74 67 61 6d  65 22 0d 00 b4 0d f2 69  |l#netgame".....i|
000002c0  6e 69 74 77 69 6d 70 0d  00 be 13 71 75 69 74 25  |nitwimp....quit%|
000002d0  3d a3 3a 69 6e 69 74 25  3d a3 0d 00 c8 0e ee 20  |=.:init%=...... |
000002e0  85 20 f2 65 72 72 6f 72  0d 00 d2 0f e7 20 ac 20  |. .error..... . |
000002f0  69 6e 69 74 25 20 8c 0d  00 dc 18 20 67 6f 24 3d  |init% ..... go$=|
00000300  a4 47 65 74 45 6e 76 3a  69 6e 69 74 25 3d b9 0d  |.GetEnv:init%=..|
00000310  00 e6 10 20 e7 20 67 6f  24 3c 3e 22 22 20 8c 0d  |... . go$<>"" ..|
00000320  00 f0 46 20 20 c8 99 20  22 58 4f 53 5f 52 65 61  |..F  .. "XOS_Rea|
00000330  64 41 72 67 73 22 2c 22  73 69 74 65 2f 41 2c 61  |dArgs","site/A,a|
00000340  70 70 2c 74 61 73 6b 2f  4b 2c 70 6f 72 74 2f 4b  |pp,task/K,port/K|
00000350  22 2c 67 6f 24 2c 62 25  2c 31 30 32 34 20 b8 3b  |",go$,b%,1024 .;|
00000360  66 6c 61 67 73 0d 00 fa  15 20 20 e7 20 28 66 6c  |flags....  . (fl|
00000370  61 67 73 20 80 20 31 29  20 8c 0d 01 04 36 20 20  |ags . 1) ....6  |
00000380  20 72 65 70 6c 79 3d a4  65 72 72 6f 72 62 6f 78  | reply=.errorbox|
00000390  28 22 3e 4d 65 73 73 61  67 65 22 2c 22 3e 42 61  |(">Message",">Ba|
000003a0  64 50 61 72 61 6d 73 22  2c 25 31 30 30 31 30 29  |dParams",%10010)|
000003b0  0d 01 0e 0e 20 20 20 71  75 69 74 25 3d b9 0d 01  |....   quit%=...|
000003c0  18 07 20 20 cc 0d 01 22  1f 20 20 20 73 69 74 65  |..  ...".   site|
000003d0  66 69 6c 65 24 3d a4 73  74 72 69 6e 67 30 28 62  |file$=.string0(b|
000003e0  25 21 30 29 0d 01 2c 36  20 20 20 e7 20 62 25 21  |%!0)..,6   . b%!|
000003f0  34 3c 3e 30 20 8c 73 69  74 65 61 70 70 24 3d a4  |4<>0 .siteapp$=.|
00000400  73 74 72 69 6e 67 30 28  62 25 21 34 29 20 8b 73  |string0(b%!4) .s|
00000410  69 74 65 61 70 70 24 3d  22 22 0d 01 36 38 20 20  |iteapp$=""..68  |
00000420  20 e7 20 62 25 21 38 3c  3e 30 20 8c 73 69 74 65  | . b%!8<>0 .site|
00000430  74 61 73 6b 3d a0 28 a4  73 74 72 69 6e 67 30 28  |task=.(.string0(|
00000440  62 25 21 38 29 29 20 8b  73 69 74 65 74 61 73 6b  |b%!8)) .sitetask|
00000450  3d 30 0d 01 40 3a 20 20  20 e7 20 62 25 21 31 32  |=0..@:   . b%!12|
00000460  3c 3e 30 20 8c 73 69 74  65 70 6f 72 74 24 3d a4  |<>0 .siteport$=.|
00000470  73 74 72 69 6e 67 30 28  62 25 21 31 32 29 20 8b  |string0(b%!12) .|
00000480  73 69 74 65 70 6f 72 74  24 3d 22 22 0d 01 4a 55  |siteport$=""..JU|
00000490  20 20 20 e7 20 75 73 65  69 63 6f 6e 62 61 72 20  |   . useiconbar |
000004a0  8c 69 62 68 61 6e 64 6c  65 3d a4 43 72 65 61 74  |.ibhandle=.Creat|
000004b0  65 49 63 6f 6e 42 61 72  49 63 6f 6e 28 22 21 53  |eIconBarIcon("!S|
000004c0  69 74 65 45 64 69 74 22  2c 73 69 74 65 61 70 70  |iteEdit",siteapp|
000004d0  24 2c 31 29 20 8b 69 62  68 61 6e 64 6c 65 3d 2d  |$,1) .ibhandle=-|
000004e0  31 0d 01 54 2b 20 20 20  e7 20 73 69 74 65 61 70  |1..T+   . siteap|
000004f0  70 24 3d 22 22 20 8c 73  69 74 65 61 70 70 24 3d  |p$="" .siteapp$=|
00000500  22 73 6f 6d 65 6f 6e 65  2e 2e 2e 22 0d 01 5e 26  |"someone..."..^&|
00000510  20 20 20 6c 6f 6e 67 6e  61 6d 65 24 3d 22 53 69  |   longname$="Si|
00000520  74 65 73 20 66 6f 72 20  22 2b 73 69 74 65 61 70  |tes for "+siteap|
00000530  70 24 0d 01 68 29 20 20  20 f2 73 65 74 69 63 6f  |p$..h)   .setico|
00000540  6e 74 65 78 74 28 69 6e  66 6f 62 6f 78 25 2c 32  |ntext(infobox%,2|
00000550  2c 6c 6f 6e 67 6e 61 6d  65 24 29 0d 01 72 40 20  |,longname$)..r@ |
00000560  20 20 21 62 25 3d 32 35  32 3a 62 25 21 31 32 3d  |  !b%=252:b%!12=|
00000570  30 3a 62 25 21 31 36 3d  26 39 30 32 38 32 3a f4  |0:b%!16=&90282:.|
00000580  20 43 6f 6e 66 69 67 50  6c 75 73 5f 45 64 69 74  | ConfigPlus_Edit|
00000590  69 6e 67 53 69 74 65 20  28 21 29 0d 01 7c 3b 20  |ingSite (!)..|; |
000005a0  20 20 24 28 62 25 2b 32  30 29 3d a4 6c 6f 6e 67  |  $(b%+20)=.long|
000005b0  66 69 6c 65 6e 61 6d 65  28 73 69 74 65 66 69 6c  |filename(sitefil|
000005c0  65 24 29 3a f4 20 54 65  6c 6c 20 75 73 20 61 62  |e$):. Tell us ab|
000005d0  6f 75 74 20 69 74 0d 01  86 30 20 20 20 c8 99 20  |out it...0   .. |
000005e0  22 57 69 6d 70 5f 53 65  6e 64 4d 65 73 73 61 67  |"Wimp_SendMessag|
000005f0  65 22 2c 31 37 2c 62 25  2c 30 3a f4 20 62 72 6f  |e",17,b%,0:. bro|
00000600  61 64 63 61 73 74 0d 01  90 07 20 20 cd 0d 01 9a  |adcast....  ....|
00000610  06 20 cc 0d 01 a4 39 20  20 72 65 70 6c 79 3d a4  |. ....9  reply=.|
00000620  65 72 72 6f 72 62 6f 78  28 22 3e 4d 65 73 73 61  |errorbox(">Messa|
00000630  67 65 22 2c 22 3e 4e 65  65 64 41 46 69 6c 65 6e  |ge",">NeedAFilen|
00000640  61 6d 65 22 2c 25 31 30  30 31 30 29 0d 01 ae 0d  |ame",%10010)....|
00000650  20 20 71 75 69 74 25 3d  b9 0d 01 b8 06 20 cd 0d  |  quit%=..... ..|
00000660  01 c2 05 cd 0d 01 cc 23  e7 20 ac 20 71 75 69 74  |.......#. . quit|
00000670  25 20 8c f2 69 6e 69 74  70 72 6f 67 3a f2 6f 70  |% ..initprog:.op|
00000680  65 6e 73 69 74 65 73 0d  01 d6 0e c8 95 20 71 75  |ensites...... qu|
00000690  69 74 25 3d a3 0d 01 e0  0a 20 f2 50 6f 6c 6c 0d  |it%=..... .Poll.|
000006a0  01 ea 05 ce 0d 01 f4 17  c8 99 20 22 57 69 6d 70  |.......... "Wimp|
000006b0  5f 43 6c 6f 73 65 44 6f  77 6e 22 0d 01 fe 12 f2  |_CloseDown".....|
000006c0  63 6c 6f 73 65 6d 65 73  73 61 67 65 73 0d 02 08  |closemessages...|
000006d0  18 e7 20 74 65 73 74 69  6e 67 25 3d b9 20 8c 2a  |.. testing%=. .*|
000006e0  53 50 4f 4f 4c 0d 02 12  05 e0 0d 02 1c 35 f4 20  |SPOOL........5. |
000006f0  71 75 69 74 25 3d 2d 31  20 66 6f 72 20 75 73 65  |quit%=-1 for use|
00000700  72 20 71 75 69 74 2c 20  2d 32 20 66 6f 72 20 74  |r quit, -2 for t|
00000710  61 73 6b 6d 61 6e 61 67  65 72 20 71 75 69 74 0d  |askmanager quit.|
00000720  02 26 05 3a 0d 02 30 0a  dd f2 50 6f 6c 6c 0d 02  |.&.:..0...Poll..|
00000730  3a 21 c8 99 20 22 4f 53  5f 52 65 61 64 4d 6f 6e  |:!.. "OS_ReadMon|
00000740  6f 74 6f 6e 69 63 54 69  6d 65 22 20 b8 74 25 0d  |otonicTime" .t%.|
00000750  02 44 2b c8 99 20 22 57  69 6d 70 5f 50 6f 6c 6c  |.D+.. "Wimp_Poll|
00000760  49 64 6c 65 22 2c 31 2c  62 25 2c 74 25 2b 31 35  |Idle",1,b%,t%+15|
00000770  20 b8 20 72 65 61 73 6f  6e 25 0d 02 4e 10 c8 8e  | . reason%..N...|
00000780  20 72 65 61 73 6f 6e 25  20 ca 0d 02 58 16 20 f4  | reason% ...X. .|
00000790  20 30 20 3d 20 4e 75 6c  6c 20 65 76 65 6e 74 73  | 0 = Null events|
000007a0  0d 02 62 11 20 f4 20 31  20 3d 20 52 65 64 72 61  |..b. . 1 = Redra|
000007b0  77 0d 02 6c 21 20 c9 20  32 3a c8 99 20 22 57 69  |w..l! . 2:.. "Wi|
000007c0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
000007d0  62 25 0d 02 76 22 20 c9  20 33 3a c8 99 20 22 57  |b%..v" . 3:.. "W|
000007e0  69 6d 70 5f 43 6c 6f 73  65 57 69 6e 64 6f 77 22  |imp_CloseWindow"|
000007f0  2c 2c 62 25 0d 02 80 2d  20 20 e7 20 21 62 25 3d  |,,b%...-  . !b%=|
00000800  73 65 64 69 74 77 69 6e  25 20 80 20 ac 20 75 73  |seditwin% . . us|
00000810  65 69 63 6f 6e 62 61 72  20 8c 71 75 69 74 25 3d  |eiconbar .quit%=|
00000820  b9 0d 02 8a 26 20 c9 20  36 3a f2 6d 6f 75 73 65  |....& . 6:.mouse|
00000830  63 6c 69 63 6b 28 62 25  21 38 2c 62 25 21 31 32  |click(b%!8,b%!12|
00000840  2c 62 25 21 31 36 29 0d  02 94 25 20 c9 20 38 3a  |,b%!16)...% . 8:|
00000850  f2 70 72 6f 63 65 73 73  6b 65 79 28 62 25 21 30  |.processkey(b%!0|
00000860  2c 62 25 21 34 2c 62 25  21 32 34 29 0d 02 9e 14  |,b%!4,b%!24)....|
00000870  20 c9 20 39 3a f2 6d 65  6e 75 63 68 6f 69 63 65  | . 9:.menuchoice|
00000880  0d 02 a8 1c 20 c9 20 31  37 2c 31 38 3a f2 72 65  |.... . 17,18:.re|
00000890  63 65 69 76 65 28 62 25  21 31 36 29 0d 02 b2 1c  |ceive(b%!16)....|
000008a0  20 c9 20 31 39 3a f2 72  65 63 65 69 76 65 61 63  | . 19:.receiveac|
000008b0  6b 28 62 25 21 31 36 29  0d 02 bc 05 cb 0d 02 c6  |k(b%!16)........|
000008c0  05 e1 0d 02 d0 05 3a 0d  02 da 30 f4 20 42 75 74  |......:...0. But|
000008d0  74 6f 6e 73 20 3a 20 31  20 3d 20 41 64 6a 75 73  |tons : 1 = Adjus|
000008e0  74 2c 20 32 20 3d 20 4d  65 6e 75 2c 20 34 20 3d  |t, 2 = Menu, 4 =|
000008f0  20 53 65 6c 65 63 74 0d  02 e4 1e dd f2 6d 6f 75  | Select......mou|
00000900  73 65 63 6c 69 63 6b 28  62 75 74 2c 77 69 6e 2c  |seclick(but,win,|
00000910  69 63 6f 6e 29 0d 02 ee  0c c8 8e 20 77 69 6e 20  |icon)...... win |
00000920  ca 0d 02 f8 09 20 c9 20  2d 32 0d 03 02 0e 20 20  |..... . -2....  |
00000930  c8 8e 20 62 75 74 20 ca  0d 03 0c 12 20 20 20 c9  |.. but .....   .|
00000940  20 32 3a f2 69 62 6d 65  6e 75 0d 03 16 29 20 20  | 2:.ibmenu...)  |
00000950  20 c9 20 31 2c 34 3a f4  20 4f 70 65 6e 73 20 74  | . 1,4:. Opens t|
00000960  68 65 20 73 69 74 65 20  65 64 69 74 20 77 69 6e  |he site edit win|
00000970  64 6f 77 0d 03 20 12 20  20 20 20 f2 6f 70 65 6e  |dow.. .    .open|
00000980  73 69 74 65 73 0d 03 2a  07 20 20 cb 0d 03 34 0f  |sites..*.  ...4.|
00000990  20 c9 20 69 6e 66 6f 62  6f 78 25 0d 03 3e 0f 20  | . infobox%..>. |
000009a0  20 c8 8e 20 69 63 6f 6e  20 ca 0d 03 48 14 20 20  | .. icon ...H.  |
000009b0  20 c9 20 31 3a f2 73 68  6f 77 66 72 65 65 0d 03  | . 1:.showfree..|
000009c0  52 3e 20 20 20 c9 20 33  3a f2 46 65 74 63 68 50  |R>   . 3:.FetchP|
000009d0  61 67 65 28 22 68 74 74  70 3a 2f 2f 75 73 65 72  |age("http://user|
000009e0  73 2e 65 73 73 65 78 2e  61 63 2e 75 6b 2f 75 73  |s.essex.ac.uk/us|
000009f0  65 72 73 2f 67 65 72 70  68 2f 22 29 0d 03 5c 1e  |ers/gerph/")..\.|
00000a00  20 20 20 c9 20 34 3a f2  46 65 74 63 68 50 61 67  |   . 4:.FetchPag|
00000a10  65 28 41 70 70 55 52 4c  24 29 0d 03 66 07 20 20  |e(AppURL$)..f.  |
00000a20  cb 0d 03 70 27 20 c9 20  73 65 64 69 74 77 69 6e  |...p' . seditwin|
00000a30  25 3a f4 20 54 68 65 20  73 69 74 65 20 65 64 69  |%:. The site edi|
00000a40  74 20 77 69 6e 64 6f 77  0d 03 7a 0f 20 20 e7 20  |t window..z.  . |
00000a50  62 75 74 3d 32 20 8c 0d  03 84 2b 20 20 20 e7 20  |but=2 ....+   . |
00000a60  ac 20 75 73 65 69 63 6f  6e 62 61 72 20 8c f2 6d  |. useiconbar ..m|
00000a70  65 6e 75 28 69 62 6d 65  6e 75 25 2c 2d 31 2c 2d  |enu(ibmenu%,-1,-|
00000a80  31 29 0d 03 8e 07 20 20  cc 0d 03 98 10 20 20 20  |1)....  .....   |
00000a90  c8 8e 20 69 63 6f 6e 20  ca 0d 03 a2 17 20 20 20  |.. icon .....   |
00000aa0  20 c9 20 32 3a f4 20 4e  65 78 74 20 73 69 74 65  | . 2:. Next site|
00000ab0  0d 03 ac 28 20 20 20 20  20 65 64 69 74 73 69 74  |...(     editsit|
00000ac0  65 25 2b 3d 31 2b 28 62  75 74 3d 31 29 2a 32 3a  |e%+=1+(but=1)*2:|
00000ad0  f2 67 65 74 73 69 74 65  0d 03 b6 17 20 20 20 20  |.getsite....    |
00000ae0  c9 20 33 3a f4 20 4c 61  73 74 20 73 69 74 65 0d  |. 3:. Last site.|
00000af0  03 c0 28 20 20 20 20 20  65 64 69 74 73 69 74 65  |..(     editsite|
00000b00  25 2d 3d 31 2b 28 62 75  74 3d 31 29 2a 32 3a f2  |%-=1+(but=1)*2:.|
00000b10  67 65 74 73 69 74 65 0d  03 ca 1b 20 20 20 20 c9  |getsite....    .|
00000b20  20 39 3a f4 20 53 65 72  76 69 63 65 73 20 6d 65  | 9:. Services me|
00000b30  6e 75 0d 03 d4 52 20 20  20 20 20 c8 99 20 22 49  |nu...R     .. "I|
00000b40  6e 74 65 72 6e 65 74 5f  47 65 74 53 65 72 76 69  |nternet_GetServi|
00000b50  63 65 73 4d 65 6e 75 22  2c a4 67 65 74 69 63 6f  |cesMenu",.getico|
00000b60  6e 74 65 78 74 28 73 65  64 69 74 77 69 6e 25 2c  |ntext(seditwin%,|
00000b70  37 29 2c 22 74 63 70 22  20 b8 20 73 65 72 76 6d  |7),"tcp" . servm|
00000b80  65 6e 75 25 0d 03 de 1a  20 20 20 20 20 e7 20 73  |enu%....     . s|
00000b90  65 72 76 6d 65 6e 75 25  3d 30 20 8c ef 37 0d 03  |ervmenu%=0 ..7..|
00000ba0  e8 34 20 20 20 20 20 f2  6d 65 6e 75 28 73 65 72  |.4     .menu(ser|
00000bb0  76 6d 65 6e 75 25 2c 2d  31 2c 2d 31 29 3a f4 20  |vmenu%,-1,-1):. |
00000bc0  4f 70 65 6e 20 73 65 72  76 69 63 65 73 20 6d 65  |Open services me|
00000bd0  6e 75 0d 03 f2 15 20 20  20 20 c9 20 31 30 3a f4  |nu....    . 10:.|
00000be0  20 55 70 64 61 74 65 0d  03 fc 32 20 20 20 20 20  | Update...2     |
00000bf0  f2 75 70 64 61 74 65 73  69 74 65 3a e7 20 62 75  |.updatesite:. bu|
00000c00  74 3d 34 20 8c f2 63 6c  6f 73 65 77 69 6e 28 73  |t=4 ..closewin(s|
00000c10  65 64 69 74 77 69 6e 25  29 0d 04 06 15 20 20 20  |editwin%)....   |
00000c20  20 c9 20 31 31 3a f4 20  44 65 6c 65 74 65 0d 04  | . 11:. Delete..|
00000c30  10 32 20 20 20 20 20 f2  64 65 6c 65 74 65 73 69  |.2     .deletesi|
00000c40  74 65 3a e7 20 62 75 74  3d 34 20 8c f2 63 6c 6f  |te:. but=4 ..clo|
00000c50  73 65 77 69 6e 28 73 65  64 69 74 77 69 6e 25 29  |sewin(seditwin%)|
00000c60  0d 04 1a 08 20 20 20 cb  0d 04 24 07 20 20 cd 0d  |....   ...$.  ..|
00000c70  04 2e 05 cb 0d 04 38 05  e1 0d 04 42 05 3a 0d 04  |......8....B.:..|
00000c80  4c 10 dd f2 75 70 64 61  74 65 73 69 74 65 0d 04  |L...updatesite..|
00000c90  56 0b ea 20 70 25 2c 73  25 0d 04 60 13 e7 20 65  |V.. p%,s%..`.. e|
00000ca0  64 69 74 73 69 74 65 25  3e 30 20 8c 0d 04 6a 2a  |ditsite%>0 ...j*|
00000cb0  20 73 25 3d 65 64 69 74  73 69 74 65 25 3a f4 20  | s%=editsite%:. |
00000cc0  55 70 64 61 74 65 20 61  20 63 75 72 72 65 6e 74  |Update a current|
00000cd0  20 65 6e 74 72 79 0d 04  74 26 20 70 25 3d 73 69  | entry..t& p%=si|
00000ce0  74 65 73 6c 69 73 74 25  3a f4 20 54 68 65 20 6c  |teslist%:. The l|
00000cf0  69 73 74 20 6f 66 20 73  69 74 65 73 0d 04 7e 0d  |ist of sites..~.|
00000d00  20 c8 95 20 70 25 3c 3e  30 0d 04 88 14 20 20 73  | .. p%<>0....  s|
00000d10  25 2d 3d 31 3a e7 20 73  25 3d 30 20 8c 0d 04 92  |%-=1:. s%=0 ....|
00000d20  24 20 20 20 f2 72 65 6c  65 61 73 65 28 70 25 21  |$   .release(p%!|
00000d30  34 29 3a f4 20 52 65 6c  65 61 73 65 20 6e 61 6d  |4):. Release nam|
00000d40  65 0d 04 9c 24 20 20 20  f2 72 65 6c 65 61 73 65  |e...$   .release|
00000d50  28 70 25 21 38 29 3a f4  20 52 65 6c 65 61 73 65  |(p%!8):. Release|
00000d60  20 68 6f 73 74 0d 04 a6  25 20 20 20 f2 72 65 6c  | host...%   .rel|
00000d70  65 61 73 65 28 70 25 21  31 32 29 3a f4 20 52 65  |ease(p%!12):. Re|
00000d80  6c 65 61 73 65 20 70 6f  72 74 0d 04 b0 3b 20 20  |lease port...;  |
00000d90  20 70 25 21 34 3d a4 73  74 72 64 75 70 28 a4 67  | p%!4=.strdup(.g|
00000da0  65 74 69 63 6f 6e 74 65  78 74 28 73 65 64 69 74  |eticontext(sedit|
00000db0  77 69 6e 25 2c 31 29 29  3a f4 20 53 74 6f 72 65  |win%,1)):. Store|
00000dc0  20 6e 61 6d 65 0d 04 ba  3f 20 20 20 70 25 21 38  | name...?   p%!8|
00000dd0  3d a4 73 74 72 64 75 70  28 a4 67 65 74 69 63 6f  |=.strdup(.getico|
00000de0  6e 74 65 78 74 28 73 65  64 69 74 77 69 6e 25 2c  |ntext(seditwin%,|
00000df0  36 29 29 3a f4 20 53 74  6f 72 65 20 68 6f 73 74  |6)):. Store host|
00000e00  6e 61 6d 65 0d 04 c4 3c  20 20 20 70 25 21 31 32  |name...<   p%!12|
00000e10  3d a4 73 74 72 64 75 70  28 a4 67 65 74 69 63 6f  |=.strdup(.getico|
00000e20  6e 74 65 78 74 28 73 65  64 69 74 77 69 6e 25 2c  |ntext(seditwin%,|
00000e30  37 29 29 3a f4 20 53 74  6f 72 65 20 70 6f 72 74  |7)):. Store port|
00000e40  0d 04 ce 07 20 20 cd 0d  04 d8 0c 20 20 70 25 3d  |....  .....  p%=|
00000e50  21 70 25 0d 04 e2 06 20  ce 0d 04 ec 05 cc 0d 04  |!p%.... ........|
00000e60  f6 2a 20 70 25 3d a4 63  6c 61 69 6d 28 31 36 29  |.* p%=.claim(16)|
00000e70  3a f4 20 43 6c 61 69 6d  20 73 70 61 63 65 20 66  |:. Claim space f|
00000e80  6f 72 20 62 6c 6f 63 6b  0d 05 00 36 20 21 70 25  |or block...6 !p%|
00000e90  3d 73 69 74 65 73 6c 69  73 74 25 3a 73 69 74 65  |=siteslist%:site|
00000ea0  73 6c 69 73 74 25 3d 70  25 3a f4 20 41 64 64 20  |slist%=p%:. Add |
00000eb0  69 74 20 74 6f 20 74 68  65 20 6c 69 73 74 0d 05  |it to the list..|
00000ec0  0a 39 20 70 25 21 34 3d  a4 73 74 72 64 75 70 28  |.9 p%!4=.strdup(|
00000ed0  a4 67 65 74 69 63 6f 6e  74 65 78 74 28 73 65 64  |.geticontext(sed|
00000ee0  69 74 77 69 6e 25 2c 31  29 29 3a f4 20 53 74 6f  |itwin%,1)):. Sto|
00000ef0  72 65 20 6e 61 6d 65 0d  05 14 3d 20 70 25 21 38  |re name...= p%!8|
00000f00  3d a4 73 74 72 64 75 70  28 a4 67 65 74 69 63 6f  |=.strdup(.getico|
00000f10  6e 74 65 78 74 28 73 65  64 69 74 77 69 6e 25 2c  |ntext(seditwin%,|
00000f20  36 29 29 3a f4 20 53 74  6f 72 65 20 68 6f 73 74  |6)):. Store host|
00000f30  6e 61 6d 65 0d 05 1e 3a  20 70 25 21 31 32 3d a4  |name...: p%!12=.|
00000f40  73 74 72 64 75 70 28 a4  67 65 74 69 63 6f 6e 74  |strdup(.geticont|
00000f50  65 78 74 28 73 65 64 69  74 77 69 6e 25 2c 37 29  |ext(seditwin%,7)|
00000f60  29 3a f4 20 53 74 6f 72  65 20 70 6f 72 74 0d 05  |):. Store port..|
00000f70  28 29 20 65 64 69 74 73  69 74 65 25 3d 31 3a f4  |() editsite%=1:.|
00000f80  20 4c 6f 6f 6b 20 61 74  20 74 68 65 20 61 64 64  | Look at the add|
00000f90  65 64 20 73 69 74 65 0d  05 32 05 cd 0d 05 3c 0f  |ed site..2....<.|
00000fa0  f2 77 72 69 74 65 73 69  74 65 73 0d 05 46 0c f2  |.writesites..F..|
00000fb0  67 65 74 73 69 74 65 0d  05 50 05 e1 0d 05 5a 05  |getsite..P....Z.|
00000fc0  3a 0d 05 64 10 dd f2 64  65 6c 65 74 65 73 69 74  |:..d...deletesit|
00000fd0  65 0d 05 6e 11 ea 20 6c  25 2c 70 25 2c 73 25 2c  |e..n.. l%,p%,s%,|
00000fe0  6e 25 0d 05 78 13 e7 20  65 64 69 74 73 69 74 65  |n%..x.. editsite|
00000ff0  25 3e 30 20 8c 0d 05 82  14 20 f4 20 41 20 27 72  |%>0 ..... . A 'r|
00001000  65 61 6c 27 20 73 69 74  65 0d 05 8c 24 20 6c 25  |eal' site...$ l%|
00001010  3d 30 3a 70 25 3d 73 69  74 65 73 6c 69 73 74 25  |=0:p%=siteslist%|
00001020  3a 73 25 3d 65 64 69 74  73 69 74 65 25 0d 05 96  |:s%=editsite%...|
00001030  0d 20 c8 95 20 70 25 3c  3e 30 0d 05 a0 1b 20 20  |. .. p%<>0....  |
00001040  6e 25 3d 21 70 25 3a 73  25 2d 3d 31 3a e7 20 73  |n%=!p%:s%-=1:. s|
00001050  25 3d 30 20 8c 0d 05 aa  24 20 20 20 f2 72 65 6c  |%=0 ....$   .rel|
00001060  65 61 73 65 28 70 25 21  34 29 3a f4 20 52 65 6c  |ease(p%!4):. Rel|
00001070  65 61 73 65 20 6e 61 6d  65 0d 05 b4 28 20 20 20  |ease name...(   |
00001080  f2 72 65 6c 65 61 73 65  28 70 25 21 38 29 3a f4  |.release(p%!8):.|
00001090  20 52 65 6c 65 61 73 65  20 68 6f 73 74 6e 61 6d  | Release hostnam|
000010a0  65 0d 05 be 25 20 20 20  f2 72 65 6c 65 61 73 65  |e...%   .release|
000010b0  28 70 25 21 31 32 29 3a  f4 20 52 65 6c 65 61 73  |(p%!12):. Releas|
000010c0  65 20 70 6f 72 74 0d 05  c8 2e 20 20 20 f2 72 65  |e port....   .re|
000010d0  6c 65 61 73 65 28 70 25  29 3a f4 20 52 65 6c 65  |lease(p%):. Rele|
000010e0  61 73 65 20 74 68 65 20  65 6e 74 72 79 20 69 74  |ase the entry it|
000010f0  73 65 6c 66 0d 05 d2 25  20 20 20 e7 20 6c 25 3c  |self...%   . l%<|
00001100  3e 30 20 8c 21 6c 25 3d  6e 25 20 8b 73 69 74 65  |>0 .!l%=n% .site|
00001110  73 6c 69 73 74 25 3d 6e  25 0d 05 dc 28 20 20 20  |slist%=n%...(   |
00001120  70 25 3d 6c 25 3a f4 20  4c 69 6e 6b 20 73 75 62  |p%=l%:. Link sub|
00001130  73 65 71 75 65 6e 74 73  20 74 6f 20 70 72 69 6f  |sequents to prio|
00001140  72 0d 05 e6 07 20 20 cd  0d 05 f0 1e 20 20 6c 25  |r....  .....  l%|
00001150  3d 70 25 3a 70 25 3d 6e  25 3a f4 20 4e 65 78 74  |=p%:p%=n%:. Next|
00001160  20 65 6e 74 72 79 0d 05  fa 06 20 ce 0d 06 04 3f  | entry.... ....?|
00001170  20 f4 20 54 68 65 20 50  52 4f 43 67 65 74 73 69  | . The PROCgetsi|
00001180  74 65 20 77 69 6c 6c 20  68 61 6e 64 6c 65 20 63  |te will handle c|
00001190  6c 65 61 72 69 6e 67 20  74 68 65 20 65 6e 74 72  |learing the entr|
000011a0  79 20 66 6f 72 20 75 73  20 69 66 0d 06 0e 0c 20  |y for us if.... |
000011b0  f4 20 27 6e 65 77 27 0d  06 18 05 cd 0d 06 22 0f  |. 'new'.......".|
000011c0  f2 77 72 69 74 65 73 69  74 65 73 0d 06 2c 0c f2  |.writesites..,..|
000011d0  67 65 74 73 69 74 65 0d  06 36 05 e1 0d 06 40 05  |getsite..6....@.|
000011e0  3a 0d 06 4a 0f dd a4 73  69 74 65 73 6d 65 6e 75  |:..J...sitesmenu|
000011f0  0d 06 54 0e ea 20 6d 65  6e 75 25 2c 70 25 0d 06  |..T.. menu%,p%..|
00001200  5e 20 f2 64 79 6e 6d 65  6e 75 5f 72 65 73 74 6f  |^ .dynmenu_resto|
00001210  72 65 28 73 69 74 65 73  70 72 65 73 25 29 0d 06  |re(sitespres%)..|
00001220  68 1a f2 64 79 6e 6d 65  6e 75 5f 6d 65 6e 75 28  |h..dynmenu_menu(|
00001230  22 53 69 74 65 73 22 29  0d 06 72 25 70 25 3d 73  |"Sites")..r%p%=s|
00001240  69 74 65 73 6c 69 73 74  25 3a f4 20 54 68 65 20  |iteslist%:. The |
00001250  6c 69 73 74 20 6f 66 20  73 69 74 65 73 0d 06 7c  |list of sites..||
00001260  0c c8 95 20 70 25 3c 3e  30 0d 06 86 2b 20 f2 64  |... p%<>0...+ .d|
00001270  79 6e 6d 65 6e 75 5f 61  64 64 28 24 28 70 25 21  |ynmenu_add($(p%!|
00001280  34 29 2c 22 22 2c 30 29  3a f4 20 41 64 64 20 65  |4),"",0):. Add e|
00001290  6e 74 72 79 0d 06 90 17  20 70 25 3d 21 70 25 3a  |ntry.... p%=!p%:|
000012a0  f4 20 4e 65 78 74 20 69  74 65 6d 0d 06 9a 05 ce  |. Next item.....|
000012b0  0d 06 a4 16 6d 65 6e 75  25 3d a4 64 79 6e 6d 65  |....menu%=.dynme|
000012c0  6e 75 5f 65 6e 64 0d 06  ae 20 73 69 74 65 73 70  |nu_end... sitesp|
000012d0  72 65 73 25 3d a4 64 79  6e 6d 65 6e 75 5f 70 72  |res%=.dynmenu_pr|
000012e0  65 73 65 72 76 65 0d 06  b8 0a 3d 6d 65 6e 75 25  |eserve....=menu%|
000012f0  0d 06 c2 05 3a 0d 06 cc  0f dd f2 72 65 61 64 73  |....:......reads|
00001300  69 74 65 73 0d 06 d6 14  ea 20 69 25 2c 6e 25 2c  |ites..... i%,n%,|
00001310  61 24 2c 62 24 2c 70 25  0d 06 e0 2d f4 20 46 69  |a$,b$,p%...-. Fi|
00001320  72 73 74 20 72 65 6c 65  61 73 65 20 61 6e 79 20  |rst release any |
00001330  73 70 61 63 65 20 61 6c  72 65 61 64 79 20 63 6c  |space already cl|
00001340  61 69 6d 65 64 0d 06 ea  14 c8 95 20 73 69 74 65  |aimed...... site|
00001350  73 6c 69 73 74 25 3c 3e  30 0d 06 f4 24 20 6e 25  |slist%<>0...$ n%|
00001360  3d 21 73 69 74 65 73 6c  69 73 74 25 3a f4 20 54  |=!siteslist%:. T|
00001370  68 65 20 6e 65 78 74 20  65 6e 74 72 79 0d 06 fe  |he next entry...|
00001380  2f 20 f2 72 65 6c 65 61  73 65 28 73 69 74 65 73  |/ .release(sites|
00001390  6c 69 73 74 25 21 34 29  3a f4 20 52 65 6c 65 61  |list%!4):. Relea|
000013a0  73 65 20 69 74 27 73 20  6e 61 6d 65 0d 07 08 2e  |se it's name....|
000013b0  20 f2 72 65 6c 65 61 73  65 28 73 69 74 65 73 6c  | .release(sitesl|
000013c0  69 73 74 25 21 38 29 3a  f4 20 52 65 6c 65 61 73  |ist%!8):. Releas|
000013d0  65 20 74 68 65 20 68 6f  73 74 0d 07 12 34 20 f2  |e the host...4 .|
000013e0  72 65 6c 65 61 73 65 28  73 69 74 65 73 6c 69 73  |release(siteslis|
000013f0  74 25 21 31 32 29 3a f4  20 52 65 6c 65 61 73 65  |t%!12):. Release|
00001400  20 74 68 65 20 70 6f 72  74 20 6e 61 6d 65 0d 07  | the port name..|
00001410  1c 32 20 f2 72 65 6c 65  61 73 65 28 73 69 74 65  |.2 .release(site|
00001420  73 6c 69 73 74 25 29 3a  f4 20 52 65 6c 65 61 73  |slist%):. Releas|
00001430  65 20 74 68 65 20 73 69  74 65 20 65 6e 74 72 79  |e the site entry|
00001440  0d 07 26 12 20 73 69 74  65 73 6c 69 73 74 25 3d  |..&. siteslist%=|
00001450  6e 25 0d 07 30 05 ce 0d  07 3a 13 69 25 3d 8e 28  |n%..0....:.i%=.(|
00001460  73 69 74 65 66 69 6c 65  24 29 0d 07 44 0d e7 20  |sitefile$)..D.. |
00001470  69 25 3c 3e 30 20 8c 0d  07 4e 0e 20 c8 95 20 ac  |i%<>0 ...N. .. .|
00001480  20 c5 23 69 25 0d 07 58  0d 20 20 61 24 3d be 23  | .#i%..X.  a$=.#|
00001490  69 25 0d 07 62 1e 20 20  e7 20 c0 61 24 2c 31 29  |i%..b.  . .a$,1)|
000014a0  3c 3e 22 23 22 20 80 20  ac 20 c5 23 69 25 20 8c  |<>"#" . . .#i% .|
000014b0  0d 07 6c 22 20 20 20 62  24 3d be 23 69 25 3a f4  |..l"   b$=.#i%:.|
000014c0  20 48 6f 73 74 20 3c 73  70 61 63 65 3e 20 70 6f  | Host <space> po|
000014d0  72 74 0d 07 76 30 20 20  20 70 25 3d a4 63 6c 61  |rt..v0   p%=.cla|
000014e0  69 6d 28 31 36 29 3a f4  20 43 6c 61 69 6d 20 73  |im(16):. Claim s|
000014f0  70 61 63 65 20 66 6f 72  20 74 68 65 20 62 6c 6f  |pace for the blo|
00001500  63 6b 0d 07 80 38 20 20  20 21 70 25 3d 73 69 74  |ck...8   !p%=sit|
00001510  65 73 6c 69 73 74 25 3a  73 69 74 65 73 6c 69 73  |eslist%:siteslis|
00001520  74 25 3d 70 25 3a f4 20  41 64 64 20 69 74 20 74  |t%=p%:. Add it t|
00001530  6f 20 74 68 65 20 6c 69  73 74 0d 07 8a 17 20 20  |o the list....  |
00001540  20 70 25 21 34 3d a4 73  74 72 64 75 70 28 61 24  | p%!4=.strdup(a$|
00001550  29 0d 07 94 28 20 20 20  70 25 21 38 3d a4 73 74  |)...(   p%!8=.st|
00001560  72 64 75 70 28 c0 62 24  2c a7 62 24 2b 22 20 22  |rdup(.b$,.b$+" "|
00001570  2c 22 20 22 29 2d 31 29  29 0d 07 9e 37 20 20 20  |," ")-1))...7   |
00001580  70 25 21 31 32 3d a4 73  74 72 64 75 70 28 a4 73  |p%!12=.strdup(.s|
00001590  74 72 69 70 73 70 61 63  65 73 28 c1 62 24 2c a7  |tripspaces(.b$,.|
000015a0  62 24 2b 22 20 22 2c 22  20 22 29 2b 31 29 29 29  |b$+" "," ")+1)))|
000015b0  0d 07 a8 07 20 20 cd 0d  07 b2 06 20 ce 0d 07 bc  |....  ..... ....|
000015c0  09 20 d9 23 69 25 0d 07  c6 05 cd 0d 07 d0 05 e1  |. .#i%..........|
000015d0  0d 07 da 05 3a 0d 07 e4  10 dd f2 77 72 69 74 65  |....:......write|
000015e0  73 69 74 65 73 0d 07 ee  0b ea 20 70 25 2c 6e 25  |sites..... p%,n%|
000015f0  0d 07 f8 24 70 25 3d 73  69 74 65 73 6c 69 73 74  |...$p%=siteslist|
00001600  25 3a f4 20 72 65 76 65  72 73 65 20 74 68 65 20  |%:. reverse the |
00001610  6c 69 73 74 0d 08 02 25  73 69 74 65 73 6c 69 73  |list...%siteslis|
00001620  74 25 3d 30 3a f4 20 54  68 65 20 6c 69 73 74 20  |t%=0:. The list |
00001630  69 73 20 7a 65 72 6f 65  64 0d 08 0c 38 c8 95 20  |is zeroed...8.. |
00001640  70 25 3c 3e 30 3a 6e 25  3d 21 70 25 3a 21 70 25  |p%<>0:n%=!p%:!p%|
00001650  3d 73 69 74 65 73 6c 69  73 74 25 3a 73 69 74 65  |=siteslist%:site|
00001660  73 6c 69 73 74 25 3d 70  25 3a 70 25 3d 6e 25 3a  |slist%=p%:p%=n%:|
00001670  ce 0d 08 16 15 f4 20 4e  6f 77 20 73 61 76 65 20  |...... Now save |
00001680  69 74 20 6f 75 74 0d 08  20 13 6f 25 3d ae 28 73  |it out.. .o%=.(s|
00001690  69 74 65 66 69 6c 65 24  29 0d 08 2a 25 70 25 3d  |itefile$)..*%p%=|
000016a0  73 69 74 65 73 6c 69 73  74 25 3a f4 20 54 68 65  |siteslist%:. The|
000016b0  20 6c 69 73 74 20 6f 66  20 73 69 74 65 73 0d 08  | list of sites..|
000016c0  34 3c d5 23 6f 25 2c 22  23 20 53 69 74 65 73 20  |4<.#o%,"# Sites |
000016d0  6c 69 73 74 2c 20 67 65  6e 65 72 61 74 65 64 20  |list, generated |
000016e0  62 79 20 53 69 74 65 45  64 69 74 20 66 6f 72 20  |by SiteEdit for |
000016f0  22 2b 73 69 74 65 61 70  70 24 0d 08 3e 17 d5 23  |"+siteapp$..>..#|
00001700  6f 25 2c 22 23 20 46 6f  72 6d 61 74 20 31 20 3a  |o%,"# Format 1 :|
00001710  22 0d 08 48 18 d5 23 6f  25 2c 22 23 20 3c 73 69  |"..H..#o%,"# <si|
00001720  74 65 20 6e 61 6d 65 3e  22 0d 08 52 1e d5 23 6f  |te name>"..R..#o|
00001730  25 2c 22 23 20 3c 68 6f  73 74 6e 61 6d 65 3e 20  |%,"# <hostname> |
00001740  3c 70 6f 72 74 3e 22 0d  08 5c 0c c8 95 20 70 25  |<port>"..\... p%|
00001750  3c 3e 30 0d 08 66 23 20  d5 23 6f 25 2c 24 28 70  |<>0..f# .#o%,$(p|
00001760  25 21 34 29 3a f4 20 57  72 69 74 65 20 73 69 74  |%!4):. Write sit|
00001770  65 20 6e 61 6d 65 0d 08  70 30 20 d5 23 6f 25 2c  |e name..p0 .#o%,|
00001780  24 28 70 25 21 38 29 2b  22 20 22 2b 24 28 70 25  |$(p%!8)+" "+$(p%|
00001790  21 31 32 29 3a f4 20 57  72 69 74 65 20 68 6f 73  |!12):. Write hos|
000017a0  74 2f 70 6f 72 74 0d 08  7a 17 20 70 25 3d 21 70  |t/port..z. p%=!p|
000017b0  25 3a f4 20 4e 65 78 74  20 69 74 65 6d 0d 08 84  |%:. Next item...|
000017c0  05 ce 0d 08 8e 08 d9 23  6f 25 0d 08 98 33 c8 99  |.......#o%...3..|
000017d0  20 22 4f 53 5f 46 69 6c  65 22 2c 31 38 2c 73 69  | "OS_File",18,si|
000017e0  74 65 66 69 6c 65 24 2c  26 46 46 46 3a f4 20 53  |tefile$,&FFF:. S|
000017f0  65 74 20 69 74 20 61 73  20 74 65 78 74 0d 08 a2  |et it as text...|
00001800  13 e7 20 73 69 74 65 74  61 73 6b 3c 3e 30 20 8c  |.. sitetask<>0 .|
00001810  0d 08 ac 3d 20 21 62 25  3d 32 30 3a 62 25 21 31  |...= !b%=20:b%!1|
00001820  32 3d 30 3a 62 25 21 31  36 3d 26 39 30 32 38 31  |2=0:b%!16=&90281|
00001830  3a f4 20 43 6f 6e 66 69  67 50 6c 75 73 5f 53 69  |:. ConfigPlus_Si|
00001840  74 65 43 68 61 6e 67 65  64 20 28 21 29 0d 08 b6  |teChanged (!)...|
00001850  29 20 c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |) .. "Wimp_SendM|
00001860  65 73 73 61 67 65 22 2c  31 37 2c 62 25 2c 73 69  |essage",17,b%,si|
00001870  74 65 74 61 73 6b 0d 08  c0 05 cd 0d 08 ca 24 70  |tetask........$p|
00001880  25 3d 73 69 74 65 73 6c  69 73 74 25 3a f4 20 72  |%=siteslist%:. r|
00001890  65 76 65 72 73 65 20 74  68 65 20 6c 69 73 74 0d  |everse the list.|
000018a0  08 d4 25 73 69 74 65 73  6c 69 73 74 25 3d 30 3a  |..%siteslist%=0:|
000018b0  f4 20 54 68 65 20 6c 69  73 74 20 69 73 20 7a 65  |. The list is ze|
000018c0  72 6f 65 64 0d 08 de 38  c8 95 20 70 25 3c 3e 30  |roed...8.. p%<>0|
000018d0  3a 6e 25 3d 21 70 25 3a  21 70 25 3d 73 69 74 65  |:n%=!p%:!p%=site|
000018e0  73 6c 69 73 74 25 3a 73  69 74 65 73 6c 69 73 74  |slist%:siteslist|
000018f0  25 3d 70 25 3a 70 25 3d  6e 25 3a ce 0d 08 e8 05  |%=p%:p%=n%:.....|
00001900  e1 0d 08 f2 05 3a 0d 08  fc 1e dd f2 70 72 6f 63  |.....:......proc|
00001910  65 73 73 6b 65 79 28 77  69 6e 2c 69 63 6f 6e 2c  |esskey(win,icon,|
00001920  6b 65 79 29 0d 09 06 17  ea 20 6b 65 79 64 6f 6e  |key)..... keydon|
00001930  65 3a 6b 65 79 64 6f 6e  65 3d a3 0d 09 10 0c c8  |e:keydone=......|
00001940  8e 20 77 69 6e 20 ca 0d  09 1a 23 20 c9 20 73 65  |. win ....# . se|
00001950  64 69 74 77 69 6e 25 3a  f4 20 53 69 74 65 20 45  |ditwin%:. Site E|
00001960  64 69 74 20 77 69 6e 64  6f 77 0d 09 24 0e 20 20  |dit window..$.  |
00001970  c8 8e 20 6b 65 79 20 ca  0d 09 2e 19 20 20 20 c9  |.. key .....   .|
00001980  20 26 31 39 45 3a f4 20  50 61 67 65 20 44 6f 77  | &19E:. Page Dow|
00001990  6e 0d 09 38 31 20 20 20  20 65 64 69 74 73 69 74  |n..81    editsit|
000019a0  65 25 2d 3d 31 2b 28 62  75 74 3d 31 29 2a 32 3a  |e%-=1+(but=1)*2:|
000019b0  f2 67 65 74 73 69 74 65  3a 6b 65 79 64 6f 6e 65  |.getsite:keydone|
000019c0  3d b9 0d 09 42 17 20 20  20 c9 20 26 31 39 46 3a  |=...B.   . &19F:|
000019d0  f4 20 50 61 67 65 20 55  70 0d 09 4c 31 20 20 20  |. Page Up..L1   |
000019e0  20 65 64 69 74 73 69 74  65 25 2b 3d 31 2b 28 62  | editsite%+=1+(b|
000019f0  75 74 3d 31 29 2a 32 3a  f2 67 65 74 73 69 74 65  |ut=1)*2:.getsite|
00001a00  3a 6b 65 79 64 6f 6e 65  3d b9 0d 09 56 1a 20 20  |:keydone=...V.  |
00001a10  20 c9 20 31 30 2c 31 33  3a f2 75 70 64 61 74 65  | . 10,13:.update|
00001a20  73 69 74 65 0d 09 60 34  20 20 20 20 e7 20 75 73  |site..`4    . us|
00001a30  65 69 63 6f 6e 62 61 72  20 8c f2 63 6c 6f 73 65  |eiconbar ..close|
00001a40  77 69 6e 28 73 65 64 69  74 77 69 6e 25 29 3a 6b  |win(seditwin%):k|
00001a50  65 79 64 6f 6e 65 3d b9  0d 09 6a 0b 20 20 20 c9  |eydone=...j.   .|
00001a60  20 32 37 0d 09 74 3d 20  20 20 20 e7 20 75 73 65  | 27..t=    . use|
00001a70  69 63 6f 6e 62 61 72 20  8c f2 63 6c 6f 73 65 77  |iconbar ..closew|
00001a80  69 6e 28 73 65 64 69 74  77 69 6e 25 29 3a 6b 65  |in(seditwin%):ke|
00001a90  79 64 6f 6e 65 3d a3 20  8b 71 75 69 74 25 3d b9  |ydone=. .quit%=.|
00001aa0  0d 09 7e 07 20 20 cb 0d  09 88 05 cb 0d 09 92 29  |..~.  .........)|
00001ab0  e7 20 ac 20 6b 65 79 64  6f 6e 65 20 8c c8 99 20  |. . keydone ... |
00001ac0  22 57 69 6d 70 5f 50 72  6f 63 65 73 73 4b 65 79  |"Wimp_ProcessKey|
00001ad0  22 2c 6b 65 79 0d 09 9c  05 e1 0d 09 a6 05 3a 0d  |",key.........:.|
00001ae0  09 b0 10 dd f2 6d 65 6e  75 63 68 6f 69 63 65 0d  |.....menuchoice.|
00001af0  09 ba 44 c8 99 22 57 69  6d 70 5f 47 65 74 50 6f  |..D.."Wimp_GetPo|
00001b00  69 6e 74 65 72 49 6e 66  6f 22 2c 2c 6d 65 73 73  |interInfo",,mess|
00001b10  61 67 65 5f 62 75 66 66  65 72 25 3a 6d 62 75 74  |age_buffer%:mbut|
00001b20  25 3d 6d 65 73 73 61 67  65 5f 62 75 66 66 65 72  |%=message_buffer|
00001b30  25 21 38 0d 09 c4 1c 6d  24 3d a4 64 65 63 6f 64  |%!8....m$=.decod|
00001b40  65 6d 65 6e 75 28 63 75  72 6d 65 6e 75 25 29 0d  |emenu(curmenu%).|
00001b50  09 ce 11 c8 8e 20 63 75  72 6d 65 6e 75 25 20 ca  |..... curmenu% .|
00001b60  0d 09 d8 35 20 c9 20 73  69 74 65 73 6d 65 6e 75  |...5 . sitesmenu|
00001b70  25 3a f4 20 54 68 65 20  6c 69 73 74 20 6f 66 20  |%:. The list of |
00001b80  73 69 74 65 73 20 28 77  65 20 64 6f 20 6e 6f 74  |sites (we do not|
00001b90  68 69 6e 67 29 0d 09 e2  24 20 c9 20 73 65 72 76  |hing)...$ . serv|
00001ba0  6d 65 6e 75 25 3a f4 20  54 68 65 20 73 65 72 76  |menu%:. The serv|
00001bb0  69 63 65 73 20 6d 65 6e  75 0d 09 ec 3d 20 20 f2  |ices menu...=  .|
00001bc0  6d 65 6e 75 75 6e 74 69  63 6b 28 73 65 72 76 6d  |menuuntick(servm|
00001bd0  65 6e 75 25 2c 30 2c 2d  31 29 3a f2 6d 65 6e 75  |enu%,0,-1):.menu|
00001be0  74 69 63 6b 28 73 65 72  76 6d 65 6e 75 25 2c 62  |tick(servmenu%,b|
00001bf0  25 21 30 2c 31 29 0d 09  f6 22 20 20 f2 73 65 74  |%!0,1)..."  .set|
00001c00  69 63 6f 6e 74 65 78 74  28 73 65 64 69 74 77 69  |icontext(seditwi|
00001c10  6e 25 2c 37 2c 6d 24 29  0d 0a 00 0e 20 c9 20 69  |n%,7,m$).... . i|
00001c20  62 6d 65 6e 75 25 0d 0a  0a 0d 20 20 c8 8e 20 6d  |bmenu%....  .. m|
00001c30  24 20 ca 0d 0a 14 1e 20  20 20 c9 20 22 53 69 74  |$ .....   . "Sit|
00001c40  65 73 2e 2e 2e 22 3a f2  6f 70 65 6e 73 69 74 65  |es...":.opensite|
00001c50  73 0d 0a 1e 17 20 20 20  c9 20 22 51 75 69 74 22  |s....   . "Quit"|
00001c60  3a 71 75 69 74 25 3d b9  0d 0a 28 07 20 20 cb 0d  |:quit%=...(.  ..|
00001c70  0a 32 05 cb 0d 0a 3c 2d  e7 20 28 6d 62 75 74 25  |.2....<-. (mbut%|
00001c80  80 31 29 3d 31 20 8c f2  72 65 63 72 65 61 74 65  |.1)=1 ..recreate|
00001c90  6d 65 6e 75 20 8b 63 75  72 6d 65 6e 75 25 3d 2d  |menu .curmenu%=-|
00001ca0  31 0d 0a 46 05 e1 0d 0a  50 05 3a 0d 0a 5a 13 dd  |1..F....P.:..Z..|
00001cb0  f2 72 65 63 65 69 76 65  28 6d 65 73 73 29 0d 0a  |.receive(mess)..|
00001cc0  64 0d c8 8e 20 6d 65 73  73 20 ca 0d 0a 6e 24 20  |d... mess ...n$ |
00001cd0  c9 20 26 34 30 30 43 30  3a f4 20 4d 65 6e 75 20  |. &400C0:. Menu |
00001ce0  6f 70 65 6e 69 6e 67 20  77 61 72 6e 69 6e 67 0d  |opening warning.|
00001cf0  0a 78 13 20 20 c8 8e 20  63 75 72 6d 65 6e 75 25  |.x.  .. curmenu%|
00001d00  20 ca 0d 0a 82 10 20 20  20 c9 20 69 62 6d 65 6e  | .....   . ibmen|
00001d10  75 25 0d 0a 8c 1d 20 20  20 20 73 69 74 65 73 6d  |u%....    sitesm|
00001d20  65 6e 75 25 3d a4 73 69  74 65 73 6d 65 6e 75 0d  |enu%=.sitesmenu.|
00001d30  0a 96 28 20 20 20 20 69  62 6d 65 6e 75 25 21 28  |..(    ibmenu%!(|
00001d40  33 32 2b 32 34 2a 62 25  21 33 32 29 3d 73 69 74  |32+24*b%!32)=sit|
00001d50  65 73 6d 65 6e 75 25 0d  0a a0 37 20 20 20 20 c8  |esmenu%...7    .|
00001d60  99 20 22 57 69 6d 70 5f  43 72 65 61 74 65 53 75  |. "Wimp_CreateSu|
00001d70  62 4d 65 6e 75 22 2c 2c  73 69 74 65 73 6d 65 6e  |bMenu",,sitesmen|
00001d80  75 25 2c 62 25 21 32 34  2c 62 25 21 32 38 0d 0a  |u%,b%!24,b%!28..|
00001d90  aa 07 20 20 cb 0d 0a b4  1b 20 f4 20 26 34 30 30  |..  ..... . &400|
00001da0  43 31 20 3d 20 6d 6f 64  65 20 63 68 61 6e 67 65  |C1 = mode change|
00001db0  0d 0a be 1d 20 f4 20 26  34 30 30 43 32 20 3d 20  |.... . &400C2 = |
00001dc0  74 61 73 6b 20 73 74 61  72 74 20 75 70 0d 0a c8  |task start up...|
00001dd0  1e 20 f4 20 26 34 30 30  43 33 20 3d 20 74 61 73  |. . &400C3 = tas|
00001de0  6b 20 73 68 75 74 20 64  6f 77 6e 0d 0a d2 12 20  |k shut down.... |
00001df0  c9 20 30 3a 71 75 69 74  25 3d b9 2a 32 0d 0a dc  |. 0:quit%=.*2...|
00001e00  35 20 c9 20 26 39 30 32  38 32 3a f4 20 45 64 69  |5 . &90282:. Edi|
00001e10  74 69 6e 67 53 69 74 65  20 28 71 75 69 74 20 69  |tingSite (quit i|
00001e20  66 20 61 6c 72 65 61 64  79 20 65 64 69 74 69 6e  |f already editin|
00001e30  67 29 0d 0a e6 45 20 20  e7 20 a4 6c 6f 6e 67 66  |g)...E  . .longf|
00001e40  69 6c 65 6e 61 6d 65 28  73 69 74 65 66 69 6c 65  |ilename(sitefile|
00001e50  24 29 3d 24 28 62 25 2b  32 30 29 20 80 20 62 25  |$)=$(b%+20) . b%|
00001e60  21 34 3c 3e 74 61 73 6b  68 61 6e 64 6c 65 20 8c  |!4<>taskhandle .|
00001e70  71 75 69 74 25 3d b9 0d  0a f0 23 20 c9 20 26 35  |quit%=....# . &5|
00001e80  30 32 3a f2 48 65 6c 70  28 62 25 21 33 32 2c 62  |02:.Help(b%!32,b|
00001e90  25 21 33 36 2c 62 25 21  34 29 0d 0a fa 05 cb 0d  |%!36,b%!4)......|
00001ea0  0b 04 05 e1 0d 0b 0e 05  3a 0d 0b 18 16 dd f2 72  |........:......r|
00001eb0  65 63 65 69 76 65 61 63  6b 28 6d 65 73 73 29 0d  |eceiveack(mess).|
00001ec0  0b 22 0d c8 8e 20 6d 65  73 73 20 ca 0d 0b 2c 05  |."... mess ...,.|
00001ed0  cb 0d 0b 36 05 e1 0d 0b  40 05 3a 0d 0b 4a 0d dd  |...6....@.:..J..|
00001ee0  f2 67 65 74 73 69 74 65  0d 0b 54 10 ea 20 70 25  |.getsite..T.. p%|
00001ef0  2c 73 25 3a 70 25 3d 30  0d 0b 5e 19 c8 95 20 70  |,s%:p%=0..^... p|
00001f00  25 3d 30 20 80 20 65 64  69 74 73 69 74 65 25 3e  |%=0 . editsite%>|
00001f10  30 0d 0b 68 21 20 70 25  3d 73 69 74 65 73 6c 69  |0..h! p%=sitesli|
00001f20  73 74 25 3a 73 25 3d 65  64 69 74 73 69 74 65 25  |st%:s%=editsite%|
00001f30  2d 31 0d 0b 72 23 20 c8  95 20 70 25 3c 3e 30 20  |-1..r# .. p%<>0 |
00001f40  80 20 73 25 3e 30 3a 70  25 3d 21 70 25 3a 73 25  |. s%>0:p%=!p%:s%|
00001f50  2d 3d 31 3a ce 0d 0b 7c  19 20 e7 20 70 25 3d 30  |-=1:...|. . p%=0|
00001f60  20 8c 65 64 69 74 73 69  74 65 25 2d 3d 31 0d 0b  | .editsite%-=1..|
00001f70  86 05 ce 0d 0b 90 13 e7  20 65 64 69 74 73 69 74  |........ editsit|
00001f80  65 25 3c 31 20 8c 0d 0b  9a 34 20 f2 73 65 74 69  |e%<1 ....4 .seti|
00001f90  63 6f 6e 74 65 78 74 28  73 65 64 69 74 77 69 6e  |context(seditwin|
00001fa0  25 2c 34 2c 22 28 4e 65  77 29 22 29 3a f4 20 41  |%,4,"(New)"):. A|
00001fb0  20 6e 65 77 20 65 6e 74  72 79 0d 0b a4 36 20 f2  | new entry...6 .|
00001fc0  73 65 74 69 63 6f 6e 74  65 78 74 28 73 65 64 69  |seticontext(sedi|
00001fd0  74 77 69 6e 25 2c 31 2c  22 22 29 3a f4 20 57 69  |twin%,1,""):. Wi|
00001fe0  70 65 20 74 68 65 20 73  69 74 65 20 6e 61 6d 65  |pe the site name|
00001ff0  0d 0b ae 31 20 f2 73 65  74 69 63 6f 6e 74 65 78  |...1 .seticontex|
00002000  74 28 73 65 64 69 74 77  69 6e 25 2c 36 2c 22 22  |t(seditwin%,6,""|
00002010  29 3a f4 20 57 69 70 65  20 68 6f 73 74 6e 61 6d  |):. Wipe hostnam|
00002020  65 0d 0b b8 34 20 f2 73  65 74 69 63 6f 6e 74 65  |e...4 .seticonte|
00002030  78 74 28 73 65 64 69 74  77 69 6e 25 2c 37 2c 73  |xt(seditwin%,7,s|
00002040  69 74 65 70 6f 72 74 24  29 3a f4 20 57 69 70 65  |iteport$):. Wipe|
00002050  20 70 6f 72 74 0d 0b c2  21 20 65 64 69 74 73 69  | port...! editsi|
00002060  74 65 25 3d 30 3a f4 20  45 6e 73 75 72 65 20 69  |te%=0:. Ensure i|
00002070  74 20 69 73 20 30 0d 0b  cc 05 cc 0d 0b d6 31 20  |t is 0........1 |
00002080  f2 73 65 74 69 63 6f 6e  74 65 78 74 28 73 65 64  |.seticontext(sed|
00002090  69 74 77 69 6e 25 2c 34  2c 22 28 22 2b c3 65 64  |itwin%,4,"("+.ed|
000020a0  69 74 73 69 74 65 25 2b  22 29 22 29 0d 0b e0 3a  |itsite%+")")...:|
000020b0  20 f2 73 65 74 69 63 6f  6e 74 65 78 74 28 73 65  | .seticontext(se|
000020c0  64 69 74 77 69 6e 25 2c  31 2c 24 28 70 25 21 34  |ditwin%,1,$(p%!4|
000020d0  29 29 3a f4 20 53 65 74  20 74 68 65 20 73 69 74  |)):. Set the sit|
000020e0  65 20 6e 61 6d 65 0d 0b  ea 35 20 f2 73 65 74 69  |e name...5 .seti|
000020f0  63 6f 6e 74 65 78 74 28  73 65 64 69 74 77 69 6e  |context(seditwin|
00002100  25 2c 36 2c 24 28 70 25  21 38 29 29 3a f4 20 53  |%,6,$(p%!8)):. S|
00002110  65 74 20 68 6f 73 74 6e  61 6d 65 0d 0b f4 32 20  |et hostname...2 |
00002120  f2 73 65 74 69 63 6f 6e  74 65 78 74 28 73 65 64  |.seticontext(sed|
00002130  69 74 77 69 6e 25 2c 37  2c 24 28 70 25 21 31 32  |itwin%,7,$(p%!12|
00002140  29 29 3a f4 20 53 65 74  20 70 6f 72 74 0d 0b fe  |)):. Set port...|
00002150  05 cd 0d 0c 08 05 e1 0d  0c 12 05 3a 0d 0c 1c 1a  |...........:....|
00002160  dd f2 6c 6f 61 64 66 69  6c 65 28 66 69 6c 65 24  |..loadfile(file$|
00002170  2c 74 79 70 65 29 0d 0c  26 0d c8 8e 20 74 79 70  |,type)..&... typ|
00002180  65 20 ca 0d 0c 30 05 cb  0d 0c 3a 05 e1 0d 0c 44  |e ...0....:....D|
00002190  05 3a 0d 0c 4e 2f f4 20  41 6e 79 20 6d 65 73 73  |.:..N/. Any mess|
000021a0  61 67 65 73 20 74 6f 20  62 65 20 72 65 63 65 69  |ages to be recei|
000021b0  76 65 64 20 4d 55 53 54  20 62 65 20 6e 6f 74 65  |ved MUST be note|
000021c0  64 0d 0c 58 0e dd f2 69  6e 69 74 77 69 6d 70 0d  |d..X...initwimp.|
000021d0  0c 62 21 de 20 6d 65 73  73 61 67 65 6c 69 73 74  |.b!. messagelist|
000021e0  25 20 32 35 36 3a 6d 65  73 73 70 74 72 25 3d 30  |% 256:messptr%=0|
000021f0  0d 0c 6c 2b f2 6e 6f 74  65 6d 65 73 73 61 67 65  |..l+.notemessage|
00002200  28 26 35 30 32 29 3a f2  6e 6f 74 65 6d 65 73 73  |(&502):.notemess|
00002210  61 67 65 28 26 39 30 32  38 32 29 0d 0c 76 18 f2  |age(&90282)..v..|
00002220  6e 6f 74 65 6d 65 73 73  61 67 65 28 26 34 30 30  |notemessage(&400|
00002230  43 30 29 0d 0c 80 13 f2  6e 6f 74 65 6d 65 73 73  |C0).....notemess|
00002240  61 67 65 28 30 29 0d 0c  8a 55 c8 99 20 22 57 69  |age(0)...U.. "Wi|
00002250  6d 70 5f 49 6e 69 74 69  61 6c 69 73 65 22 2c 33  |mp_Initialise",3|
00002260  31 30 2c 26 34 42 35 33  34 31 35 34 2c 41 70 70  |10,&4B534154,App|
00002270  6e 61 6d 65 24 2c 6d 65  73 73 61 67 65 6c 69 73  |name$,messagelis|
00002280  74 25 20 b8 20 77 69 6d  70 76 65 72 73 69 6f 6e  |t% . wimpversion|
00002290  2c 74 61 73 6b 68 61 6e  64 6c 65 0d 0c 94 47 69  |,taskhandle...Gi|
000022a0  6e 64 6c 25 3d 31 30 32  34 3a 6d 65 6e 75 6c 25  |ndl%=1024:menul%|
000022b0  3d 31 30 32 34 3a de 20  62 25 20 32 30 34 38 2c  |=1024:. b% 2048,|
000022c0  69 6e 64 25 20 69 6e 64  6c 25 2c 6d 65 6e 75 25  |ind% indl%,menu%|
000022d0  20 6d 65 6e 75 6c 25 2c  77 73 70 63 25 20 26 38  | menul%,wspc% &8|
000022e0  30 30 0d 0c 9e 0f 63 75  72 6d 65 6e 75 25 3d 2d  |00....curmenu%=-|
000022f0  31 0d 0c a8 11 f2 6f 70  65 6e 6d 65 73 73 61 67  |1.....openmessag|
00002300  65 73 0d 0c b2 30 f4 20  73 70 72 69 74 65 73 25  |es...0. sprites%|
00002310  3d 46 4e 6c 6f 61 64 73  70 72 69 74 65 73 28 41  |=FNloadsprites(A|
00002320  70 70 64 69 72 24 2b 22  2e 53 70 72 69 74 65 73  |ppdir$+".Sprites|
00002330  22 29 0d 0c bc 24 69 6e  66 6f 62 6f 78 25 3d a4  |")...$infobox%=.|
00002340  6c 6f 61 64 74 65 6d 70  6c 61 74 65 28 22 49 6e  |loadtemplate("In|
00002350  66 6f 22 2c 31 29 0d 0c  c6 29 73 65 64 69 74 77  |fo",1)...)seditw|
00002360  69 6e 25 3d a4 6c 6f 61  64 74 65 6d 70 6c 61 74  |in%=.loadtemplat|
00002370  65 28 22 45 64 69 74 53  69 74 65 22 2c 31 29 0d  |e("EditSite",1).|
00002380  0c d0 25 f2 73 65 74 69  63 6f 6e 74 65 78 74 28  |..%.seticontext(|
00002390  69 6e 66 6f 62 6f 78 25  2c 31 2c 41 70 70 6e 61  |infobox%,1,Appna|
000023a0  6d 65 24 29 0d 0c da 25  f2 73 65 74 69 63 6f 6e  |me$)...%.seticon|
000023b0  74 65 78 74 28 69 6e 66  6f 62 6f 78 25 2c 34 2c  |text(infobox%,4,|
000023c0  76 65 72 73 69 6f 6e 24  29 0d 0c e4 a3 e7 20 75  |version$)..... u|
000023d0  73 65 69 63 6f 6e 62 61  72 20 8c 69 62 6d 65 6e  |seiconbar .ibmen|
000023e0  75 25 3d a4 63 72 65 61  74 65 6d 65 6e 75 28 41  |u%=.createmenu(A|
000023f0  70 70 6e 61 6d 65 24 2b  22 7c 49 6e 66 6f 5d 3e  |ppname$+"|Info]>|
00002400  69 6e 66 6f 62 6f 78 25  7c 53 69 74 65 73 2e 2e  |infobox%|Sites..|
00002410  2e 7c 54 65 73 74 20 73  69 74 65 73 5d 4d 3e 31  |.|Test sites]M>1|
00002420  7c 51 75 69 74 22 29 20  8b 69 62 6d 65 6e 75 25  ||Quit") .ibmenu%|
00002430  3d a4 63 72 65 61 74 65  6d 65 6e 75 28 41 70 70  |=.createmenu(App|
00002440  6e 61 6d 65 24 2b 22 7c  49 6e 66 6f 5d 3e 69 6e  |name$+"|Info]>in|
00002450  66 6f 62 6f 78 25 7c 54  65 73 74 20 73 69 74 65  |fobox%|Test site|
00002460  73 5d 4d 3e 31 7c 51 75  69 74 22 29 0d 0c ee 17  |s]M>1|Quit")....|
00002470  69 62 6f 70 74 69 6f 6e  73 25 3d 6f 70 74 69 6f  |iboptions%=optio|
00002480  6e 73 25 0d 0c f8 05 e1  0d 0d 02 05 3a 0d 0d 0c  |ns%.........:...|
00002490  0e dd f2 69 6e 69 74 70  72 6f 67 0d 0d 16 0f f4  |...initprog.....|
000024a0  20 56 61 72 69 61 62 6c  65 73 0d 0d 20 3d 65 64  | Variables.. =ed|
000024b0  69 74 73 69 74 65 25 3d  31 3a f4 20 57 65 27 72  |itsite%=1:. We'r|
000024c0  65 20 6c 6f 6f 6b 69 6e  67 20 61 74 20 74 68 65  |e looking at the|
000024d0  20 66 69 72 73 74 20 73  69 74 65 20 69 6e 20 74  | first site in t|
000024e0  68 65 20 66 69 6c 65 0d  0d 2a 30 63 6f 6e 73 6d  |he file..*0consm|
000024f0  65 6e 75 25 3d 30 3a f4  20 43 6f 6e 6e 65 63 74  |enu%=0:. Connect|
00002500  69 6f 6e 73 20 6d 65 6e  75 2c 20 66 6f 72 20 63  |ions menu, for c|
00002510  68 65 63 6b 69 6e 67 0d  0d 34 39 63 6f 6e 73 70  |hecking..49consp|
00002520  72 65 73 25 3d 30 3a f4  20 4e 6f 20 63 6f 6e 6e  |res%=0:. No conn|
00002530  65 63 74 69 6f 6e 73 20  70 72 65 73 65 72 76 65  |ections preserve|
00002540  20 62 6c 6f 63 6b 20 28  64 79 6e 6d 65 6e 75 29  | block (dynmenu)|
00002550  0d 0d 3e 2b 73 69 74 65  73 6c 69 73 74 25 3d 30  |..>+siteslist%=0|
00002560  3a f4 20 54 68 65 20 63  61 63 68 65 64 20 6c 69  |:. The cached li|
00002570  73 74 20 6f 66 20 73 69  74 65 73 0d 0d 48 2b 73  |st of sites..H+s|
00002580  69 74 65 73 6d 65 6e 75  25 3d 30 3a f4 20 53 69  |itesmenu%=0:. Si|
00002590  74 65 73 20 6d 65 6e 75  2c 20 66 6f 72 20 63 68  |tes menu, for ch|
000025a0  65 63 6b 69 6e 67 0d 0d  52 34 73 69 74 65 73 70  |ecking..R4sitesp|
000025b0  72 65 73 25 3d 30 3a f4  20 4e 6f 20 73 69 74 65  |res%=0:. No site|
000025c0  73 20 70 72 65 73 65 72  76 65 20 62 6c 6f 63 6b  |s preserve block|
000025d0  20 28 64 79 6e 6d 65 6e  75 29 0d 0d 5c 23 73 65  | (dynmenu)..\#se|
000025e0  72 76 6d 65 6e 75 25 3d  2d 31 3a f4 20 4e 6f 20  |rvmenu%=-1:. No |
000025f0  73 65 72 76 69 63 65 73  20 6d 65 6e 75 0d 0d 66  |services menu..f|
00002600  1a f4 20 49 6e 69 74 69  61 6c 69 73 61 74 69 6f  |.. Initialisatio|
00002610  6e 20 73 74 75 66 66 0d  0d 70 27 f2 72 65 61 64  |n stuff..p'.read|
00002620  73 69 74 65 73 3a f4 20  52 65 61 64 20 74 68 65  |sites:. Read the|
00002630  20 73 69 74 65 73 20 66  69 6c 65 20 69 6e 0d 0d  | sites file in..|
00002640  7a 05 e1 0d 0d 84 05 e1  0d 0d 8e 05 3a 0d 0d 98  |z...........:...|
00002650  17 dd f2 48 65 6c 70 28  77 69 6e 2c 69 63 6f 6e  |...Help(win,icon|
00002660  2c 74 6f 29 0d 0d a2 1f  f7 20 2b 31 3a f2 72 65  |,to)..... +1:.re|
00002670  61 64 68 65 6c 70 28 77  69 6e 2c 69 63 6f 6e 2c  |adhelp(win,icon,|
00002680  74 6f 29 0d 0d ac 05 e1  0d 0d b6 0d f4 20 57 69  |to).......... Wi|
00002690  6e 64 6f 77 73 0d 0d c0  1a dc 20 69 6e 66 6f 62  |ndows..... infob|
000026a0  6f 78 25 2c 22 3e 48 49  6e 66 6f 62 6f 78 22 0d  |ox%,">HInfobox".|
000026b0  0d ca 14 dc 20 33 2c 22  3e 48 49 6e 66 6f 62 6f  |.... 3,">HInfobo|
000026c0  78 33 22 0d 0d d4 14 dc  20 34 2c 22 3e 48 49 6e  |x3"..... 4,">HIn|
000026d0  66 6f 62 6f 78 34 22 0d  0d de 14 dc 20 2d 32 2c  |fobox4"..... -2,|
000026e0  22 3e 48 49 63 6f 6e 62  61 72 22 0d 0d e8 19 dc  |">HIconbar".....|
000026f0  20 73 65 64 69 74 77 69  6e 25 2c 22 3e 48 53 45  | seditwin%,">HSE|
00002700  64 69 74 22 0d 0d f2 15  dc 20 31 2c 22 3e 48 53  |dit"..... 1,">HS|
00002710  45 64 69 74 4e 61 6d 65  22 0d 0d fc 13 dc 20 32  |EditName"..... 2|
00002720  2c 22 3e 48 53 45 64 69  74 55 70 22 0d 0e 06 15  |,">HSEditUp"....|
00002730  dc 20 33 2c 22 3e 48 53  45 64 69 74 44 6f 77 6e  |. 3,">HSEditDown|
00002740  22 0d 0e 10 14 dc 20 34  2c 22 3e 48 53 45 64 69  |"..... 4,">HSEdi|
00002750  74 4e 75 6d 22 0d 0e 1a  15 dc 20 36 2c 22 3e 48  |tNum"..... 6,">H|
00002760  53 45 64 69 74 48 6f 73  74 22 0d 0e 24 15 dc 20  |SEditHost"..$.. |
00002770  37 2c 22 3e 48 53 45 64  69 74 50 6f 72 74 22 0d  |7,">HSEditPort".|
00002780  0e 2e 14 dc 20 39 2c 22  3e 48 50 6f 72 74 4d 65  |.... 9,">HPortMe|
00002790  6e 75 22 0d 0e 38 18 dc  20 31 30 2c 22 3e 48 53  |nu"..8.. 10,">HS|
000027a0  45 64 69 74 55 70 64 61  74 65 22 0d 0e 42 18 dc  |EditUpdate"..B..|
000027b0  20 31 31 2c 22 3e 48 53  45 64 69 74 44 65 6c 65  | 11,">HSEditDele|
000027c0  74 65 22 0d 0e 4c 0b dc  20 2d 31 2c 2d 31 0d 0e  |te"..L.. -1,-1..|
000027d0  56 0b f4 20 4d 65 6e 75  73 0d 0e 60 11 dc 20 2d  |V.. Menus..`.. -|
000027e0  32 2c 2d 32 2c 2d 32 2c  2d 32 0d 0e 6a 05 3a 0d  |2,-2,-2,-2..j.:.|
000027f0  0e 74 13 dd f2 46 65 74  63 68 50 61 67 65 28 66  |.t...FetchPage(f|
00002800  24 29 0d 0e 7e 3c f4 20  58 55 52 49 5f 44 69 73  |$)..~<. XURI_Dis|
00002810  70 61 74 63 68 20 2d 20  74 68 69 73 20 70 72 6f  |patch - this pro|
00002820  74 6f 63 6f 6c 20 69 73  20 73 74 69 6c 6c 20 62  |tocol is still b|
00002830  65 69 6e 67 20 64 65 63  69 64 65 64 20 21 0d 0e  |eing decided !..|
00002840  88 18 c8 99 20 26 36 45  33 38 31 2c 25 30 30 30  |.... &6E381,%000|
00002850  2c 66 24 2b bd 30 0d 0e  92 05 e1 0d 0e 9c 05 3a  |,f$+.0.........:|
00002860  0d 0e a6 0f dd f2 6f 70  65 6e 73 69 74 65 73 0d  |......opensites.|
00002870  0e b0 1c f2 67 65 74 73  69 74 65 3a f4 20 52 65  |....getsite:. Re|
00002880  61 64 20 74 68 65 20 73  69 74 65 0d 0e ba 31 f2  |ad the site...1.|
00002890  6f 70 65 6e 77 69 6e 28  73 65 64 69 74 77 69 6e  |openwin(seditwin|
000028a0  25 29 3a f2 73 65 74 63  61 72 65 74 65 6e 64 28  |%):.setcaretend(|
000028b0  73 65 64 69 74 77 69 6e  25 2c 31 29 0d 0e c4 05  |seditwin%,1)....|
000028c0  e1 0d ff                                          |...|
000028c3