48 lines
1.8 KiB
Text
48 lines
1.8 KiB
Text
|
%%HP: T(3)A(D)F(.);
|
||
|
C$ $
|
||
|
::
|
||
|
CK1NoBlame ( one argument, attribute errors correctly )
|
||
|
CK&DISPATCH1 ( one argument... )
|
||
|
THREE ( ...check if it's a string )
|
||
|
::
|
||
|
DUP ( duplicate string )
|
||
|
ELEVEN ( last character + 1 to pull out )
|
||
|
1_#1-SUB$ ( pull out string of first characters )
|
||
|
$ "%%HP:" ( test string )
|
||
|
ONE ( search from first position )
|
||
|
POS$ ( find position of test string )
|
||
|
DUP ( duplicate position )
|
||
|
#0=?SKIP ( if header doesn't exist, skip secondary )
|
||
|
::
|
||
|
#5+ ( skip "%%HP:" header )
|
||
|
LAST$ ( pull out the rest of the string on level three )
|
||
|
DUP ( duplicate string )
|
||
|
$ ";" ( substring to find )
|
||
|
ONE ( search from first position )
|
||
|
POS$ ( find position of substring )
|
||
|
2DUP ( duplicate string and position )
|
||
|
#1+ ( add one to bint...this is first char to take )
|
||
|
LAST$ ( pull out the rest of the string on level three )
|
||
|
UNROT ( 3 2 1 -> 1 3 2 )
|
||
|
1_#1-SUB$ ( take out the Kermit header at given position )
|
||
|
PTR 30477 ( set settings based on header [unsupported] )
|
||
|
;
|
||
|
DROP ( garbage...we don't need this )
|
||
|
KINVISLF ( translate, remove all CR's; we just need LF's )
|
||
|
DROP ( drop empty string )
|
||
|
palparse ( get object from string, returns true or false )
|
||
|
?SEMI ( if true skip to end of secondary... )
|
||
|
2DROP ( else drop two )
|
||
|
;
|
||
|
ZERO ( ...check if it's not a string [actually, anything] )
|
||
|
::
|
||
|
EDITDECOMP$ ( make into string )
|
||
|
KVISLF ( translations, add a CR to each LF for Windows/DOS )
|
||
|
$ "%%HP:" ( Kermit pre-header )
|
||
|
PTR 303AC ( retrieve current settings [unsupported] )
|
||
|
!append$ ( combine strings, use little memory )
|
||
|
$ ";\\r\\n" ( semicolon, CR, LF )
|
||
|
!append$SWAP ( combine strings, use little memory, swap )
|
||
|
!append$ ( combine strings, use little memory )
|
||
|
;
|
||
|
;
|