From ed1a7b32781fe2f88d7a3d45f56806e9c5bacd60 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Fri, 15 Dec 2017 21:03:38 -0600 Subject: [PATCH] Rename to read/write (without byte) --- include/apple2.dd.h | 4 ++-- src/apple2.dd.c | 4 ++-- tests/apple2.dd.c | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/apple2.dd.h b/include/apple2.dd.h index 0c3805e..50ce8bd 100644 --- a/include/apple2.dd.h +++ b/include/apple2.dd.h @@ -111,7 +111,7 @@ extern int apple2dd_position(apple2dd *); extern void apple2dd_eject(apple2dd *); extern int apple2dd_insert(apple2dd *, FILE *); extern void apple2dd_shift(apple2dd *, int); -extern vm_8bit apple2dd_read_byte(apple2dd *); -extern void apple2dd_write_byte(apple2dd *, vm_8bit); +extern vm_8bit apple2dd_read(apple2dd *); +extern void apple2dd_write(apple2dd *, vm_8bit); #endif diff --git a/src/apple2.dd.c b/src/apple2.dd.c index 69b1981..5b2cf80 100644 --- a/src/apple2.dd.c +++ b/src/apple2.dd.c @@ -151,7 +151,7 @@ apple2dd_shift(apple2dd *drive, int pos) } vm_8bit -apple2dd_read_byte(apple2dd *drive) +apple2dd_read(apple2dd *drive) { vm_8bit byte = vm_segment_get(drive->data, apple2dd_position(drive)); apple2dd_shift(drive, 1); @@ -160,7 +160,7 @@ apple2dd_read_byte(apple2dd *drive) } void -apple2dd_write_byte(apple2dd *drive, vm_8bit byte) +apple2dd_write(apple2dd *drive, vm_8bit byte) { vm_segment_set(drive->data, apple2dd_position(drive), byte); apple2dd_shift(drive, 1); diff --git a/tests/apple2.dd.c b/tests/apple2.dd.c index 4252eeb..4c898da 100644 --- a/tests/apple2.dd.c +++ b/tests/apple2.dd.c @@ -134,31 +134,31 @@ Test(apple2dd, shift) cr_assert_eq(drive->sector_pos, 7); } -Test(apple2dd, read_byte) +Test(apple2dd, read) { drive->data = vm_segment_create(_140K_); vm_segment_set(drive->data, 0, 123); vm_segment_set(drive->data, 1, 234); - cr_assert_eq(apple2dd_read_byte(drive), 123); + cr_assert_eq(apple2dd_read(drive), 123); cr_assert_eq(drive->track_pos, 0); cr_assert_eq(drive->sector_pos, 1); - cr_assert_eq(apple2dd_read_byte(drive), 234); + cr_assert_eq(apple2dd_read(drive), 234); cr_assert_eq(drive->track_pos, 0); cr_assert_eq(drive->sector_pos, 2); } -Test(apple2dd, write_byte) +Test(apple2dd, write) { drive->data = vm_segment_create(_140K_); - apple2dd_write_byte(drive, 123); + apple2dd_write(drive, 123); cr_assert_eq(vm_segment_get(drive->data, 0), 123); cr_assert_eq(drive->track_pos, 0); cr_assert_eq(drive->sector_pos, 1); - apple2dd_write_byte(drive, 234); + apple2dd_write(drive, 234); cr_assert_eq(vm_segment_get(drive->data, 1), 234); cr_assert_eq(drive->track_pos, 0); cr_assert_eq(drive->sector_pos, 2);