Hi Tobi, On Tue, Nov 04, 2008 at 10:59:04PM +0100, Tobias Oetiker wrote: > Today Sebastian Harl wrote: > > What I don't understand though is why '\\' is supposed to mark the > > beginning of the filename. Tobi, is that supposed to take care of > > Windows? In theory, '\\' may be used in filenames on Unix systems, so > > this might behave incorrectly then. Is there any reason why you don't > > use the basename(3) function instead? That's defined in POSIX.1-2001s > > an XSI extension), so it should not cause any problems. > > yes the \\ is for our backslashing windows friends ... just read > the basename manpage it sonds scary all the caveats ...
On Debian Sid the manpage talks about modifying its argument - is that what you meant? So, we'd probably have to enclose all calls to basename with strdup/free. > do you know who supports posix.1-2001 ? POSIX.1 is the core part of _the_ POSIX standard [1]. About any modern operating system (including Windows in some way) supports (part of) it. The Wikipedia page includes a more verbose list of POSIX compliant operating systems. > If this is widely adoped, it is certainly more elegant tha > implementing it ourselfs. I don't expect any (relevant) operating system to cause problems if we use dirname. Cheers, Sebastian [1] http://en.wikipedia.org/wiki/POSIX -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
signature.asc
Description: Digital signature
_______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
