2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
5 Desc: Sets the prompt for the current CLI.
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
, SetPrompt
,
22 AROS_LHA(CONST_STRPTR
, name
, D1
),
25 struct DosLibrary
*, DOSBase
, 97, Dos
)
28 Sets the prompt in the current CLI structure. If the name doesn't
29 fit the old name is kept and a failure is returned. If the current
30 process doesn't have a CLI structure this function does nothing.
33 name - The prompt to be set.
36 !=0 on success, 0 on failure.
43 Never copies more than 255 bytes.
50 *****************************************************************************/
53 struct CommandLineInterface
*cli
= NULL
;
58 if ((cli
= Cli()) == NULL
)
64 namelen
= s
- name
- 1;
69 bs
= AROS_BSTR_ADDR(cli
->cli_Prompt
);
71 AROS_BSTR_setstrlen(cli
->cli_Prompt
, namelen
);
72 CopyMem((APTR
)name
, bs
, namelen
);