home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
modem
/
hs_gap63.zip
/
FLISTCNV.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-07
|
1KB
|
57 lines
function trimit (ln: string): string;
var
i: integer;
begin
for i := 1 to length(ln) do
if ln[i]= #0 then
ln[i]:= ' ';
while ln[length(ln)] = ' ' do
dec(ln[0]);
while copy(ln,1,1) = ' ' do
delete(ln,1,1);
trimit := ln;
end;
type
{this matches the format of the filelst.dwn file produced by gap}
thefile = record
fname: array[1..12] of char;
junk1: char;
junk2: char;
dir: array[1..25] of char;
junk3: array[1..27] of char;
end;
var
i: integer;
cnv: thefile;
fd1: file of thefile;
fd2: text;
begin
assign(fd1, 'filelst.dwn');
reset(fd1);
assign(fd2, 'filelist');
rewrite(fd2);
for i := 1 to filesize (fd1) do
begin
read(fd1, cnv);
{writeln('[',cnv.dir,'] [', cnv.fname,']');}
writeln(fd2, trimit (cnv.dir), '\', trimit (cnv.fname));
end;
close(fd2);
close(fd1);
end.