configurable input line prompt character

This commit is contained in:
nino-porcino 2022-02-15 17:44:37 +01:00
parent bc1e99fccd
commit 46a0824ddc
1 changed files with 5 additions and 3 deletions

View File

@ -116,12 +116,14 @@ void apple1_input_line(byte *buffer, byte max) {
buffer[x]=0;
}
const byte prompt_char = ']';
#ifndef INPUT_LINE_PROMPT_CHAR
#define INPUT_LINE_PROMPT_CHAR '>'
#endif
void apple1_input_line_prompt(byte *buffer, byte max) {
byte x=0;
woz_putc(prompt_char);
woz_putc(INPUT_LINE_PROMPT_CHAR);
while(1) {
byte c = apple1_getkey();
@ -141,7 +143,7 @@ void apple1_input_line_prompt(byte *buffer, byte max) {
x--;
buffer[x] = 0;
woz_putc('\r');
woz_putc(prompt_char);
woz_putc(INPUT_LINE_PROMPT_CHAR);
woz_puts(buffer);
}
}