• LFNs

    From ignatius@VERT/CYBERIA to All on Sun Jan 25 07: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
  • From wkitty42@VERT/CYBERIA to ignatius on Sun Jan 25 16:56:00 2015
    On 01/25/15, ignatius said the following...

    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:

    what is the purpose of this function? apparently it is aligning filenames but aligning them to what?

    --- Mystic BBS v1.10 A59 (Linux)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX
  • From ignatius@VERT/CYBERIA to wkitty42 on Mon Jan 26 09:49:00 2015
    what is the purpose of this function? apparently it is aligning
    filenames but aligning them to what?


    I believe it's aligning them to an array.

    --- Mystic BBS v1.10 A59 (Linux)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX
  • From ignatius@VERT/CYBERIA to ignatius on Tue Feb 3 01:01:00 2015
    I believe it's aligning them to an array.


    Um, no. It's aligning the first 8 characters of the filename with the last 3 characters and putting them up for display in the filelist.

    -ig

    --- Mystic BBS v1.10 A61 (Linux)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX