AMOS Pro101V      +(R H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   R  ndret i PDFormat V1.10:   &R D 27.12.1993: Offset til tekst i jumptable peger direkte p teksten,   R  istedet for 2 pladser fr.   R ( Ingen max. lngde p ASCII-filen mere.   (R H 31.01.1994: Frdiggjort PDFormat v1.20. Eneste forskel i den fra fore-   R 6 gende versioner er udseendet, og brugerinterface'et   (R H~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     ( >   	       ver  & 1.20 TJ  ---Versions-nummer     @  Btekst  t >    \ >    |    filename \   ver  \   Btekst  t |    	 setupscr   _startother    inwindow  >         ~      whatnow ' t >    |   ,   whatnow  >       ex     b   whatnow  >      ! 8    whatnow  prosess  \ selprint \ ex       whatnow  >            v  (      setupscr       	 >    \ >  @ \ >   e \ >    \  
 >    \ >    \ >   d \ \  
 >    \ 6      
 >    \ 6   `  
 >    \ 6        4     6  
 \ 6   \ 6     \ 6    
 6  
  
4 TF T >          T TJ  ---Kun mus p den nye skrm      v       _startother    '  >    \ >    TJ &---Kontrol-panel(Incl. close gadget)    1' t >    \ >    | & PDCat Formatter v  ver  &   R t >    | & 	 1994 MLJ       dum 'l t >    |    <    a  >      >     < R   b  >      >     
 Btekst  t   a  \   b  |  F   b   F   a     R ---Til upstarten 0    & %Wellcome to this little program which     & $simply will convert an ASCII-file to    & a PDCat-file    &      & %Have you read the docs? (You should!)     & #Remember the special format for the     & ASCII-file!!    &    R ---Hvis CANCEL ved Load 1     &      & No input-file selected    &      & Processing aborted    &      &      &      &    R ---Hvis fejl ved Load 2     &    	  & ERROR!    &      & An error has occured    &      & Processing aborted    &      &    R ---Fil eksisterer ikke 3    &      & The selected file     & does not exist    &      & Processing aborted    &      &      &    R ---Processing file 4    &      & Processing file:    &    
  & filename    &      & Please wait     &      &    R ---Beskrivelse er for lang 5    &      & Description for disk nr.:     &      & is too long     &      & Processing aborted    &      &    R ---Hvis ingen '{}' fundet 6     &      & The '{}'-control code not found     &      & Can't convert this file     & to a .PDAbk-file    &      & Processing aborted    &    R "---Hvis ingen filename ved Save 7     &      & No output-file selected     &      & Processing aborted    &      &      &      &    R  ---Ulovligt output-fil-navn 8       &      & Illegal output-filename     & $(Output file has to end on '.PDAbk')    &      & Processing aborted    &      &      &    R  ---Status ved endt processing 9     &      & 
Statistics    & -----------     &    	  & File:     & Final lenght:     & Number of disks in it:    &    R ---Til SELPRINT 10    & Print orderform from disk     &      & Insert volume PDCat:    & #(Make sure there's only 1 disk with     & $this name, in your drives at a time)    &      & #Left mouse button or <RETURN>=print     & "Right mouse button or <ESC>=Cancel  R ---Hvis ESC ved print 11    &      & 
User abort    &      & Nothing printed     &      &      &      &    R $---Hvis ingen 'Ordered.disk'-fil 12     &      & No file with ordered disks    &      & Print aborted     &      &      &      &    R ---Hvis ingen PDCat: 13     &      & Volume PDCat: not available     &      & Select 'Print' to try again     &      &      &      &    R ---Vises efter print 14     &      & List printed    &      & "Select 'Print' to print a new list    &      &      &      &        v  `     fileload  
R ---Load file  !^ >   
 TJ ---Slet bank    * filenamex t & *.asc  \ &   \ & Load an ASCII file to process  \ &   |   J filename &     inwindow  >      ( >     <  v  BN t filename |  !
% >    \ filename TJ ---Find lngden p ASCII-filen  
)bH TJ ---Hvis filen existerer       a | t >    |   >     ,X    a  \ >   TJ <---Lg 409 til, s haves lngden p den bank som reserveres     %  >   
 \    a  TJ .---Reserver bank til pointere + beskrivelser    ,!@ t >   
 |L t >   
 | >    \ >     TJ "---Srg for en nul-byte til sidst   3 filename \@ t >   
 | >   TJ 6---Load tekst ind i plads 408 i bank 10 og fremefter        a  t filename \ & :  | TJ ---Find kolon   - filename filename( t filename \    a  | TJ ---Fjern pathname   + Btekst  t >    \ >    | filename TJ ---Load FILENAME$ ind i array   
 < TJ ---Ellers fejl!    inwindow  >      
   &  
 inwindow  >              v  |     filesave  
R ---Save file  L filenamex t & *.PDabk  \ filename \ & *Save as a PDCat-file (Has to end on PDabk) \ & ,Give it the name of the PD-serie it contains |    n filename &   TJ ---Hvis ingen file, s abort     inwindow  >      <  >         - 6 t filename \ >    |f & .PDabk TJ $---Hvis fil ikke ender p ".PDabk"     inwindow  >      <  >         D filename \ >   
      a  t filename \ & :  | TJ ---Find kolon   - filename filename( t filename \    a  | TJ ---Fjern pathname     >        v  	 *    prosess   (z >     	 fileload  " RL t >   
 | >     TJ "---Hvis ingen fil loaded, s exit   (  <      R ---Process file    inwindow  >        6    hvor >     TJ P---Pointer til adressen, hvor pointeren til nste diskbeskrivelse skal gemmes     .   descrip @ t >   
 | >   TJ .---Adressen p starten af teksten i bank 10     &   _end@ t >   
 |L t >   
 | TJ ---End-adressen p bank 10      P TJ ---Main loop    )   place ! t   descrip     _end \ & {} | TJ ---Sg efter '{}'          place  >     TJ ---Hvis ikke fundet, s exit    $
 r    hvor >     TJ (---Hvis der ikke findes en '{}' s fejl    inwindow  >      (  <  
  
b 
      &X   place  \@ t >   
 | TJ $---Find offset til diskbeskrivelsen   0    place    oldplace >  ' TJ .---Hvis beskrivelsen er over 10Kb s fejl!      8
 Btekst  t >    \ >    | Btekst  t >    \ >    | t    hvor | TJ ---Set disk med fejl i  
 inwindow  >      
<      -!@ t >   
 |    hvor \   place  >    TJ  ---Put pointer frst i bank 10         
 bankstart @ t >   
 | T  $ banklen L t >   
 |  B!  
 bankstart    place  \ >     T!  
 bankstart    place  >    \ >     TJ  ---Udskift '{}'med 2 nul-bytes    X    hvor \ >    TJ  ---Nste plads i pointer-bank       R ,---DESCRIP = nste plads efter sidste '{}'    -   oldplace   place  TJ 4---Gem place i oldplace for senere test af lngde       )\    hvor >   TJ 4---Indtil 100 disk er processed,eller enden er net     '    hvor    hvor >    TJ &---Find antallet af disk-beskrivelser   .!@ t >   
 | >   \    hvor TJ 0---Put antallet af disk p plads 404 i bank 10      R .---Hvis filename ender p .asc s fjern det.     v t6 t filename \ >    | | & .asc    filename filename6 t filename \ >    |      ) filename filename & .PDabk TJ ---St '.PDabk' efter filnavn     R ---Hop til filesave   	 filesave  ,  ) Btekst  t >   	 \ >    | Btekst  t >   	 \ >    | filename  / Btekst  t >   	 \ >    | Btekst  t >   	 \ >    | tL t >   
 | >    |  * Btekst  t >   	 \ >    | Btekst  t >   	 \ >    | t    hvor |   inwindow  >   	     !^ >   
 TJ ---Slet teksten   ( >         v  ~ $     selprint  (f   inwindow  >   
   P v      a  t  |     b 2  &\    a  >   L    a  >   L   b     L   b             a  >   L   b       @  Bnavn t >    | TJ ---Array til navn/adresse   @  Bdisk t >    | TJ ---Array til bestilte disks     N t & PDCat: |  
ZN t & PDCat:Ordered.Disk |   >    \ & PDCat:Ordered.Disk  < j    a  >      >    TJ ---Hent navn/adresse     >    \  Bnavn t    a  |  F    a      R 8---Hvis der er en bank med ordered disks, s load den     # >    \   pint TJ (---Hent antallet af disks i ordre-bank    <     a  >        pint >      >    \  a  TJ ---Hent titel fra disk    #  Bdisk t    a  |  a  TJ ---Put titlen i ordre-array   F    a    >     % N TJ ---ben printer      NR t >    |  < v    a  >      >    TJ   ---Skriv navn/adresse    N  Bnavn t    a  |R t >   
 |  F    a    NR t >   
 |    <,    a  >        pint >        a ( t  Bdisk t    a  |^ t >   ( | \ >   ( |  X    a  \ >      ~    a    pint  0  a   a ( t  Bdisk t    a  |^ t >   ( | \ >   ( | TJ  ---Send titler      N  a R t >    |  F    a  TJ  ---Flere titler?      N TJ ---Luk printer     inwindow  >      
 &   inwindow  >      
   V TJ *---Hvis PDCat: ikke findes, s meddelelse   
 inwindow  >         &   inwindow  >        (      v   2      ex  
 >    TJ ---Luk skrm        v       inwindow     nr    >     \ >    \ >     >  4 \ >   O  <    a  >      >     %   x  t >  ( t Btekst  t    nr \   a  | | | >     *J   x  >    \   a  >    >    \ Btekst  t    nr \   a  |  F   a         AmBs AmBk 	  Resource                          Kontrolpanel    JBB.set up gadget definitions 

WD 0,0,319,99,4VA,%01;
gr titellinien perfect
IN1,0,0;GL19,10,19,1;GL20,1,20,9;

OB 9,13,301,66,0,0,%0;

tegn close gadget
BUtton1,0,0,19,9,0,0,1;[CG BP;][BR0;BQ;]

andre gadgets
SV 1,'Process';
BUtton1,9,82,80,12,0,0,1;[DB 80,12,BP,1VA,BP 3*,%0;][BR0;]

SV 2,'Print';
BUtton2,120,82,80,12,0,0,1;[DB 80,12,BP,2VA,BP 3*,%0;][BR0;]

SV 3,'Exit';
BUtton3,230,82,80,12,0,0,1;[DB 80,12,BP,3VA,BP 3*,%0;][BR0;]

EXit;

x y bredde hjde titel bitmap
UI WinDow,6;[IN0,0,0;slet underGB P1,P2,P1 P3+,P2 P4+;
IN 3,0,0;title barGB P1,P2,P1 P3+,P2 10+;
blt i siderGB P1 1+,P2,P1 2+,P2 P4+;GB P1 P3+ 2-,P2,P1 P3+ 1-,P2 P4+;
IN 2,0,0;sort udenp GL P1 P3+,P2,P1 P3+,P2 P4+;GL XB,YB,P1,YB;
IN 1,0,0;hvidt udenpGL XB,YB,XB,P2;GL XB,YB,P1 P3+,YB;
hvidt indeniGL P1 P3+ 3-,P2 10+,P1 P3+ 3-,P2 P4+ 1-;GL XB,YB,P1 3+,YB;
IN 2,0,0;sort indeniGL XB,YB,XB,P2 10+;GL XB,YB,P1 P3+ 3-,YB;
IF P6 %10& %10=;[SliderBox P1 P3+ 18-,P2 10+,P4 10-;]
IF P6 %1& 1=;[PR P1 24+,P2 1+,P5,2;]
IF P6 %1& 0=;[PR P1 6+,P2 1+,P5,2;]]

UI CloseGadget,1;[IN3,0,0;GB 0,0,18,10;IN2,0,0;GS 7,3,11,7;
IN1 P1-,0,0;GB8,4,10,6;
IN 1 P1+,0,0;GL 1,0,1,10;GL XB 1-,YB,XB 1-,0;GL XB,YB,18,YB;
IN2 P1-,0,0;GL XB,10,XB,0;GL XB 1-,1,XB 1-,10;GL1,YB,XB,10;]

x y bredde hjde farve baggrundsfarve bitmap
hvis farve er nul s outbox hvis et s inbox
bitmap
bit et lig et s tegn baggrund
UI OutBox,7;[IF P7 %1& 1=;[INP6,0,0;GB P1,P2,P1 P3+,P2 P4+;]
IN 1 P5+,0,0;GL P1 1+,P2 P4+,P1 1+,P2;
GL P1,P2 P4+,P1,P2;GL XB,YB,P1 P3+,YB;
IN 2 P5-,0,0;GL XB,YB,XB,P2 P4+;GL XB 1-,P2 1+,XB 1-,YB;
GL XB,YB,P1 1+,YB;]

bredde hjde liniefarve text baggrundsfarve bitmap
kan kun kaldes fra en button draw rutine da xy altid er nul nul
UI DrawButton,6;[IN P5,0,0;GB 1,1,P1,P2;IN 1 P3+,0,0;
GL 1,P2 1-,1,0;GL 0,P2 1-,0,0;GL XB,YB,P1,YB;
IN 2 P3-,0,0;GL XB,YB,XB,P2;GL XB 1-,1,XB 1-,P2;GL XB,YB,1,YB;
IF P6 %1& 1=;[PO P4 CX 2+,3,P4,2,0 P3+;]
IF P6 %1& 0=;[PR P4 CX,3,P4,2;]]

 