Skip to content

Commit

Permalink
#23: optimized open/close on channel 15
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco_Sblendorio committed Feb 3, 2019
1 parent 227385d commit 72cb827
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ultimateterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ void save_phonebook(void) {
cbm_write(2, pb_bytes, strlen(pb_bytes));
cbm_close(2);
}
cbm_open(15, dev, 15, "");
cbm_read(15, pb_bytes, PB_SIZE);
if(cbm_open(15, dev, 15, "")) cbm_read(15, pb_bytes, PB_SIZE);
cbm_close(15);

display_phonebook();
Expand Down Expand Up @@ -333,8 +332,7 @@ void load_phonebook(void) {
strcpy(phonebook[8], "bbs.retroacademy.it 6510");
phonebookctr = 8;
if(dev >= 8) {
cbm_open(15, dev, 15, "");
cbm_read(15, pb_bytes, PB_SIZE);
if(!cbm_open(15, dev, 15, "")) cbm_read(15, pb_bytes, PB_SIZE);
cbm_close(15);
}
} else {
Expand Down
Binary file modified target/UltimateTerm-and-demos.d64
Binary file not shown.
Binary file modified target/u-term128.prg
Binary file not shown.
Binary file modified target/u-term64.prg
Binary file not shown.

0 comments on commit 72cb827

Please sign in to comment.