commit 88ae2476f3ce0b0edbc655613a5d29ff57fe627e
parent 729e1338d2c18e371aef52077f629e8754b25d40
Author: Alexander Burger <abu@software-lab.de>
Date: Mon, 15 Oct 2012 11:31:48 +0200
emu64 continued
Diffstat:
M | src64/arch/emu.l | | | 79 | +++++++++++++++++++++++++++++++++++++++---------------------------------------- |
1 file changed, 39 insertions(+), 40 deletions(-)
diff --git a/src64/arch/emu.l b/src64/arch/emu.l
@@ -1,4 +1,4 @@
-# 13oct12abu
+# 15oct12abu
# (c) Software Lab. Alexander Burger
# *AsmOpcodes *AsmCode *AsmPos *Labels *AsmData *SysFun
@@ -662,16 +662,16 @@
(getenv p p)
(setenv i p p i)
(isatty i i)
- (tcgetattr i i v)
- (tcsetattr i i i v)
+ (tcgetattr i i "struct termios")
+ (tcsetattr i i i "struct termios")
(tcsetpgrp - i i)
(signal p i f)
- (sigfillset - v)
- (sigemptyset - v)
- (sigaddset - v i)
- (sigprocmask - i v v)
- (sigaction - i v v)
- (gettimeofday - -2 v)
+ (sigfillset - "sigset_t")
+ (sigemptyset - "sigset_t")
+ (sigaddset - "sigset_t" i)
+ (sigprocmask - i "sigset_t" "sigset_t")
+ (sigaction - i "struct sigaction" "struct sigaction")
+ (gettimeofday - -2 "struct timezone")
(malloc p i)
(realloc p p i)
(fork i)
@@ -681,12 +681,12 @@
(kill i i i)
(raise - i)
(alarm i i)
- (waitpid i i v i)
+ (waitpid i i "int" i)
(free - p)
- (stat i p v)
+ (stat i p "struct stat")
(fcntl i i)
- (pipe i v)
- (select i i v v v 2)
+ (pipe i "int")
+ (select i i "fd_set" "fd_set" "fd_set" 2)
(open i p i i)
(dup i i)
(dup2 - i i)
@@ -698,47 +698,47 @@
(close i i)
(fopen p p p)
(freopen p p p p)
- (getc_unlocked i v)
- (putc_unlocked - i v)
- (fread i p i i v)
- (fwrite i p i i v)
- (fileno i v)
- (fseek i v n i)
+ (getc_unlocked i "FILE")
+ (putc_unlocked - i "FILE")
+ (fread i p i i "FILE")
+ (fwrite i p i i "FILE")
+ (fileno i "FILE")
+ (fseek i "FILE" n i)
(ftruncate i i n)
- (fflush - v)
+ (fflush - "FILE")
(fsync i i)
- (feof i v)
- (fclose - v)
+ (feof i "FILE")
+ (fclose - "FILE")
(socket i i i i)
(setsockopt i i i i p i)
(htons i i)
(ntohs i i)
(inet_ntop - i p p i)
- (bind i i v i)
+ (bind i i "struct sockaddr" i)
(listen i i i)
- (getsockname i i v v)
- (getaddrinfo i p p v v)
- (getnameinfo i v i p i p i i)
- (freeaddrinfo - v)
- (accept i i v v)
- (connect i i v i)
+ (getsockname i i "struct sockaddr" "socklen_t")
+ (getaddrinfo i p p "struct addrinfo" "struct addrinfo")
+ (getnameinfo i "struct sockaddr" i p i p i i)
+ (freeaddrinfo - "struct addrinfo")
+ (accept i i "struct sockaddr" "socklen_t")
+ (connect i i "struct sockaddr" i)
(recv i i p i i)
- (sendto - i p i i v i)
+ (sendto - i p i i "struct sockaddr" i)
(strdup p p)
(dlopen p p i)
- (dlsym p v p)
+ (dlsym p "void" p)
(getcwd p p)
(chdir i p)
(opendir p p)
- (readdir p v)
- (closedir - v)
- (time - v)
- (times - v)
+ (readdir p "DIR")
+ (closedir - "DIR")
+ (time - "time_t")
+ (times - "struct tms")
(usleep - i)
- (gmtime p v)
- (localtime p v)
+ (gmtime p "time_t")
+ (localtime p "time_t")
(printf - p)
- (fprintf - v p)
+ (fprintf - "FILE" p)
(snprintf - p i p)
(strerror p i)
(dlerror p)
@@ -757,11 +757,10 @@
(i (op.i S O))
(f (sysFun S O))
(a (pack "(void*)" (op.a S O)))
- (v (pack "(void*)" (op.p S O)))
(T
(nond
(P (op.i S O))
- ((num? P) (quit "Bad parameter type" P))
+ ((num? P) (pack "(" P "*)" (op.p S O)))
((ge0 P) (pack "(void*)" (op.p S O)))
(NIL (pack "argv(" @ ", (ptr)" (op.p S O) ")")) ) ) ) )