mirror of
https://github.com/bobbimanners/emailler.git
synced 2025-08-09 05:24:58 +00:00
EDIT: Changed OA-L to OA-O 'Open'. More 128KB fixes.
This commit is contained in:
20
apps/edit.c
20
apps/edit.c
@@ -743,8 +743,11 @@ void change_aux_bank(uint8_t logbank) {
|
|||||||
uint8_t open_new_aux_bank(uint8_t partnum) {
|
uint8_t open_new_aux_bank(uint8_t partnum) {
|
||||||
strcpy(userentry, filename);
|
strcpy(userentry, filename);
|
||||||
status[2] = partnum;
|
status[2] = partnum;
|
||||||
|
if (l_auxbank >= banktbl[0])
|
||||||
|
return 1;
|
||||||
change_aux_bank(++l_auxbank);
|
change_aux_bank(++l_auxbank);
|
||||||
if (DATASIZE() > 0) {
|
if (DATASIZE() > 0) {
|
||||||
|
change_aux_bank(--l_auxbank);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
strcpy(filename, userentry);
|
strcpy(filename, userentry);
|
||||||
@@ -819,12 +822,15 @@ uint8_t load_file(char *fname, uint8_t replace) {
|
|||||||
set_gapbuf(gapbegin++, '\r');
|
set_gapbuf(gapbegin++, '\r');
|
||||||
col = 0;
|
col = 0;
|
||||||
#ifdef AUXMEM
|
#ifdef AUXMEM
|
||||||
if (replace && (FREESPACE() < 15000)) {
|
if (replace && (FREESPACE() < 15000) && (banktbl[0] > 1)) {
|
||||||
draw_screen();
|
draw_screen();
|
||||||
if (open_new_aux_bank(++partctr) == 1) {
|
if (open_new_aux_bank(++partctr) == 1) {
|
||||||
sprintf(userentry,
|
sprintf(userentry,
|
||||||
"Buffer [%03u] is used. Truncating file.", l_auxbank);
|
"Buffer [%03u] not avail. Truncating file.", l_auxbank + 1);
|
||||||
show_error(userentry);
|
show_error(userentry);
|
||||||
|
if (partctr == 1) // If truncated to one part ...
|
||||||
|
status[2] = 0; // Make it a singleton
|
||||||
|
partctr = 0; // Prevent status[2] increment below
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2095,11 +2101,11 @@ int edit(char *fname) {
|
|||||||
show_error("Can't open");
|
show_error("Can't open");
|
||||||
draw_screen();
|
draw_screen();
|
||||||
break;
|
break;
|
||||||
case 0x80 + 'L': // OA-L "Load"
|
case 0x80 + 'O': // OA-O "Open"
|
||||||
case 0x80 + 'l':
|
case 0x80 + 'o':
|
||||||
if (status[0])
|
if (status[0])
|
||||||
save();
|
save();
|
||||||
if (prompt_for_name("File to load", 1) == 255)
|
if (prompt_for_name("File to open", 1) == 255)
|
||||||
break; // ESC pressed
|
break; // ESC pressed
|
||||||
if (strlen(userentry) == 0)
|
if (strlen(userentry) == 0)
|
||||||
break;
|
break;
|
||||||
@@ -2111,7 +2117,7 @@ int edit(char *fname) {
|
|||||||
gapend = BUFSZ - 1;
|
gapend = BUFSZ - 1;
|
||||||
strcpy(filename, userentry);
|
strcpy(filename, userentry);
|
||||||
if (load_file(filename, 1)) {
|
if (load_file(filename, 1)) {
|
||||||
sprintf(userentry, "Can't load '%s'", filename);
|
sprintf(userentry, "Can't open '%s'", filename);
|
||||||
show_error(userentry);
|
show_error(userentry);
|
||||||
strcpy(filename, "");
|
strcpy(filename, "");
|
||||||
}
|
}
|
||||||
@@ -2275,7 +2281,7 @@ donehelp:
|
|||||||
i = 1;
|
i = 1;
|
||||||
if (open_new_aux_bank(i) == 1) {
|
if (open_new_aux_bank(i) == 1) {
|
||||||
sprintf(userentry,
|
sprintf(userentry,
|
||||||
"Buffer [%03u] is used. Can't extend.", l_auxbank);
|
"Buffer [%03u] not avail. Can't extend.", l_auxbank + 1);
|
||||||
show_error(userentry);
|
show_error(userentry);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
--------------------------------------+ Block Commands:
|
--------------------------------------+ Block Commands:
|
||||||
File Management Commands: | {-[Space] Mark start/end of selection
|
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
|
{-O Open 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
|
||||||
{-S Save file | [Delete] Delete selected text
|
{-S Save file | [Delete] Delete selected text
|
||||||
{-A Save all unsaved files | ESC Clear selection
|
{-A Save all unsaved files | ESC Clear selection
|
||||||
|
Reference in New Issue
Block a user