Updating readme

This commit is contained in:
retropikzel 2025-01-25 12:46:58 +02:00
parent 535807b879
commit 2a418d979c
5 changed files with 43 additions and 16 deletions

View File

@ -124,6 +124,9 @@ MOSH=mosh --loadpath=.
test-mosh-podman-amd64: libtest.so
podman run --arch=amd64 -it -v ${PWD}:/workdir docker.io/schemers/mosh:0 bash -c "cd /workdir && ${MOSH} test.scm"
test-mosh-docker: libtest.so
docker run -it -v ${PWD}:/workdir docker.io/schemers/mosh:0 bash -c "cd /workdir && ${MOSH} test.scm"
test-mosh: libtest.so
${MOSH} test.scm

View File

@ -36,8 +36,29 @@ guarantees are being made just yet.
## Implementation table
| | Chibi | Chicken 5 | Cyclone | Gambit | Gauche | Gerbil | Guile | Kawa | Larceny | Mosh | Racket | Sagittarius | Skint | STklos | tr7 | Ypsilon |
| ------------------------------- | ----- | --------- | ------- | ------- | ------ | ------ | ----- | ---- | ------- | ---- | ------ | ----------- | ----- | ------ | --- | ------- |
<table>
<tr>
<td>Chibi</td>
<td>Chicken 5</td>
<td>Cyclone</td>
<td>Gambit</td>
<td>Gauhe</td>
<td>Gerbil</td>
<td>Guile</td>
<td>Kawa</td>
<td>Larceny</td>
<td>Mosh</td>
<td>Racket</td>
<td>Sagittarius</td>
<td>Skint</td>
<td>STklos</td>
<td>tr7</td>
<td>Ypsilon</td>
</tr>
</table>
| pffi-init | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | |
| pffi-size-of | X | X | X | X | | | X | X | | X | X | X | | X | | |
| pffi-shared-object-auto-load | X | X | X | | | | X | X | | X | X | X | | X | | |
@ -51,6 +72,7 @@ guarantees are being made just yet.
| pffi-pointer-get | X | X | X | | | | X | X | | X | X | X | | | | |
| pffi-string->pointer | X | X | X | | | | X | X | | X | X | X | | | | |
| pffi-pointer->string | X | X | X | | | | X | X | | X | X | X | | | | |
| pffi-struct-make |
| pffi-define | X | X | X | | | | X | X | | X | X | X | | | | |
| pffi-define-callback | | X | | | | | X | | | X | X | X | | | | |
| pffi-pointer-address | | X | | | | | X | | | | X | X | | | | |

View File

@ -561,7 +561,6 @@
;pffi-pointer-dereference
))
(else (error "Unsupported implementation")))
(include "r7rs-pffi/struct.scm")
(cond-expand
(chibi (include "r7rs-pffi/chibi.scm"))
(chicken5 (include "r7rs-pffi/chicken.scm"))
@ -581,4 +580,5 @@
(tr7 (include "r7rs-pffi/tr7.scm"))
(ypsilon (include "r7rs-pffi/ypsilon.scm"))
(else #t))
(include "r7rs-pffi/struct.scm")
(include "r7rs-pffi/main.scm"))

View File

@ -2,16 +2,16 @@
(define pffi-size-of
(lambda (type)
(cond ((eq? type 'int8) 1) ; FIXME
((eq? type 'uint8) 1) ; FIXME
((eq? type 'int16) 2) ; FIXME
((eq? type 'uint16) 2) ;FIXME
((eq? type 'int32) 4) ; FIXME
((eq? type 'uint32) 4) ; FIXME
((eq? type 'int64) 8) ; FIXME
((eq? type 'uint64) 8) ; FIXME
((eq? type 'char) size-of-bool)
((eq? type 'unsigned-char) size-of-bool)
(cond ((eq? type 'int8) 1)
((eq? type 'uint8) 1)
((eq? type 'int16) 2)
((eq? type 'uint16) 2)
((eq? type 'int32) 4)
((eq? type 'uint32) 4)
((eq? type 'int64) 8)
((eq? type 'uint64) 8)
((eq? type 'char) 1)
((eq? type 'unsigned-char) 1)
((eq? type 'short) size-of-short)
((eq? type 'unsigned-short) size-of-unsigned-short)
((eq? type 'int) size-of-int)
@ -59,11 +59,11 @@
((equal? type 'uint64) (pointer-set-c-uint64! pointer offset value))
((equal? type 'char) (pointer-set-c-char! pointer offset (char->integer value)))
((equal? type 'short) (pointer-set-c-short! pointer offset value))
((equal? type 'unsigned-short) (pointer-set-c-short! pointer offset value)) ;; FIXME
((equal? type 'unsigned-short) (pointer-set-c-short! pointer offset value))
((equal? type 'int) (pointer-set-c-int! pointer offset value))
((equal? type 'unsigned-int) (pointer-set-c-int! pointer offset value)) ;; FIXME
((equal? type 'unsigned-int) (pointer-set-c-int! pointer offset value))
((equal? type 'long) (pointer-set-c-long! pointer offset value))
((equal? type 'unsigned-long) (pointer-set-c-long! pointer offset value)) ;; FIXME
((equal? type 'unsigned-long) (pointer-set-c-long! pointer offset value))
((equal? type 'float) (pointer-set-c-float! pointer offset value))
((equal? type 'double) (pointer-set-c-double! pointer offset value))
((equal? type 'void) (pointer-set-c-pointer! pointer offset value))
@ -100,6 +100,7 @@
(pffi-pointer-set! pointer 'char (* index (pffi-size-of 'char)) c)
(set! index (+ index 1)))
string-content)
(pffi-pointer-set! pointer 'char (* index (pffi-size-of 'char)) #\null)
pointer)))
(define pffi-pointer->string

View File

@ -1,3 +1,4 @@
(define-record-type <pffi-struct>
(struct-make name size pointer members)
pffi-struct?