LFNs
From
ignatius@VERT/CYBERIA to
All on Sun Jan 25 10:20:00 2015
Hi,
I'm trying to implement long file names into Impulse BBS that I ported to Linux. I'm having trouble with a specific function, however. I need it to accept filenames that are longer (in this case, 25 characters) or equal to 8 characters. Right now, it's set to 25 characters (+3 for the extension). _If_ someone could lend a hand or give me advice on it, i'd really appreciate it. Thanks for any and all help, and your time. Here's the function:
-----snip-----------------------------------------------
function align(fn:astr):astr;
var f,e:astr;
c,c1:integer;
begin
c:=pos('.',fn);
if (c=0) then begin
f:=fn;
e:=' ';
end
else begin
f:=copy(fn,1,c-1);
e:=copy(fn,c+1,3);
end;
f:=mln(f,25);
e:=mln(e,3);
c:=pos('*',f); if (c<>0) then for c1:=c to 25 do f[c1]:='?';
c:=pos('*',e); if (c<>0) then for c1:=c to 3 do e[c1]:='?';
c:=pos(' ',f); if (c<>0) then for c1:=c to 25 do f[c1]:=' ';
c:=pos(' ',e); if (c<>0) then for c1:=c to 3 do e[c1]:=' ';
align:=f+'.'+e;
end;
-----snip----------------------------------------------------------
-ignatius
--- Mystic BBS v1.10 A59 (Linux)
* Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX