Ticket #48: ugarit_and_friends.diff
File ugarit_and_friends.diff, 28.9 KB (added by , 15 years ago) |
---|
-
aes/trunk/aes.setup
1 (compile -s -O2 -d1 aes.scm) 1 (compile -s -O2 -d1 aes.scm -j aes) 2 (compile -s -O2 -d1 aes.import.scm -j aes) 2 3 (compile -c -O2 -d1 aes.scm -unit aes) 3 4 ; 4 5 (install-extension 5 6 'aes 6 '("aes.o" "aes. so" "aes.html")7 '("aes.o" "aes.import.so" "aes.so" "aes.html") 7 8 '((version 1.1) 8 9 (static "aes.o") ;; for static linking 9 10 (documentation "aes.html"))) -
aes/trunk/aes.scm
1 (module aes 2 (make-aes128-encryptor make-aes192-encryptor make-aes256-encryptor 3 make-aes128-decryptor make-aes192-decryptor make-aes256-decryptor) 1 4 2 (declare (export3 make-aes128-encryptor make-aes192-encryptor make-aes256-encryptor4 make-aes128-decryptor make-aes192-decryptor make-aes256-decryptor))5 6 5 ;; The contents of the below foreign-declare 7 6 ;; Are public domain code from http://www.efgh.com/software/rijndael.htm 8 7 ;; My modifications extend no further than pasting it together and putting … … 13 12 ;; * Antoon Bosselaers antoon.bosselaers@esat.kuleuven.ac.be 14 13 ;; * Paulo Barreto paulo.barreto@terra.com.br 15 14 15 (import scheme) 16 (import chicken) 17 (import foreign) 18 19 (use extras) 20 16 21 (foreign-declare " 17 22 static int rijndaelSetupEncrypt(unsigned long *rk, const unsigned char *key, 18 23 int keybits); … … 1319 1324 (rijndaelDecrypt 1320 1325 context nrounds 1321 1326 input result) 1322 result)))) 1323 1324 1325 No newline at end of file 1327 result)))) ) -
json/trunk/json.setup
1 (compile -R syntax-case json.scm -s -O2 -d1) 1 (compile json.scm -s -O2 -d1 -j json) 2 (compile json.import.scm -s) 2 3 (install-extension 3 4 'json 4 '("json.so" )5 '("json.so" "json.import.so") 5 6 '((version "1.2.1") 6 7 (documentation "json.html"))) -
json/trunk/json.scm
28 28 ;; JSON Arrays are lists 29 29 ;; 30 30 31 ( require-extension packrat srfi-69)31 (module json (json-read json-write) 32 32 33 (import packrat) 33 (import scheme) 34 (import chicken) 35 (use ports) 36 (require-library srfi-1) (import (except srfi-1 any)) 37 (use srfi-69) 38 (use packrat) 34 39 35 (declare (export json-read json-write))36 37 40 (define (hashtable->vector ht) 38 41 (list->vector (hash-table->alist ht)) ) 39 42 … … 201 204 (parse-error-messages e))))))) 202 205 203 206 (lambda maybe-port 204 (read-any (if (pair? maybe-port) (car maybe-port) (current-input-port)))))) 207 (read-any (if (pair? maybe-port) (car maybe-port) (current-input-port))))))) 205 208 -
json/trunk/json.meta
2 2 3 3 ((egg "json.egg") 4 4 (synopsis "A JSON library") 5 (needs syntax-case packrat)5 (needs "packrat") 6 6 (category parsing) 7 7 (license "MIT") 8 8 (eggdoc "doc.scm") -
lzma/trunk/tests/run.scm
1 ( load "../lzma")1 (use lzma) 2 2 3 3 (define test-string (with-input-from-file "../lzma.so" (lambda () (read-string)))) 4 4 … … 6 6 7 7 (printf "Original size: ~A\n" (blob-size test-blob)) 8 8 9 (define compressed ( lzma:compress test-blob))9 (define compressed (compress test-blob)) 10 10 11 11 (printf "Compressed size: ~A\n" (blob-size compressed)) 12 12 13 (define decompressed ( lzma:decompress compressed))13 (define decompressed (decompress compressed)) 14 14 15 15 (printf "Decompressed size: ~A\n" (blob-size decompressed)) 16 16 -
lzma/trunk/lzma.setup
1 (compile -s -O2 -d1 lzma.scm -llzma )1 (compile -s -O2 -d1 lzma.scm -llzma -j lzma) 2 2 (compile -c -O2 -d1 lzma.scm -llzma -unit lzma) 3 (compile -s -O2 -d1 lzma.import.scm) 3 4 ; 4 5 (install-extension 5 6 'lzma 6 '("lzma.o" "lzma.so" "lzma. html")7 '("lzma.o" "lzma.so" "lzma.import.so" "lzma.html") 7 8 '((version 1.2) 8 9 (static "lzma.o") ;; for static linking 9 10 (documentation "lzma.html"))) -
lzma/trunk/lzma.scm
1 ( declare (export lzma:compress lzma:decompress))1 (module lzma (compress decompress) 2 2 3 (import scheme) 4 (import chicken) 5 (import foreign) 3 6 (use lolevel) 4 7 5 8 (foreign-declare "#include <lzmalib.h>") … … 13 16 "C_return (lzma_compress(inblob, inlen, &lzma_return_buffer_len));")) 14 17 (define _free (foreign-lambda void "lzma_free" c-pointer)) 15 18 16 (define ( lzma:decompress inblob)19 (define (decompress inblob) 17 20 (let ((ptr (_decompress inblob (blob-size inblob)))) 18 21 (if (null-pointer? ptr) 19 22 #f … … 23 26 (_free ptr) 24 27 outblob))))) 25 28 26 (define ( lzma:compress inblob)29 (define (compress inblob) 27 30 (let ((ptr (_compress inblob (blob-size inblob)))) 28 31 (if (null-pointer? ptr) 29 32 #f … … 31 34 (begin 32 35 (move-memory! ptr outblob lzma-return-buffer-len) 33 36 (_free ptr) 34 outblob))))) 37 outblob)))))) -
tiger-hash/trunk/tiger-hash.setup
1 (include "setup-header") 2 3 (required-extension-version 4 'mathh "1.11" 5 'message-digest "1.5") 6 7 (install-dynld+docu tiger-hash *version*) 8 9 (install-test "tiger-hash-test.scm") 1 (compile tiger-hash.scm -s -O2 -d1 -j tiger-hash) 2 (compile tiger-hash.import.scm -s) 3 (install-extension 4 'tiger-hash 5 '("tiger-hash.so" "tiger-hash.import.so") 6 '((version "trunk") 7 (documentation "tiger-hash.html"))) -
tiger-hash/trunk/tiger-hash.scm
1 1 ;;;; tiger-hash.scm 2 2 ;;;; Kon Lovett, Jan '06 3 (module tiger-hash 3 4 5 (tiger192:binary-digest 6 tiger192:digest 7 tiger192:primitive) 8 9 (import scheme) 10 (import chicken) 11 4 12 (use message-digest) 5 13 6 14 (declare … … 9 17 (fixnum) 10 18 (no-procedure-checks) 11 19 (no-bound-checks) 12 (export 13 tiger192:binary-digest 14 tiger192:digest 15 tiger192:primitive) ) 20 ) 16 21 17 22 #> 18 23 /* Chicken.h includes it but be specific */ … … 833 838 (define (tiger192:primitive) 834 839 (make-message-digest-primitive 835 840 context-size192 digest-length192 836 init192 update192 final192)) 841 init192 update192 final192)) ) -
sha2/sha2.setup
1 (define has-exports? (string>=? (chicken-version) "2.310")) 2 3 (compile -O2 -d0 -s 4 ,@(if has-exports? `(-check-imports -emit-exports sha2.exports) '()) 5 sha2.scm) 6 (install-extension 'sha2 7 '("sha2.so" "sha2.html") 8 `((version "1.4") 9 ,@(if has-exports? `((exports "sha2.exports")) '()) 10 (documentation "sha2.html") ) ) 11 1 (compile sha2.scm -s -O2 -d1 -j sha2) 2 (compile sha2.import.scm -s) 3 (install-extension 4 'sha2 5 '("sha2.so" "sha2.import.so") 6 '((version "1.4") 7 (documentation "sha2.html"))) -
sha2/sha2.scm
1 1 ;;;; sha2.scm 2 (module sha2 3 (sha256:binary-digest sha384:binary-digest sha512:binary-digest 4 sha256:digest sha384:digest sha512:digest 5 sha256:primitive sha384:primitive sha512:primitive) 2 6 7 (import scheme) 8 (import chicken) 9 3 10 (declare 4 11 (fixnum) 5 12 (no-bound-checks) 6 13 (no-procedure-checks) 7 (export8 sha256:binary-digest sha384:binary-digest sha512:binary-digest9 sha256:digest sha384:digest sha512:digest10 sha256:primitive sha384:primitive sha512:primitive)11 14 ) 12 15 13 16 (use message-digest) … … 92 95 (define (sha512:primitive) 93 96 (make-message-digest-primitive 94 97 context-size-512 digest-length-512 95 sha512:init sha512:update sha512:final)) 98 sha512:init sha512:update sha512:final))) -
ugarit/trunk/ugarit.meta
4 4 (documentation "ugarit.html") 5 5 (license "BSD") 6 6 (category data) 7 (needs miscmacros gdbm tiger-hash sha2 aes crypto-tools z3 lzma srfi-37 stty )7 (needs miscmacros gdbm tiger-hash sha2 aes crypto-tools z3 lzma srfi-37 stty matchable) 8 8 (author "Alaric Snell-Pym") 9 (synopsis "A backup/archival system based on content-addressed storage")) 10 No newline at end of file 9 (synopsis "A backup/archival system based on content-addressed storage")) -
ugarit/trunk/ugarit-core.scm
1 (use srfi-2) 2 (use srfi-4) 3 (use srfi-18) 4 (use miscmacros) 5 (use posix) 6 (use tiger-hash) 7 (use sha2) 8 (use aes) 9 (use crypto-tools) 10 (use z3) 11 (use lzma) 12 (use stty) 13 (include "posixextras.scm") 14 (include "backend-fs.scm") 15 (include "backend-cache.scm") 16 (include "backend-devtools.scm") 17 18 (declare (export 19 open-archive 1 (module ugarit-core 2 ( open-archive 20 3 archive? 21 4 archive-writable? 22 5 archive-unlinkable? … … 60 43 snapshot-directory-tree! 61 44 tag-snapshot! 62 45 fold-history 63 fold-archive-node) )46 fold-archive-node) 64 47 48 (import scheme) 49 (import chicken) 50 51 (require-library lzma) 52 (import (prefix lzma lzma:)) 53 (use srfi-1) 54 (use srfi-4) 55 (use srfi-13) 56 (use srfi-18) 57 (use extras) 58 (use ports) 59 (use files) 60 (use lolevel) 61 (use data-structures) 62 (use miscmacros) 63 (use posix) 64 (use tiger-hash) 65 (use sha2) 66 (use aes) 67 (use crypto-tools) 68 (use z3) 69 (use stty) 70 (use matchable) 71 (use regex) 72 73 65 74 ;; 66 75 ;; STORAGE ENGINES 67 76 ;; … … 99 108 encrypt ; the encryptor, u8vector -> u8vector 100 109 decrypt) ; the decryptor, inverse of the above 101 110 111 (include "posixextras.scm") 112 (include "backend-fs.scm") 113 (include "backend-cache.scm") 114 (include "backend-devtools.scm") 115 102 116 (define (prepend-type-byte b v) 103 117 (let* ((v-len (u8vector-length v)) 104 118 (v2 (make-u8vector (+ 1 v-len)))) … … 654 668 sexprs))) 655 669 knil)) 656 670 657 (define (unlink-sexpr-stream-block! key sexpr-unlink!)671 (define (unlink-sexpr-stream-block! archive key sexpr-unlink!) 658 672 (let ((result (archive-unlink! archive key))) 659 673 (if result 660 674 (for-each sexpr-unlink! (deserialise-sexpr-stream result))))) … … 667 681 (unlink-key-stream! archive key ks-type 668 682 (lambda (archive leaf-key found-leaf-type) 669 683 (assert (eq? found-leaf-type leaf-type)) 670 (unlink-sexpr-stream-block! leaf-key sexpr-unlink!))))684 (unlink-sexpr-stream-block! archive leaf-key sexpr-unlink!)))) 671 685 ((eq? type leaf-type) 672 (unlink-sexpr-stream-block! key sexpr-unlink!))686 (unlink-sexpr-stream-block! archive key sexpr-unlink!)) 673 687 (else 674 688 (assert (or (eq? type leaf-type) (eq? type ks-type))))))) 675 689 … … 1020 1034 (kons #f dirent acc)) 1021 1035 (else 1022 1036 (kons #f dirent acc))))) 1023 knil)))) 1037 knil)))) ) 1024 1038 -
ugarit/trunk/posixextras.scm
1 (import foreign) 1 2 2 3 ;; Things that the posix unit forgot 3 4 (foreign-declare #<<EOF … … 13 14 #define C_lchown(fn, u, g) C_fix(lchown(C_data_pointer(fn), C_unfix(u), C_unfix(g))) 14 15 #define C_mknod(fn, m, d) C_fix(mknod(C_data_pointer(fn), C_unfix(m), C_unfix(d))) 15 16 #define C_utime(fn) C_fix((C_utime_buf.actime = C_utime_atime, C_utime_buf.modtime = C_utime_mtime, utime(C_data_pointer(fn), &C_utime_buf))) 17 #define C_ftell(p) C_fix(ftell(C_port_file(p))) 18 #define C_fseek(p, n, w) C_mk_nbool(fseek(C_port_file(p), C_unfix(n), C_unfix(w))) 19 #define C_lseek(fd, o, w) C_fix(lseek(C_unfix(fd), C_unfix(o), C_unfix(w))) 16 20 EOF 17 21 ) 18 22 … … 79 83 (when (fx< (##core#inline "C_utime" (##sys#make-c-string (##sys#expand-home-path fn))) 0) 80 84 (posix-error #:file-error 'change-file-times "cannot change file times" fn atime mtime))) 81 85 82 83 No newline at end of file 86 87 (define-foreign-variable _seek_set int "SEEK_SET") 88 (define-foreign-variable _seek_cur int "SEEK_CUR") 89 (define-foreign-variable _seek_end int "SEEK_END") 90 91 (define set-file-position! 92 (lambda (port pos . whence) 93 (let ([whence (if (pair? whence) (car whence) _seek_set)]) 94 (##sys#check-exact pos 'set-file-position!) 95 (##sys#check-exact whence 'set-file-position!) 96 (when (fx< pos 0) (##sys#signal-hook #:bounds-error 'set-file-position! "invalid negative port position" pos port)) 97 (unless (cond [(port? port) 98 (and (eq? (##sys#slot port 7) 'stream) 99 (##core#inline "C_fseek" port pos whence) ) ] 100 [(fixnum? port) (##core#inline "C_lseek" port pos whence)] 101 [else (##sys#signal-hook #:type-error 'set-file-position! "invalid file" port)] ) 102 (posix-error #:file-error 'set-file-position! "cannot set file position" port pos) ) ) ) ) 103 -
ugarit/trunk/ugarit.setup
1 (compile -s -O2 -d1 ugarit-core.scm) 1 (compile -s -O2 -d1 ugarit-core.scm -j ugarit-core) 2 (compile -s -O2 -d1 ugarit-core.import.scm) 2 3 (compile -c -O2 -d1 ugarit-core.scm -unit ugarit-core) 3 (install-extension 'ugarit-core '("ugarit-core.so" "ugarit-core.o" )4 (install-extension 'ugarit-core '("ugarit-core.so" "ugarit-core.o" "ugarit-core.import.so") 4 5 '((version 0.5) 5 6 (static "ugarit-core.o") 6 7 (documentation "ugarit.html"))) -
ugarit/trunk/ugarit.scm
2 2 3 3 (use srfi-37) 4 4 (use miscmacros) 5 (use matchable) 5 6 (use regex) 6 7 7 8 (define (bit? i b) … … 131 132 (let ((result (string-split line))) 132 133 133 134 (match result 134 (( )135 (("") 135 136 (explore-archive archive directory-key path quit-continuation)) 136 137 (("help") 137 138 (printf "cd .. : Go up one level\n") -
ugarit/trunk/backend-fs.scm
330 330 (lambda (key value) 331 331 (file-close value))))))) 332 332 333 334 No newline at end of file 333 -
gdbm/gdbm.setup
1 (run (csc -s -O2 -d0 gdbm.scm -lgdbm)) 2 (install-extension 'gdbm "gdbm.so") 3 No newline at end of file 1 (compile -s -O2 -d1 gdbm.scm -j gdbm -lgdbm) 2 (compile -s -O2 -d1 gdbm.import.scm -j gdbm) 3 (compile -c -O2 -d1 gdbm.scm -unit gdbm -lgdbm) 4 ; 5 (install-extension 6 'gdbm 7 '("gdbm.o" "gdbm.import.so" "gdbm.so" "gdbm.html") 8 '((version "trunk") 9 (static "gdbm.o") ;; for static linking 10 (documentation "gdbm.html"))) -
gdbm/gdbm.scm
4 4 ;; All rights reserved. 5 5 ;; 6 6 ;; BSD-style license: http://www.debian.org/misc/bsd.license 7 (module gdbm 7 8 9 ( gdbm-open gdbm-close gdbm-store gdbm-fetch gdbm-delete gdbm-exists 10 gdbm-first-key gdbm-next-key gdbm-fold 11 GDBM_READER GDBM_WRITER GDBM_WRCREAT GDBM_NEWDB GDBM_SYNC GDBM_NOLOCK 12 GDBM_INSERT GDBM_REPLACE) 13 14 (import scheme) 15 (import chicken) 16 (import foreign) 17 8 18 (declare 9 19 (fixnum-arithmetic) 10 20 (usual-integrations) 11 (export 12 gdbm-open gdbm-close gdbm-store gdbm-fetch gdbm-delete gdbm-exists 13 gdbm-first-key gdbm-next-key gdbm-fold 14 GDBM_READER GDBM_WRITER GDBM_WRCREAT GDBM_NEWDB GDBM_SYNC GDBM_NOLOCK 15 GDBM_INSERT GDBM_REPLACE)) 21 ) 16 22 17 23 (declare 18 24 (foreign-declare #<<EOF … … 123 129 (let ([str (make-string len)]) 124 130 (##core#inline "copy_string_result" ptr len str) 125 131 (##core#inline "free_ptr" ptr) 126 str) ) ) 132 str) ) ) ) -
crypto-tools/trunk/crypto-tools.scm
1 (use lolevel) 1 (module crypto-tools 2 (blob->hexstring blob->hexstring/uppercase hexstring->blob 3 blob-xor blob-pad blob-unpad 4 make-cbc-encryptor make-cbc-decryptor 5 make-cbc*-encryptor make-cbc*-decryptor) 2 6 7 (import scheme) 8 (import chicken) 9 (use extras lolevel) 3 10 4 (declare (export5 blob->hexstring blob->hexstring/uppercase hexstring->blob6 blob-xor blob-pad blob-unpad7 make-cbc-encryptor make-cbc-decryptor8 make-cbc*-encryptor make-cbc*-decryptor))9 10 11 (define *the-null-blob* (make-blob 0)) 11 12 12 13 (define (check-blob blob len function) … … 254 255 (let* ((inputsize (blob-size input)) 255 256 (output (make-blob inputsize)) 256 257 (iv (decryptor (subblob input 0 blocksize)))) 257 (decrypt input blocksize inputsize iv output 0))))) 258 (decrypt input blocksize inputsize iv output 0))))) ) -
crypto-tools/trunk/crypto-tools.setup
1 (compile -s -O2 -d1 crypto-tools.scm) 1 (compile -s -O2 -d1 crypto-tools.scm -j crypto-tools) 2 (compile -s -O2 -d1 crypto-tools.import.scm) 2 3 (compile -c -O2 -d1 crypto-tools.scm -unit crypto-tools) 3 4 ; 4 5 (install-extension 5 6 'crypto-tools 6 '("crypto-tools.o" "crypto-tools. so" "crypto-tools.html")7 '("crypto-tools.o" "crypto-tools.import.so""crypto-tools.so" "crypto-tools.html") 7 8 '((version 1.1) 8 9 (static "crypto-tools.o") ;; for static linking 9 10 (documentation "crypto-tools.html"))) -
message-digest/trunk/message-digest.setup
1 ( include "setup-header")2 3 ( required-extension-version 'miscmacros "2.4" 'mathh "1.11")4 5 (install-dynld+docu message-digest *version*)6 7 (install-test "message-digest-test.scm")1 (compile message-digest.scm -s -O2 -d1 -j message-digest) 2 (compile message-digest.import.scm -s) 3 (install-extension 4 'message-digest 5 '("message-digest.so" "message-digest.import.so") 6 '((version "1.7") 7 (documentation "message-digest.html"))) -
message-digest/trunk/tests/message-digest-test.scm
1 1 ;;;; message-digest-test.scm 2 2 3 (use testbase testbase-output-compact)4 3 (use message-digest) 5 4 6 5 ;; -
message-digest/trunk/message-digest.scm
8 8 ;; - The ->fixnum/blob/... is approximate at best! 9 9 10 10 11 (eval-when (compile) 12 (declare 13 (not usual-integrations 14 inexact->exact integer? round number? modulo) 15 (fixnum) 16 (inline) 17 (no-procedure-checks) 18 (constant 19 int->hex 20 ->fixnum 21 ->blob 22 ->blob/shared 23 byte-string->hexadecimal) 11 (module message-digest 12 (export 13 byte-string->substring-list/shared 14 byte-string->substring-list 15 byte-string->hexadecimal 16 ->blob 17 ->blob/shared 18 message-digest-chunk-size 19 make-binary-message-digest 20 make-message-digest 21 make-message-digest-primitive 22 message-digest-primitive? 23 message-digest-primitive-name 24 message-digest-primitive-context-info 25 message-digest-primitive-digest-length 26 message-digest-primitive-init 27 message-digest-primitive-update 28 message-digest-primitive-final 29 message-digest-primitive-apply) 30 31 (import scheme) 32 (import chicken) 33 34 (declare 35 (not usual-integrations inexact->exact integer? round number? modulo) 36 (fixnum) 37 (inline) 38 (no-procedure-checks) 39 (constant 40 int->hex 41 ->fixnum 42 ->blob 43 ->blob/shared 44 byte-string->hexadecimal) 24 45 (bound-to-procedure 25 message-digest-primitive?) 26 (export 27 byte-string->substring-list/shared 28 byte-string->substring-list 29 byte-string->hexadecimal 30 ->blob 31 ->blob/shared 32 message-digest-chunk-size 33 make-binary-message-digest 34 make-message-digest 35 make-message-digest-primitive 36 message-digest-primitive? 37 message-digest-primitive-name 38 message-digest-primitive-context-info 39 message-digest-primitive-digest-length 40 message-digest-primitive-init 41 message-digest-primitive-update 42 message-digest-primitive-final 43 message-digest-primitive-apply) ) ) 46 message-digest-primitive?) ) 47 (use ports data-structures srfi-1 srfi-4 srfi-13 srfi-69 lolevel mathh miscmacros) 44 48 45 (require-extension extras srfi-1 srfi-4 srfi-9 srfi-13 srfi-69 lolevel mathh-int miscmacros)46 47 49 ;;; 48 50 49 51 (define (check-procedure loc obj') … … 56 58 57 59 (define (check-context-info loc obj) 58 60 (unless (or (fixnum? obj) (procedure? obj)) 59 (error loc "bad argument type - expected a fixnum or procedure" ctx-info) ) )61 (error loc "bad argument type - expected a fixnum or procedure" obj) ) ) 60 62 61 63 ;;; Cache 62 64 … … 86 88 (define (int->hex ch) 87 89 (let* ((int (char->integer ch)) 88 90 (str (number->string int 16))) 89 (if (< int 16) (conc #\0str) str) ) )91 (if (< int 16) (conc "0" str) str) ) ) 90 92 91 93 (define (byte-string->hexadecimal str #!optional (len (byte-string-length str))) 92 (with-output-to-string (lambda () (byte-string-for-each int->hexstr 0 len) ) ) )94 (with-output-to-string (lambda () (byte-string-for-each (lambda (x) (display (int->hex x))) str 0 len) ) ) ) 93 95 94 96 ;;; 95 97 … … 187 189 (lambda () (when (fixnum? ctx-info) (free ctx)) ) ) ) ) 188 190 189 191 (define (make-message-digest obj ctx-info digest-len init update final . caller) 190 ( string->hexadecimal192 (byte-string->hexadecimal 191 193 (make-binary-message-digest obj 192 194 ctx-info digest-len 193 195 init update final … … 208 210 (message-digest-primitive-init md-prim) 209 211 (message-digest-primitive-update md-prim) 210 212 (message-digest-primitive-final md-prim) 211 (optional caller 'message-digest-primitive-apply)) ) 213 (optional caller 'message-digest-primitive-apply)) )) -
message-digest/trunk/message-digest.meta
1 ;;;; -*- Hen -*- 2 ;;;; message-digest.meta 1 ;;; message-digest.meta -*- Hen -*- 3 2 4 ((category crypt) 5 (synopsis "Message Digest Support") 6 (author "Kon Lovett") 7 (egg "message-digest.egg") 8 (license "BSD") 3 ((egg "message-digest.egg") 4 (synopsis "Message Digest provides support for message digest primitives.") 9 5 (needs mathh miscmacros) 6 (category crypt) 7 (license "MIT") 10 8 (doc-from-wiki) 11 (files 12 "tests" 13 "setup-header.scm" 14 "message-digest.scm" 15 "message-digest.setup" 16 "message-digest.html")) 9 (author "Kon Lovett") 10 (files "message-digest.setup" "message-digest.scm" "message-digest.html")) -
packrat/packrat.setup
1 (compile packrat.scm -s -O2 -d1 - R syntax-case)2 (install-extension 'packrat '("packrat.scm" "packrat.html" "packrat.so" ) '((documentation "packrat.html") (version 1.1)))1 (compile packrat.scm -s -O2 -d1 -j packrat) (compile packrat.import.scm -s) 2 (install-extension 'packrat '("packrat.scm" "packrat.html" "packrat.so" "packrat.import.so") '((documentation "packrat.html") (version 1.1))) -
packrat/packrat.scm
26 26 ;; Requires: SRFI-1, SRFI-9, SRFI-6. See the documentation for more 27 27 ;; details. 28 28 29 (use srfi-1)30 31 29 (module packrat (parse-result? 32 30 parse-result-successful? 33 31 parse-result-semantic-value … … 84 82 85 83 (packrat-parser object->external-representation) ) 86 84 85 (import chicken) 86 (import scheme) 87 (require-library srfi-1) (import srfi-1) 88 87 89 (define-record-type parse-result 88 90 (make-parse-result successful? semantic-value next error) 89 91 parse-result? -
packrat/packrat.meta
2 2 3 3 ((egg "packrat.egg") 4 4 (synopsis "A packrat parsing library") 5 (needs syntax-case)6 5 (category parsing) 7 6 (license "MIT") 8 7 (author "Tony Garnock-Jones") -
syntax-case/trunk/syntax-case.scm
3 3 ; This file is mainly by Felix L. Winkelmann, but contains a good deal of code 4 4 ; from the portable syntax case (psyntax) distribution. 5 5 6 (module 6 7 7 8 (declare 8 9 (disable-interrupts) … … 597 598 (newline) 598 599 (pretty-print exp) 599 600 (display "<EXPANDED>\n") 600 exp) ) ) ) ) ) ) 601 exp) ) ) ) ) ) ) ) 601 602 602 603 603 (##syncase#install-macro-package)604 ;; (##syncase#install-macro-package) -
z3/z3.setup
1 1 (compile z3.scm -O2 -d1 -s 2 -emit-exports "z3.exports" 2 -extend easyffi -j z3) 3 (compile z3.import.scm -O2 -d1 -s 3 4 -extend easyffi) 4 5 5 6 (install-extension 6 7 'z3 7 '("z3.so" "z3. html")8 '("z3.so" "z3.import.so" "z3.html") 8 9 '((exports "z3.exports") 9 10 (version 1.36) 10 11 (documentation "z3.html"))) -
z3/z3lib.h
24 24 typedef int32_t __s32; 25 25 #endif 26 26 27 #if def _WIN3227 #if defined (_WIN32) || defined (__OpenBSD__) 28 28 # define EMSGSIZE 40 29 29 # define EOVERFLOW 84 30 30 # define EBADMSG 94 -
z3/z3flib.c
35 35 return -EINVAL; 36 36 } 37 37 if (filedescr < 0) { 38 return -ENO ENT;38 return -ENODATA; 39 39 } 40 40 if (level <= 0) { 41 41 level = 6; … … 196 196 return -EINVAL; 197 197 } 198 198 if (filedescr < 0) { 199 return -ENO ENT;199 return -ENODATA; 200 200 } 201 201 if (z3d_decode_init(0, 0, &zh->z3dd, sizeof(zh->z3dd)) == NULL) { 202 202 return -EFAULT; -
z3/z3.scm
1 1 ;;;; z3.scm 2 3 (use posix) 4 5 (declare 6 (fixnum) 7 (export z3:decode-init z3:decode 2 (module z3 3 (z3:decode-init z3:decode 8 4 z3:encode-init z3:encode 9 5 z3:handle? 10 6 z3:open-compressed-input-file z3:open-compressed-output-file 11 7 z3:file-handle? z3:file-handle-fileno 12 8 z3:encode-buffer z3:decode-buffer 13 9 z3:encode-file z3:write-encoded 14 z3:decode-file z3:read-decoded) ) 10 z3:decode-file z3:read-decoded) 11 (import scheme) 12 (import chicken) 13 (import (except foreign foreign-declare)) 14 (use data-structures ports posix easyffi) 15 15 16 (declare 17 (fixnum) 18 ) 19 16 20 #> 17 21 #include <unistd.h> 18 22 #include "z3blib.c" … … 342 346 (##core#inline "free_dbuffer" ptr) 343 347 buf) 344 348 (error 'z3:decode-buffer "out of memory - can not allocate decompression buffer")) ) 345 (else (z3:error 'z3:decode-buffer err "can not decode data") ) ) ) ) 349 (else (z3:error 'z3:decode-buffer err "can not decode data") ) ) ) ) )