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

39 views
Skip to first unread message

Ralf Kiefer

unread,
Sep 17, 2018, 5:56:07 PM9/17/18
to
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

kaosengr

unread,
Sep 20, 2018, 8:06:07 AM9/20/18
to
String buffer storage space for full pathnames should be dynamically allocated.

I believe the MAXPATHLEN is 1024 bytes.

--
Kaos Engineer
kaos...@gmail.com

Ralf Kiefer

unread,
Sep 25, 2018, 10:38:49 AM9/25/18
to
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
Reply all
Reply to author
Forward
0 new messages