DEFINITION MODULE aprsstr (* string lib by oe5dxl *);

TYPE TIME=CARDINAL;
     IPNUM=CARDINAL;
     UDPPORT=CARDINAL;
     SET8=SET OF [0..7];
     GHOSTSET=SET OF [0..256];
     POSITION=RECORD
                long,
                lat:REAL;
              END;

CONST CALLLEN=7;
      HBIT=128;

VAR showctrl:BOOLEAN;

PROCEDURE Assign(VAR a:ARRAY OF CHAR; b:ARRAY OF CHAR);
PROCEDURE Append(VAR a:ARRAY OF CHAR; b:ARRAY OF CHAR);
PROCEDURE Delstr(VAR a:ARRAY OF CHAR; from, len:CARDINAL);
PROCEDURE Extractword(VAR from, word:ARRAY OF CHAR);
PROCEDURE Length(a:ARRAY OF CHAR):CARDINAL;
PROCEDURE IntToStr(x:INTEGER; f:CARDINAL; VAR s:ARRAY OF CHAR);
PROCEDURE CardToStr(x, f:CARDINAL; VAR s:ARRAY OF CHAR);
PROCEDURE FixToStr(x:REAL; f:CARDINAL; VAR s:ARRAY OF CHAR);
PROCEDURE StrToCard(s: ARRAY OF CHAR; VAR x:CARDINAL): BOOLEAN;
PROCEDURE StrToInt(s: ARRAY OF CHAR; VAR x:INTEGER): BOOLEAN;
PROCEDURE StrToFix(VAR x:REAL; s:ARRAY OF CHAR):BOOLEAN;
PROCEDURE StrCmp(a,b:ARRAY OF CHAR):BOOLEAN;
PROCEDURE InStr(a,b:ARRAY OF CHAR):INTEGER;
PROCEDURE TimeToStr(t:TIME; VAR s:ARRAY OF CHAR);
PROCEDURE DateToStr(time:CARDINAL; VAR tstr:ARRAY OF CHAR);
PROCEDURE StrToTime(s:ARRAY OF CHAR; VAR time:CARDINAL):BOOLEAN;
PROCEDURE CtrlHex(VAR s:ARRAY OF CHAR);
PROCEDURE GetIp2(h:ARRAY OF CHAR; VAR ip:IPNUM; VAR dp, lp:UDPPORT; VAR check:BOOLEAN):INTEGER;
PROCEDURE ipv4tostr(ip:CARDINAL; VAR s:ARRAY OF CHAR);
PROCEDURE Call2Str(r:ARRAY OF CHAR; VAR t:ARRAY OF CHAR; pos:CARDINAL; VAR len:CARDINAL):BOOLEAN;
PROCEDURE mon2raw(mon:ARRAY OF CHAR; VAR raw:ARRAY OF CHAR; VAR p:INTEGER);
PROCEDURE raw2mon(VAR raw, mon:ARRAY OF CHAR; len:CARDINAL; VAR p:CARDINAL; ghostset:GHOSTSET);
PROCEDURE extrudp2(VAR ib:ARRAY OF CHAR; VAR ud:ARRAY OF CHAR; VAR len:INTEGER);
PROCEDURE AppCRC(VAR frame:ARRAY OF CHAR; size:INTEGER);
PROCEDURE HashCh(c:CHAR; VAR hashl, hashh:SET8);
PROCEDURE Hash(frame:ARRAY OF CHAR; start, end:INTEGER):CARDINAL;
PROCEDURE cleanfilename(VAR s:ARRAY OF CHAR);
PROCEDURE Caps(VAR s:ARRAY OF CHAR);
PROCEDURE rightbound(VAR s:ARRAY OF CHAR; p:CARDINAL);
PROCEDURE loctopos(VAR pos:POSITION; loc:ARRAY OF CHAR);
PROCEDURE postoloc(VAR loc:ARRAY OF CHAR; pos:POSITION);
PROCEDURE posinval(VAR pos:POSITION);

END aprsstr.
