2 Copyright © 1995-2001, 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_LIBBASE_EXT_DECL(bt,bn)
15 # define AROS_LIBFUNC_EXIT
16 # define CLIB_DOS_PROTOS_H
17 # include <exec/types.h>
20 /*****************************************************************************
23 #include <proto/dos.h>
25 AROS_LH1(STRPTR
, PathPart
,
28 AROS_LHA(CONST_STRPTR
, path
, D1
),
31 struct DosLibrary
*, DOSBase
, 146, Dos
)
34 Returns a pointer to the character after the last
35 directory in path (see examples).
38 path - Search this path.
41 A pointer to a character in path.
46 PathPart("xxx:yyy/zzz/qqq") would return a pointer to the last '/'.
47 PathPart("xxx:yyy") would return a pointer to the first 'y').
55 *****************************************************************************/
58 AROS_LIBBASE_EXT_DECL(struct DosLibrary
*,DOSBase
)
62 /* '/' at the begining of the string really is part of the path */
92 int main (int argc
, char ** argv
)
100 fileptr
= PathPart(s
);
102 printf("Pfad: %s\nErg.: %s\n", s
, fileptr
);