uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit a3b87e021f63c23947bef19e45dc39c619e239df
parent 5dcf0a2b35d98ccba1a6782a1e7ac194e4b74544
Author: Andrew Alderwick <andrew@alderwick.co.uk>
Date:   Thu, 17 Mar 2022 17:08:03 +0000

Rename file_deo variables.

Diffstat:
Msrc/devices/file.c | 36++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/devices/file.c b/src/devices/file.c @@ -145,14 +145,14 @@ file_delete(void) void file_deo(Device *d, Uint8 port) { - Uint16 a, b, res; + Uint16 addr, len, res; switch(port) { case 0x5: - DEVPEEK16(a, 0x4); - DEVPEEK16(b, 0xa); - if(b > 0x10000 - a) - b = 0x10000 - a; - res = file_stat(&d->u->ram[a], b); + DEVPEEK16(addr, 0x4); + DEVPEEK16(len, 0xa); + if(len > 0x10000 - addr) + len = 0x10000 - addr; + res = file_stat(&d->u->ram[addr], len); DEVPOKE16(0x2, res); break; case 0x6: @@ -160,24 +160,24 @@ file_deo(Device *d, Uint8 port) DEVPOKE16(0x2, res); break; case 0x9: - DEVPEEK16(a, 0x8); - res = file_init(&d->u->ram[a]); + DEVPEEK16(addr, 0x8); + res = file_init(&d->u->ram[addr]); DEVPOKE16(0x2, res); break; case 0xd: - DEVPEEK16(a, 0xc); - DEVPEEK16(b, 0xa); - if(b > 0x10000 - a) - b = 0x10000 - a; - res = file_read(&d->u->ram[a], b); + DEVPEEK16(addr, 0xc); + DEVPEEK16(len, 0xa); + if(len > 0x10000 - addr) + len = 0x10000 - addr; + res = file_read(&d->u->ram[addr], len); DEVPOKE16(0x2, res); break; case 0xf: - DEVPEEK16(a, 0xe); - DEVPEEK16(b, 0xa); - if(b > 0x10000 - a) - b = 0x10000 - a; - res = file_write(&d->u->ram[a], b, d->dat[0x7]); + DEVPEEK16(addr, 0xe); + DEVPEEK16(len, 0xa); + if(len > 0x10000 - addr) + len = 0x10000 - addr; + res = file_write(&d->u->ram[addr], len, d->dat[0x7]); DEVPOKE16(0x2, res); break; }