mirror of
https://github.com/cc65/cc65.git
synced 2025-03-12 23:31:18 +00:00
Some improvements to Atari exec() after review.
This commit is contained in:
parent
94ba9575ec
commit
d0faf471b8
@ -33,10 +33,8 @@ notsupp:lda #ENOSYS ; "unsupported system call"
|
|||||||
.byte $2C ; bit opcode, eats the next 2 bytes
|
.byte $2C ; bit opcode, eats the next 2 bytes
|
||||||
noiocb: lda #EMFILE ; "too many open files"
|
noiocb: lda #EMFILE ; "too many open files"
|
||||||
jsr incsp2 ; clean up stack
|
jsr incsp2 ; clean up stack
|
||||||
seterr: jsr __directerrno
|
seterr: jmp __directerrno
|
||||||
lda #$FF
|
|
||||||
tax
|
|
||||||
rts ; return -1
|
|
||||||
|
|
||||||
; entry point
|
; entry point
|
||||||
|
|
||||||
|
@ -356,7 +356,6 @@ static void cmd_rename(void)
|
|||||||
|
|
||||||
static void cmd_exec(void)
|
static void cmd_exec(void)
|
||||||
{
|
{
|
||||||
int st;
|
|
||||||
unsigned char *progname, *arguments;
|
unsigned char *progname, *arguments;
|
||||||
|
|
||||||
progname = strtok(args, " \t\n");
|
progname = strtok(args, " \t\n");
|
||||||
@ -367,7 +366,7 @@ static void cmd_exec(void)
|
|||||||
arguments = strtok(NULL, "");
|
arguments = strtok(NULL, "");
|
||||||
|
|
||||||
/*printf("exec: %s %s\n", progname, arguments ? arguments : "");*/
|
/*printf("exec: %s %s\n", progname, arguments ? arguments : "");*/
|
||||||
st = exec(progname, arguments);
|
(void)exec(progname, arguments);
|
||||||
printf("exec error: %s\n", strerror(errno));
|
printf("exec error: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user