(C) 1998 AROS - The Amiga Research OS


NAME
#include <proto/dos.h>

BOOL AddPart (dirname , filename , size)

LOCATION
In DOSBase at offset 147

SYNOPSIS
STRPTR dirname
STRPTR filename
ULONG size

FUNCTION
AddPart() will add a file, directory or other path name to a directory path. It will take into account any pre-existing separator characters (':','/').

If filename is a fully qualified path, then it will replace the current value of dirname.

INPUTS
dirname
the path to add the new path to
filename
the path you wish added
size
The size of the dirname buffer, must NOT be 0

RESULT
non-zero if everything succeed, FALSE if the buffer would have overflowed.

If the buffer would have overflowed, then dirname will not have been changed.

EXAMPLE
UBYTE buffer[128];
buffer[0]='\0';
AddPart(buffer, "Work:", 80);
AddPart(buffer, "Programming/Include/exec");

FPuts(Output(), buffer);
--> Work:Programming/Include/exec

AddPart(buffer, "/graphics", 80);

FPuts(Output(), buffer);
--> Work:Programming/Include/graphics

AddPart(buffer, "gfxmacros.h", 80);
FPuts(Output(), buffer);
--> Work:Programming/Include/graphics/gfxmacros.h
SEE ALSO
FilePart(), PathPart()

NOTES

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
07.06.1998 srittau
Added possible memory corruption bug
15.09.1997 nlorentz
Adding support for leading /
24.02.1997 iaint
Some new DOS function, required by locale
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column