2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: Return a pointer to after the directories in a path.
9 # include "dos_intern.h"
11 # define AROS_LH1(t,fn,a1,bt,bn,o,lib) t fn (a1)
12 # define AROS_LHA(t,n,r) t n
13 # define AROS_LIBFUNC_INIT
14 # define AROS_LIBFUNC_EXIT
15 # define CLIB_DOS_PROTOS_H
16 # include <exec/types.h>
19 /*****************************************************************************
22 #include <proto/dos.h>
24 AROS_LH1(STRPTR
, PathPart
,
27 AROS_LHA(CONST_STRPTR
, path
, D1
),
30 struct DosLibrary
*, DOSBase
, 146, Dos
)
33 Returns a pointer to the character after the last
34 directory in path (see examples).
37 path - Search this path.
40 A pointer to a character in path.
45 PathPart("xxx:yyy/zzz/qqq") would return a pointer to the last '/'.
46 PathPart("xxx:yyy") would return a pointer to the first 'y').
54 *****************************************************************************/
60 /* '/' at the beginning of the string really is part of the path */
90 int main (int argc
, char ** argv
)
98 fileptr
= PathPart(s
);
100 printf("Pfad: %s\nErg.: %s\n", s
, fileptr
);