2 Copyright (C) 1995-2011, The AROS Development Team. All rights reserved.
12 void cliPrompt(ShellState
*ss
)
14 struct CommandLineInterface
*cli
= Cli();
15 BSTR prompt
= cli
->cli_Prompt
;
16 LONG length
= AROS_BSTR_strlen(prompt
);
17 BPTR output
= Output();
20 if (cli
->cli_Background
)
23 for (i
= 0; i
< length
; i
++)
25 if (AROS_BSTR_getchar(prompt
, i
) == '%')
30 switch (AROS_BSTR_getchar(prompt
, i
))
33 Printf("%ld", ss
->cliNumber
);
36 Printf("%ld", cli
->cli_ReturnCode
);
39 FPuts(output
, AROS_BSTR_ADDR(cli
->cli_SetName
));
43 FPutC(output
, AROS_BSTR_getchar(prompt
, i
));
48 FPutC(output
, AROS_BSTR_getchar(prompt
, i
));