2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: Set the name of the current directory.
8 #include <proto/exec.h>
11 #include <dos/dosextens.h>
12 #include "dos_intern.h"
14 /*****************************************************************************
17 #include <proto/dos.h>
19 AROS_LH1(BOOL
, SetCurrentDirName
,
22 AROS_LHA(CONST_STRPTR
, name
, D1
),
25 struct DosLibrary
*, DOSBase
, 93, Dos
)
28 Sets the name of the current directory in the CLI structure.
29 If the name doesn't fit the old name is kept and a failure
30 returned. If the current process doesn't have a CLI structure
31 this function does nothing.
34 name - Name for the current directory.
37 !=0 on success, 0 on failure.
44 Never copies more than 255 bytes.
51 *****************************************************************************/
55 struct CommandLineInterface
*cli
= NULL
;
60 if ((cli
= Cli()) == NULL
)
66 namelen
= s
- name
- 1;
71 bs
= AROS_BSTR_ADDR(cli
->cli_SetName
);
73 AROS_BSTR_setstrlen(cli
->cli_SetName
, namelen
);
74 CopyMem((APTR
)name
, bs
, namelen
);
78 } /* SetCurrentDirName */