EDIT: Updated help to have two pages

This commit is contained in:
Bobbi Webber-Manners 2020-08-13 23:21:42 -04:00
parent 335249fa63
commit f535a16957
4 changed files with 57 additions and 19 deletions

View File

@ -140,7 +140,8 @@ ip65.dsk: bin
java -jar $(AC) -as $@ date65 < date65.bin java -jar $(AC) -as $@ date65 < date65.bin
java -jar $(AC) -p $@ date65.system sys < $(CC65)/apple2enh/util/loader.system java -jar $(AC) -p $@ date65.system sys < $(CC65)/apple2enh/util/loader.system
java -jar $(AC) -as $@ edit < edit.bin java -jar $(AC) -as $@ edit < edit.bin
java -jar $(AC) -p $@ edithelp.txt txt < edithelp.txt java -jar $(AC) -p $@ edithelp1.txt txt < edithelp1.txt
java -jar $(AC) -p $@ edithelp2.txt txt < edithelp2.txt
java -jar $(AC) -p $@ edit.system sys < $(CC65)/apple2enh/util/loader.system java -jar $(AC) -p $@ edit.system sys < $(CC65)/apple2enh/util/loader.system
java -jar $(AC) -as $@ email < email.bin java -jar $(AC) -as $@ email < email.bin
java -jar $(AC) -p $@ email.cfg txt < email.cfg java -jar $(AC) -p $@ email.cfg txt < email.cfg

View File

@ -425,7 +425,7 @@ void goto_prompt_row(void) {
*/ */
void update_status_line(void) { void update_status_line(void) {
uint8_t nofile = 0; uint8_t nofile = 0;
uint8_t i, l; uint8_t l;
static char selmsg1[] = ": Go to end of selection, then [Return]"; static char selmsg1[] = ": Go to end of selection, then [Return]";
static char selmsg2[] = ": Go to target, then [Return] to "; static char selmsg2[] = ": Go to target, then [Return] to ";
@ -479,8 +479,6 @@ void update_status_line(void) {
break; break;
} }
cclear(l); cclear(l);
// for (i = 0; i < l; ++i)
// cputc(' ');
revers(0); revers(0);
if (nofile) if (nofile)
@ -756,7 +754,6 @@ void spinner(uint32_t sz, uint8_t saving) {
static char chars[] = "|/-\\"; static char chars[] = "|/-\\";
static char buf[20] = ""; static char buf[20] = "";
static uint8_t i = 0; static uint8_t i = 0;
uint8_t j;
gotoxy(0, PROMPT_ROW); gotoxy(0, PROMPT_ROW);
sprintf(buf, "%s %c [%lu]", sprintf(buf, "%s %c [%lu]",
(saving ? "Saving" : "Loading"), chars[(i++) % 4], sz); (saving ? "Saving" : "Loading"), chars[(i++) % 4], sz);
@ -1543,8 +1540,8 @@ void word_wrap_para(uint8_t addbreaks) {
* Help screen * Help screen
* EDITHELP.TXT is expected to contain lines of exactly 80 chars * EDITHELP.TXT is expected to contain lines of exactly 80 chars
*/ */
void help(void) { void help(uint8_t num) {
FILE *fp = fopen("EDITHELP.TXT", "rb"); FILE *fp;
char *p; char *p;
char c; char c;
uint16_t i, s; uint16_t i, s;
@ -1552,8 +1549,10 @@ void help(void) {
revers(0); revers(0);
cursor(0); cursor(0);
clrscr(); clrscr();
sprintf(iobuf, "EDITHELP%u.TXT", num);
fp = fopen(iobuf, "rb");
if (!fp) { if (!fp) {
printf("Can't open EDITHELP.TXT\n\n"); printf("Can't open help file\n\n");
goto done; goto done;
} }
#ifdef AUXMEM #ifdef AUXMEM
@ -1581,8 +1580,6 @@ void help(void) {
} while (cont); } while (cont);
done: done:
fclose(fp); fclose(fp);
cgetc();
clrscr();
} }
/* /*
@ -2166,7 +2163,23 @@ int edit(char *fname) {
} }
break; break;
case 0x80 + '?': // OA-? "Help" case 0x80 + '?': // OA-? "Help"
help(); help1:
help(1);
c = cgetc();
switch (c) {
case 'q':
case 'Q':
goto donehelp;
}
help(2);
c = cgetc();
switch (c) {
case 0x0b: // Up
case 'p':
case 'P':
goto help1;
}
donehelp:
draw_screen(); draw_screen();
break; break;
case 0x0c: // Ctrl-L "REFRESH" case 0x0c: // Ctrl-L "REFRESH"

View File

@ -1,3 +1,6 @@
--------------------------------------------------------------------------------
v1.10 }}} EDIT.SYSTEM HELP }}} Page One
--------------------------------------+-----------------------------------------
Navigation: | Editing: Navigation: | Editing:
Cursor keys Move the cursor | [Return] Split line Cursor keys Move the cursor | [Return] Split line
{-Up Page up | [Delete] Delete char left {-Up Page up | [Delete] Delete char left
@ -13,12 +16,9 @@ File Management Commands | {-[Space] Mark start/end of selection
{-I Insert file at cursor | {-X Cut selected text {-I Insert file at cursor | {-X Cut selected text
{-L Load file | {-C Copy selected text {-L Load file | {-C Copy selected text
{-N Set file name to save | {-P Paste previous cut or copy {-N Set file name to save | {-P Paste previous cut or copy
{-Q Quit | [Delete] Delete selected text {-S Save file | [Delete] Delete selected text
{-S Save file | ESC Clear selection {-A Save all unsaved files | ESC Clear selection
|
--------------------------------------+----------------------------------------- --------------------------------------+-----------------------------------------
Buffer Management: | Paragraph Formatting: [Q]uit help | [Any Other Key] Next Page
}-1 ... Jump to buffer 1 ... | {-W Word-wrap paragrap --------------------------------------+----------------------------------------
}-9 through buffer 9 | {-U Unwrap paragraph
}-B Select any buffer 1-128 +-----------------------------------------
--------------------------------------+ {-? This help
EDIT.SYSTEM v1.02 | Ctrl-L Refresh screen

24
apps/edithelp2.txt Normal file
View File

@ -0,0 +1,24 @@
--------------------------------------------------------------------------------
v1.10 }}} EDIT.SYSTEM HELP }}} Page Two
--------------------------------------------------------------------------------
On a 128KB Apple //e (or GS), the editor uses the auxiliary memory as a 46KB
editor buffer. If RamWorks-style extended aux memory is available, this is
used to store multiple editor buffers of 46KB each. These buffers may be used
to edit up to 128 files (with an 8MB RamWorks). A set of consecutive
buffers may be used in order to allow files larger than 46KB to be edited.
---------------------------------------+----------------------------------------
Buffer Management:
}-1 ... Quick jump to buffer 1 ...
}-9 ... through buffer 9
}-B Select any buffer from 1-128 (subject to installed memory)
}-L Buffer list
}-T Truncate file here, freeing any subsequent buffers
}-E Extend file by appending a new buffer
---------------------------------------+----------------------------------------
Paragraph Formatting | Miscellaneous:
{-W Word-wrap paragraph | {-? The help
{-U Unwrap paragraph | [CTRL]-L Refresh screen
| {-Q Quit
---------------------------------------+----------------------------------------
[Cursor Up] Previous Page | [Q]uit
---------------------------------------+---------------------------------------