From: Christian Groessler Date: Tue, 14 Jun 2016 18:44:57 +0000 (+0200) Subject: Some improvements to Atari exec() after review. X-Git-Tag: V2.16~106^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F310%2Fhead;p=cc65 Some improvements to Atari exec() after review. --- diff --git a/libsrc/atari/exec.s b/libsrc/atari/exec.s index 2835a2206..4ae30fdbf 100644 --- a/libsrc/atari/exec.s +++ b/libsrc/atari/exec.s @@ -33,10 +33,8 @@ notsupp:lda #ENOSYS ; "unsupported system call" .byte $2C ; bit opcode, eats the next 2 bytes noiocb: lda #EMFILE ; "too many open files" jsr incsp2 ; clean up stack -seterr: jsr __directerrno - lda #$FF - tax - rts ; return -1 +seterr: jmp __directerrno + ; entry point diff --git a/testcode/lib/tinyshell.c b/testcode/lib/tinyshell.c index b5654983e..c83bd14e8 100644 --- a/testcode/lib/tinyshell.c +++ b/testcode/lib/tinyshell.c @@ -356,7 +356,6 @@ static void cmd_rename(void) static void cmd_exec(void) { - int st; unsigned char *progname, *arguments; progname = strtok(args, " \t\n"); @@ -367,7 +366,7 @@ static void cmd_exec(void) arguments = strtok(NULL, ""); /*printf("exec: %s %s\n", progname, arguments ? arguments : "");*/ - st = exec(progname, arguments); + (void)exec(progname, arguments); printf("exec error: %s\n", strerror(errno)); }