Changeset 35344 in project


Ignore:
Timestamp:
03/26/18 03:08:11 (4 months ago)
Author:
kon
Message:

rmv unneeded -> void, mdp name is (or string symbol) per doc, add note about windows chunk test, some procs are pure

Location:
release/4/message-digest/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • release/4/message-digest/trunk/message-digest-bv.scm

    r35342 r35344  
    5454;FIXME using & then checking !
    5555
    56 (define: (message-digest-update-blob (md message-digest) (blb blob) . (opts list)) -> void
     56(define: (message-digest-update-blob (md message-digest) (blb blob) . (opts list))
    5757  (let-optionals* opts (
    5858    (start 0)
     
    6565;;
    6666
    67 (define: (message-digest-update-string (md message-digest) (str string) . (opts list)) -> void
     67(define: (message-digest-update-string (md message-digest) (str string) . (opts list))
    6868  (let-optionals* opts (
    6969    (start 0)
     
    7878;; Single Source API
    7979
    80 (define: (message-digest-blob (mdp message-digest-primitive) (blb blob) . (opts list)) -> message-digest-result-type
     80(define: (message-digest-blob (mdp message-digest-primitive) (blb blob) . (opts list)) --> message-digest-result-type
    8181  (let-optionals* opts (
    8282    (restyp (message-digest-result-form))
     
    8989      (finalize-message-digest md restyp) ) ) )
    9090
    91 (define: (message-digest-string (mdp message-digest-primitive) (str string) . (opts list)) -> message-digest-result-type
     91(define: (message-digest-string (mdp message-digest-primitive) (str string) . (opts list)) --> message-digest-result-type
    9292  (let-optionals* opts (
    9393    (restyp (message-digest-result-form))
  • release/4/message-digest/trunk/message-digest-chunk.scm

    r35342 r35344  
    2323  message-digest-chunk-converter)
    2424
    25 (import scheme chicken)
     25(import scheme chicken foreign)
    2626(use
    2727  (only posix file-size)
     
    9494  ((and windows (not cygwin))
    9595
     96    ;tested w/ macosx (replaced mmap version)
     97
    9698    (use (only lolevel allocate free))
    9799
     
    112114        (values ptr finalize) ) ) )
    113115
    114   (else
     116  (else ;assume unix
    115117
    116118    (use
  • release/4/message-digest/trunk/message-digest-int.scm

    r35341 r35344  
    5353;;
    5454
    55 (define: (*message-digest-update-uint (loc symbol) (md message-digest) (n number) (size fixnum) (setter procedure)) -> void
     55(define: (*message-digest-update-uint (loc symbol) (md message-digest) (n number) (size fixnum) (setter procedure))
    5656  (let (
    5757    (blb (setup-message-digest-buffer! (check-message-digest loc md) size)) )
     
    6363;; Char
    6464
    65 (define: (message-digest-update-char-u8 (md message-digest) (ch char)) -> void
     65(define: (message-digest-update-char-u8 (md message-digest) (ch char))
    6666        (*message-digest-update-uint 'message-digest-update-char-u8
    6767          md
     
    7070          *blob-set-u8!) )
    7171
    72 (define: (message-digest-update-char-be (md message-digest) (ch char)) -> void
     72(define: (message-digest-update-char-be (md message-digest) (ch char))
    7373        (*message-digest-update-uint 'message-digest-update-char-be
    7474          md
     
    7777          *blob-set-u32-be!) )
    7878
    79 (define: (message-digest-update-char-le (md message-digest) (ch char)) -> void
     79(define: (message-digest-update-char-le (md message-digest) (ch char))
    8080        (*message-digest-update-uint 'message-digest-update-char-le
    8181          md
     
    8686;; Unsigned Integer 8, 16, 32, & 64 bits
    8787
    88 (define: (message-digest-update-u8 (md message-digest) (n number)) -> void
     88(define: (message-digest-update-u8 (md message-digest) (n number))
    8989        (*message-digest-update-uint 'message-digest-update-u8 md n 1 *blob-set-u8!) )
    9090
    91 (define: (message-digest-update-u16-be (md message-digest) (n number)) -> void
     91(define: (message-digest-update-u16-be (md message-digest) (n number))
    9292        (*message-digest-update-uint 'message-digest-update-u16-be md n 2 *blob-set-u16-be!) )
    9393
    94 (define: (message-digest-update-u16-le (md message-digest) (n number)) -> void
     94(define: (message-digest-update-u16-le (md message-digest) (n number))
    9595        (*message-digest-update-uint 'message-digest-update-u16-le md n 2 *blob-set-u16-le!) )
    9696
    97 (define: (message-digest-update-u32-be (md message-digest) (n number)) -> void
     97(define: (message-digest-update-u32-be (md message-digest) (n number))
    9898        (*message-digest-update-uint 'message-digest-update-u32-be md n 4 *blob-set-u32-be!) )
    9999
    100 (define: (message-digest-update-u32-le (md message-digest) (n number)) -> void
     100(define: (message-digest-update-u32-le (md message-digest) (n number))
    101101        (*message-digest-update-uint 'message-digest-update-u32-le md n 4 *blob-set-u32-le!) )
    102102
    103 (define: (message-digest-update-u64-be (md message-digest) (n number)) -> void
     103(define: (message-digest-update-u64-be (md message-digest) (n number))
    104104        (*message-digest-update-uint 'message-digest-update-u64-be md n 8 *blob-set-u64-be!) )
    105105
    106 (define: (message-digest-update-u64-le (md message-digest) (n number)) -> void
     106(define: (message-digest-update-u64-le (md message-digest) (n number))
    107107        (*message-digest-update-uint 'message-digest-update-u64-le md n 8 *blob-set-u64-le!) )
    108108
    109109;; Machine Byte Order w/ Char & Unsigned Integer
    110110
    111 (define: (message-digest-update-char (md message-digest) (ch char) . (opts (list message-digest-byte-order))) -> void
     111(define: (message-digest-update-char (md message-digest) (ch char) . (opts (list message-digest-byte-order)))
    112112  (let (
    113113    (order (optional opts (machine-byte-order))) )
     
    116116      ((big-endian)                     (message-digest-update-char-be md ch) ) ) ) )
    117117
    118 (define: (message-digest-update-u16 (md message-digest) (n number) . (opts (list message-digest-byte-order))) -> void
     118(define: (message-digest-update-u16 (md message-digest) (n number) . (opts (list message-digest-byte-order)))
    119119  (let (
    120120    (order (optional opts (machine-byte-order))) )
     
    123123      ((big-endian)                     (message-digest-update-u16-be md n) ) ) ) )
    124124
    125 (define: (message-digest-update-u32 (md message-digest) (n number) . (opts (list message-digest-byte-order))) -> void
     125(define: (message-digest-update-u32 (md message-digest) (n number) . (opts (list message-digest-byte-order)))
    126126  (let (
    127127    (order (optional opts (machine-byte-order))) )
     
    130130      ((big-endian)                     (message-digest-update-u32-be md n) ) ) ) )
    131131
    132 (define: (message-digest-update-u64 (md message-digest) (n number) . (opts (list message-digest-byte-order))) -> void
     132(define: (message-digest-update-u64 (md message-digest) (n number) . (opts (list message-digest-byte-order)))
    133133  (let (
    134134    (order (optional opts (machine-byte-order))) )
  • release/4/message-digest/trunk/message-digest-item.scm

    r35341 r35344  
    3535;;
    3636
    37 (define: (message-digest-object (mdp message-digest-primitive) (obj *) . (opts list)) -> message-digest-result-type
     37(define: (message-digest-object (mdp message-digest-primitive) (obj *) . (opts list)) --> message-digest-result-type
    3838  (let-optionals* opts (
    3939    (restyp (message-digest-result-form))
     
    4444      (finalize-message-digest md restyp) ) ) )
    4545
    46 (define: (message-digest-file (mdp message-digest-primitive) (flnm pathname) . (opts list)) -> message-digest-result-type
     46(define: (message-digest-file (mdp message-digest-primitive) (flnm pathname) . (opts list)) --> message-digest-result-type
    4747  (let (
    4848    (restyp (message-digest-result-form))
     
    5151    (finalize-message-digest md restyp) ) )
    5252
    53 (define: (message-digest-port (mdp message-digest-primitive) (port output-port) . (opts list)) -> message-digest-result-type
     53(define: (message-digest-port (mdp message-digest-primitive) (port output-port) . (opts list)) --> message-digest-result-type
    5454  (let (
    5555    (restyp (message-digest-result-form))
  • release/4/message-digest/trunk/message-digest-port.scm

    r35342 r35344  
    128128(define-check+error-type digest-output-port)
    129129
    130 (define: (digest-output-port-name (port digest-output-port)) -> string
     130(define: (digest-output-port-name (port digest-output-port)) --> string
    131131  (%port-name
    132132    (check-digest-output-port 'digest-output-port-name port)) )
  • release/4/message-digest/trunk/message-digest-primitive.scm

    r35338 r35344  
    4949
    5050(define (primitive-name? obj)
    51   #t )
     51  (or (symbol? obj) (string? obj)) )
    5252
    5353;;; Message Digest Algorithm API
     
    7979  (final procedure message-digest-primitive-final)
    8080  (block-len fixnum message-digest-primitive-block-length)
    81   (name * message-digest-primitive-name)
     81  (name (or symbol string) message-digest-primitive-name)
    8282  (raw-update procedure message-digest-primitive-raw-update) )
    8383
  • release/4/message-digest/trunk/message-digest-srfi-4.scm

    r35341 r35344  
    4141;;
    4242
    43 (define: (get-bytevector-object (loc symbol) (obj *)) -> blob
     43(define: (get-bytevector-object (loc symbol) (obj *)) --> blob
    4444        (cond
    4545                ((string? obj)
     
    5555;;
    5656
    57 (define: (message-digest-update-u8vector (md message-digest) (u8vec u8vector) . (opts list)) -> void
     57(define: (message-digest-update-u8vector (md message-digest) (u8vec u8vector) . (opts list))
    5858  (let-optionals* opts (
    5959    (start 0)
     
    6464;;; Single Source API
    6565
    66 (define: (message-digest-u8vector (mdp message-digest-primitive) (u8vec u8vector) . (opts list)) -> message-digest-result-type
     66(define: (message-digest-u8vector (mdp message-digest-primitive) (u8vec u8vector) . (opts list)) --> message-digest-result-type
    6767  (let-optionals* opts (
    6868    (restyp (message-digest-result-form))
  • release/4/message-digest/trunk/message-digest-support.scm

    r35342 r35344  
    8585;;
    8686
    87 (define: (u8vector/slice (u8vec u8vector) (start fixnum) (end (or boolean fixnum))) -> u8vector
    88    (let ((end (or end (u8vector-length u8vec))))
     87(define: (u8vector/slice (u8vec u8vector) (start fixnum) (end (or boolean fixnum))) --> u8vector
     88   (let (
     89    (end (or end (u8vector-length u8vec))) )
    8990    (if (and (fxzero? start) (fx= end (u8vector-length u8vec)))
    9091      u8vec
    9192      (subu8vector u8vec start end) ) ) )
    9293
    93 (define: (blob/slice (blb blob) (start fixnum) (end (or boolean fixnum))) -> blob
     94(define: (blob/slice (blb blob) (start fixnum) (end (or boolean fixnum))) --> blob
    9495  (let (
    9596    (end (or end (blob-size blb))) )
     
    9899      (string->blob (##sys#substring (blob->string blb) start end)) ) ) )
    99100
    100 (define: (string/slice (str string) (start fixnum) (end (or boolean fixnum))) -> string
     101(define: (string/slice (str string) (start fixnum) (end (or boolean fixnum))) --> string
    101102  (let (
    102103    (end (or end (string-length str))) )
     
    107108;;
    108109
    109 (define: (*message-digest-update-blob (md message-digest) (blb blob) . (opts (list fixnum))) -> void
     110(define: (*message-digest-update-blob (md message-digest) (blb blob) . (opts (list fixnum)))
    110111  (let (
    111112    (siz (optional opts (blob-size blb))) )
     
    115116      siz) ) )
    116117
    117 (define: (*message-digest-update-string (md message-digest) (str string)) -> void
     118(define: (*message-digest-update-string (md message-digest) (str string))
    118119        (*message-digest-update-blob md (string->blob str)) )
    119120
  • release/4/message-digest/trunk/message-digest-types.scm

    r35342 r35344  
    2727(define-type message-digest-primitive (struct message-digest-primitive))
    2828
     29(define-type message-digest-primitive-name (or symbol string))
     30
    2931(define-type message-digest (struct message-digest))
    3032
Note: See TracChangeset for help on using the changeset viewer.