mirror of
https://github.com/nippur72/apple1-videocard-lib.git
synced 2024-06-13 01:29:29 +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;
|
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) {
|
void apple1_input_line_prompt(byte *buffer, byte max) {
|
||||||
byte x=0;
|
byte x=0;
|
||||||
|
|
||||||
woz_putc(prompt_char);
|
woz_putc(INPUT_LINE_PROMPT_CHAR);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
byte c = apple1_getkey();
|
byte c = apple1_getkey();
|
||||||
|
@ -141,7 +143,7 @@ void apple1_input_line_prompt(byte *buffer, byte max) {
|
||||||
x--;
|
x--;
|
||||||
buffer[x] = 0;
|
buffer[x] = 0;
|
||||||
woz_putc('\r');
|
woz_putc('\r');
|
||||||
woz_putc(prompt_char);
|
woz_putc(INPUT_LINE_PROMPT_CHAR);
|
||||||
woz_puts(buffer);
|
woz_puts(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user