• Programming C on V2.4.5 and V3.0.3: Pathnames

    From Ralf Kiefer@21:1/5 to All on Mon Sep 17 23:56:02 2018
    Hi,

    is there anybody left? :-)

    Actually I'm restoring old software and writing some new. But there is
    one question left which I cannot remember after the years since my busy
    phase of programming OS-9 and C and Ultra-C:
    How long should I declare a string containing a full pathname for file handling? Best to mention here: this path may be a path over NFM in my
    OS-9/NET (in the future with OS-9/NET-Bridges like /n0/apollo/n1/neptune/dd/CMDS/BOOTOBJS/...).

    Regards
    Ralf

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kaosengr@21:1/5 to Ralf Kiefer on Thu Sep 20 05:06:06 2018
    On Monday, September 17, 2018 at 4:56:07 PM UTC-5, Ralf Kiefer wrote:
    Hi,

    is there anybody left? :-)

    Actually I'm restoring old software and writing some new. But there is
    one question left which I cannot remember after the years since my busy
    phase of programming OS-9 and C and Ultra-C:
    How long should I declare a string containing a full pathname for file handling? Best to mention here: this path may be a path over NFM in my OS-9/NET (in the future with OS-9/NET-Bridges like /n0/apollo/n1/neptune/dd/CMDS/BOOTOBJS/...).

    Regards
    Ralf

    String buffer storage space for full pathnames should be dynamically allocated.

    I believe the MAXPATHLEN is 1024 bytes.

    --
    Kaos Engineer
    kaos.engr@gmail.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Kiefer@21:1/5 to kaosengr on Tue Sep 25 16:38:47 2018
    kaosengr wrote:

    String buffer storage space for full pathnames should be dynamically allocated.

    I think there is no difference between dynamically allocation
    (_os_srqmem()) and static. Buffer overflow must be inhibited.


    I believe the MAXPATHLEN is 1024 bytes.

    Ok, a lot of bytes ...

    Regards
    Ralf

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)