PRO uncompre,compressed_file_name,rm=rm ; This routine derives the appropriate name of the uncompressed ; data file from the name of the compressed file, and uncompresses ; the KI-produced file, storing it under the appropriate name. ; ; Once I'm sure everything is going properly, the routine will ; delete the compressed file after uncompressing it. cpfn=STRTRIM(compressed_file_name,2) fc=STRLOWCASE(STRMID(cpfn,STRLEN(cpfn)-12,1)) bfc=BYTE(fc) bc=bfc(0) ; Is the first character of the file name between 'n' and 't'? IF (110B LE bc) AND (bc LE 116B) THEN BEGIN ucfn=cpfn STRPUT,ucfn,STRING(bc-13B),STRLEN(ucfn)-12 cmd='c:\datacomp\lz78exp '+cpfn+' '+ucfn SPAWN,cmd IF KEYWORD_SET(rm) THEN BEGIN cmd='del '+cpfn SPAWN,cmd ENDIF ENDIF ELSE BEGIN MESSAGE,'Bad file name : '+cpfn MESSAGE,'Uncompression not attempted' ENDELSE END