mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2025-01-16 09:30:05 +00:00
configurable input line prompt character
This commit is contained in:
parent
bc1e99fccd
commit
46a0824ddc
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user