Skip to content

Commit

Permalink
fix typos found by Eric Lindblad
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerrg committed Jun 2, 2022
1 parent dfe9f43 commit b8c3631
Show file tree
Hide file tree
Showing 43 changed files with 97 additions and 88 deletions.
9 changes: 9 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
Expand Up @@ -2321,3 +2321,12 @@
s/cpnanopass.ss
- corrected signature of multibyte->string and string->multibyte
s/primdata.ss
- fix typos found by Eric Lindblad
c/alloc.c c/compress-io.c c/gc.c c/gcwrapper.c c/new-io.c c/prim5.c
c/schsig.c csug/csug.stex csug/syntax.stex examples/template.ss
mats/4.ms mats/6.ms mats/7.ms mats/8.ms mats/bytevector.ms mats/foreign.ms
mats/io.ms mats/mat.ss mats/misc.ms mats/oop.ms mats/oop.ss mats/profile.ms
mats/record.ms mats/unix.ms s/5_3.ss s/7.ss s/arm32.ss s/base-lang.ss
s/cmacros.ss s/cp0.ss s/cpnanopass.ss s/date.ss s/format.ss s/io.ss
s/mkheader.ss s/np-languages.ss s/pdhtml.ss s/ppc32.ss s/print.ss
s/syntax.ss s/x86.ss s/x86_64.ss
6 changes: 3 additions & 3 deletions c/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void S_protect(ptr *p) {
void S_reset_scheme_stack(ptr tc, iptr n) {
ptr *x; iptr m;

/* we allow less than one_shot_headroom here for no truly justifyable
/* we allow less than one_shot_headroom here for no truly justifiable
reason */
n = ptr_align(n + (one_shot_headroom >> 1));

Expand Down Expand Up @@ -289,7 +289,7 @@ void S_mark_card_dirty(uptr card, IGEN to_g) {
}
}

/* scan remembered set from P to ENDP, transfering to dirty vector */
/* scan remembered set from P to ENDP, transferring to dirty vector */
void S_scan_dirty(ptr **p, ptr **endp) {
uptr this, last;

Expand Down Expand Up @@ -349,7 +349,7 @@ void S_scan_remembered_set(void) {
tc_mutex_release()
}

/* S_get_more_room is called from genereated machine code when there is
/* S_get_more_room is called from generated machine code when there is
* insufficient room for an allocation. ap has already been incremented
* by the size of the object and xp is a (typed) pointer to the value of
* ap before the allocation attempt. xp must be set to a new object of
Expand Down
2 changes: 1 addition & 1 deletion c/compress-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
don't increase the output-port in-buffer size unless you're sure
it reduces object-file size or reduces compression time
significantly. don't decrease it unless you're sure it doesn't
increase object-file size significnatly. one buffer of size
increase object-file size significantly. one buffer of size
LZ4_OUTPUT_PORT_IN_BUFFER_SIZE is allocated per lz4-compressed
output port. another buffer of a closely related size is allocated
per thread. */
Expand Down
2 changes: 1 addition & 1 deletion c/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ static void sweep_generation(ptr tc FORMAL_CTGS) {
}

/* Waiting until sweeping doesn't trigger a change reduces the
chance that an ephemeron must be reigistered as a
chance that an ephemeron must be registered as a
segment-specific trigger or gets triggered for recheck, but
it doesn't change the worst-case complexity. */
if (!change)
Expand Down
2 changes: 1 addition & 1 deletion c/gcwrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ void S_check_heap(IBOOL aftergc) {
if (checkheap_noisy && si->dirty_bytes[d] < dirty) {
/* sweep_dirty won't sweep, and update dirty byte, for
cards with dirty pointers to segments older than the
maximum copyied generation, so we can get legitimate
maximum copied generation, so we can get legitimate
conservative dirty bytes even after gc */
printf("... Conservative dirty byte %x (%x) %sfor segment %#tx card %d ",
si->dirty_bytes[d], dirty,
Expand Down
4 changes: 2 additions & 2 deletions c/new-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ ptr S_bytevector_read(ptr file, ptr bv, iptr start, iptr count, IBOOL gzflag) {
/* If we are running on Apple Silicon under Rosetta 2 translation, work around
a bug (present in 11.2.3 at least) in its handling of memory page protection
bits. One of the tasks that Rosetta handles is to appropriately twiddle the
execute and write bits based on what's happinging to the memory in order to
execute and write bits based on what's happening to the memory in order to
preserve the illusion that the pages have RWX permissions, whereas Apple
Silicon enforces a W^X (write XOR execute) model. For some reason, this
bit-twiddling sometimes fails when the bytevector passed to `read` extends
Expand Down Expand Up @@ -965,6 +965,6 @@ ptr S_bytevector_uncompress(ptr dest_bv, iptr d_start, iptr d_count,
return Sstring("internal error uncompressing ~s");
}
default:
return Sstring("unepxected compress format ~s");
return Sstring("unexpected compress format ~s");
}
}
2 changes: 1 addition & 1 deletion c/prim5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ static s_thread_rv_t s_backdoor_thread_start(void *p) {
(void) Sdeactivate_thread();
display("thread deactivated\n")
(void) Sactivate_thread();
display("thread reeactivated\n")
display("thread reactivated\n")
Scall0((ptr)p);
Sdestroy_thread();
display("thread destroyed\n")
Expand Down
2 changes: 1 addition & 1 deletion c/schsig.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void split(ptr k, ptr *s) {
tc_mutex_release()
}

/* We may come in to S_split_and_resize with a multi-shot contination whose
/* We may come in to S_split_and_resize with a multi-shot continuation whose
* stack segment exceeds the copy bound or is too large to fit along
* with the return values in the current stack. We may also come in to
* S_split_and_resize with a one-shot continuation for which all of the
Expand Down
2 changes: 1 addition & 1 deletion csug/csug.stex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

\def\revisiondate{April 2022}

% Just don't care amout small overflows, most of the time:
% Just don't care about small overflows, most of the time:
\iflatex
\hfuzz=16.0pt
\fi
Expand Down
2 changes: 1 addition & 1 deletion csug/syntax.stex
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ should not be greater than \var{efp}.
\scheme{current-make-source-object} is used by the reader to construct
a source object for an annotation. \scheme{current-make-source-object}
is initially bound to \scheme{make-source-object}, and the reader always
calls the function bound to the paramater with three arguments.
calls the function bound to the parameter with three arguments.

Adjust this parameter to, for example, eagerly convert a position integer
to a file-position object, instead of delaying the conversion to
Expand Down
8 changes: 4 additions & 4 deletions examples/template.ss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
;;; | <keyword> <template-id>
;;; <additional-pattern> -> <initial-pattern>
;;; | (<keyword> (<syntax-pattern>*) <template-id>) ...
;;; | (<keyword> <tempalte-id>) ...
;;; | (<keyword> <template-id>) ...
;;; | (optional <keyword> (<syntax-pattern>*)
;;; <template-id>)
;;; | (optional <keyword> <template-id>)
Expand Down Expand Up @@ -196,7 +196,7 @@
(define (p) (flush-output-port op) (extract-string-and-reset! tb))
(values op p line column))))

;; scan foward for blanks, and if it leads you to a new-line, strip
;; scan forward for blanks, and if it leads you to a new-line, strip
;; the previous blanks back to the new line.
(define (finish-strip ip stack bfp start-bfp)
(let ([node-to-strip (car stack)])
Expand Down Expand Up @@ -687,7 +687,7 @@ cat >> /tmp/rockets <<END
@if((= y 0))
Again!
@elif((= y 1))
Rockets are awseome!
Rockets are awesome!
@elif((= y 2))
Explosions!
@else
Expand All @@ -703,7 +703,7 @@ END
scheme -q << END
(import (template))
(unless (equal? (let ([xs '(3 2 1)] [y 1]) (include-template "/tmp/rockets"))
"Test\n3 ...\n2 ...\n1 ...\nBlast off!\nRockets are awseome!\n")
"Test\n3 ...\n2 ...\n1 ...\nBlast off!\nRockets are awesome!\n")
(error #f "test 10 failed"))
END
scheme -q << END
Expand Down
2 changes: 1 addition & 1 deletion mats/4.ms
Original file line number Diff line number Diff line change
Expand Up @@ -3907,7 +3907,7 @@
;; ----------------------------------------
;; Check interaction of mutation and generations

;; This check disables interrups so that a garbage collection
;; This check disables interrupts so that a garbage collection
;; happens only for the explicit `collect` request.
(with-interrupts-disabled
(let ([e (ephemeron-cons (gensym) 'ok)])
Expand Down
2 changes: 1 addition & 1 deletion mats/6.ms
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
(begin (current-input-port (console-input-port)) #t)

; the following tests open-input-string, open-output-string, read-char,
; eof-object?, unread-char, write-char, and get-ouptut-string
; eof-object?, unread-char, write-char, and get-output-string
(let ([s "hi there, mom!"])
(let ([ip (open-input-string s)] [op (open-output-string)])
(do ([c (read-char ip) (read-char ip)])
Expand Down
2 changes: 1 addition & 1 deletion mats/7.ms
Original file line number Diff line number Diff line change
Expand Up @@ -4961,7 +4961,7 @@ evaluating module init
(error?
(verify-loadability 'load "testfile-clI1.so"))

; make sure compile-whole-program perserves the information verify-loadability needs
; make sure compile-whole-program preserves the information verify-loadability needs
(begin
(mkfile "testfile-clJ0.ss"
'(library (testfile-clJ0) (export x0) (import (chezscheme)) (define x0 'eat) (printf "invoking J0\n")))
Expand Down
10 changes: 5 additions & 5 deletions mats/8.ms
Original file line number Diff line number Diff line change
Expand Up @@ -4241,7 +4241,7 @@
(define x 77))
#t)
; this works because the indirect export of x for b
; counts as an indrect export of x for a. perhaps it
; counts as an indirect export of x for a. perhaps it
; shouldn't work.
(eqv?
(let () (import $ie-E) a)
Expand Down Expand Up @@ -5901,7 +5901,7 @@
(equal?
(qs-foo 3 2 1)
'(a 1 2 3))
; tests adpated from Andre van Tonder posts to srfi 93 discussion
; tests adapted from Andre van Tonder posts to srfi 93 discussion
(equal?
(let ()
(define-syntax swap!
Expand Down Expand Up @@ -8441,7 +8441,7 @@
(import (a3-6 foo))
(cons x a))
'("hello" . "boo"))
; import a library in subset-mode system, then outsied of subset-mode system
; import a library in subset-mode system, then outside of subset-mode system
(begin
(with-output-to-file "testfile-a3-7.ss"
(lambda ()
Expand Down Expand Up @@ -11369,7 +11369,7 @@
(make-source-file-descriptor "foo" 17))
(error? ; #<input port stdin> is not a binary-input port
(make-source-file-descriptor "foo" (open-string-input-port "oops")))
(error? ; #<binary input port> does not supoprt port-position and set-port-position!
(error? ; #<binary input port> does not support port-position and set-port-position!
(make-source-file-descriptor "foo"
(make-custom-binary-input-port "foo" (lambda (bv s c) 0) #f #f #f)
#t))
Expand Down Expand Up @@ -11814,7 +11814,7 @@
(begin
(collect (collect-maximum-generation))
;; After collecting the maximum generation, the
;; cached information shoould definitely be gone:
;; cached information should definitely be gone:
(equal? (call-with-values
(lambda () (locate-source sfd-to-cache 8 #t))
(lambda () 'gone))
Expand Down
6 changes: 3 additions & 3 deletions mats/bytevector.ms
Original file line number Diff line number Diff line change
Expand Up @@ -10408,7 +10408,7 @@
#x01 #x00 #x00 #x65
#x00 #x00 #x00 #x65)
'big
; rkd: added endianness-manditory? flag
; rkd: added endianness-mandatory? flag
#t))
=> #t)

Expand Down Expand Up @@ -10454,7 +10454,7 @@
#x65 #x00 #x00 #x01
#x65 #x00 #x00 #x00)
'little
; rkd: added endianness-manditory? flag
; rkd: added endianness-mandatory? flag
#t))
=> #t)

Expand Down Expand Up @@ -10920,7 +10920,7 @@

#t)

; Currently the reference implementation is the only implemenation,
; Currently the reference implementation is the only implementation,
; so go ahead and use it for the tests and the random tests below.
(define bytevector-and $bytevector-and)
(define bytevector-ior $bytevector-ior)
Expand Down
4 changes: 2 additions & 2 deletions mats/foreign.ms
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@
(let ([bv1 (string->utf8 "hello")] [bv2 (make-bytevector 5)])
($fp-bvcopy bv2 bv1 5)
(and (bytevector=? bv1 bv2) (bytevector=? bv1 (string->utf8 "hello"))))
;; No longer an error since make-ftype-pointer also serves to make foriegn-pointers
;; No longer an error since make-ftype-pointer also serves to make foreign-pointers
#;(error? ; "memcpy" is not a procedure
(make-ftype-pointer memcpy_t "memcpy"))
(error? ; unrecognized ftype
Expand Down Expand Up @@ -2422,7 +2422,7 @@
(+ $stack-depth $base-value)))
(or (= (optimize-level) 3)
; similarly, but with a ptr return value so the values error is signaled
; by S_call_help wrather than the foreign-procedure wrapper
; by S_call_help rather than the foreign-procedure wrapper
(eqv?
($with-exit-proc
(lambda (ignore)
Expand Down
2 changes: 1 addition & 1 deletion mats/io.ms
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@
(newline op)
(close-port op)))
; NB: keep this last among the iconv-codec mats
; close any files left open by failing iconv tests. this is particulary
; close any files left open by failing iconv tests. this is particularly
; important on windows when the iconv dll isn't available and where keeping
; file open can prevent it from being reopened.
(begin (collect (collect-maximum-generation)) #t)
Expand Down
2 changes: 1 addition & 1 deletion mats/mat.ss
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@
(let* ([stdout-stuff (slurp from-stdout)]
[stderr-stuff (slurp from-stderr)])
(when (string=? stderr-stuff "")
(printf "$separate-eval command succeeeded with\nSTDERR:\n~a\nSTDOUT:\n~a\nEND\n" stderr-stuff stdout-stuff))
(printf "$separate-eval command succeeded with\nSTDERR:\n~a\nSTDOUT:\n~a\nEND\n" stderr-stuff stdout-stuff))
(unless (string=? stderr-stuff "")
(printf "$separate-eval command failed with\nSTDERR:\n~a\nSTDOUT:\n~a\nEND\n" stderr-stuff stdout-stuff)
(errorf who "~a" stderr-stuff))
Expand Down
2 changes: 1 addition & 1 deletion mats/misc.ms
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@
(cost-center-allocation-count cc)))

(let ([x (fx+ 3 (random 10))])
((lambda (count) ; range for padding on 32-bit and to accomadate 64-bit words
((lambda (count) ; range for padding on 32-bit and to accommodate 64-bit words
(<= (fxsll (fx+ x 1) 2) count (fxsll (fx+ x 2) 3)))
(let ([cc (make-cost-center)])
(with-cost-center cc
Expand Down
6 changes: 3 additions & 3 deletions mats/oop.ms
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@
;; "method-3" and "method-4" because they're used by
;; <test-2>. Chez OOP produces a "generic function"
;; for each method, and it looks like those functions
;; all have to belong to one line of the class inheritence
;; all have to belong to one line of the class inheritance
;; tree.

;; sub-class w/ overload
Expand Down Expand Up @@ -1103,7 +1103,7 @@
; compiler will catch. A few might not fail given the proper compiler
; extension (i.e. do classes and variables share the same namespace...)

(error? ; duplicate definition repeat, repeat?, and make-repeate
(error? ; duplicate definition repeat, repeat?, and make-repeat
(letrec-classes ([Repeat () (<root>) ()]
[Repeat () (<root>) ()])
0))
Expand Down Expand Up @@ -1244,7 +1244,7 @@
0)

(eq?
;; naive inheritence example
;; naive inheritance example
(letrec-classes ([One () (<root>) ()])
(letrec-classes ([Two () (One) ()])
0))
Expand Down
4 changes: 2 additions & 2 deletions mats/oop.ss
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ products:
- consider exposing query-interface somehow
- (interface I x) => version of x to which I's methods are applicable
- (interface->instance (interface I x)) => x
- interfaces and inheritence
- interfaces and inheritance
- either require parent for define-interface or hide <root-interface>
- consider allowing multiple inheritence (including zero parents) for interfaces
- consider allowing multiple inheritance (including zero parents) for interfaces
|#

#|
Expand Down
2 changes: 1 addition & 1 deletion mats/profile.ms
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@
(file-found? "testfile-coverage1b.ss")
(file-found? "testfile-coverage1c.ss")
(not (file-found? "testfile-coverage1d.ss"))))
; the coverage table retreived should include counts for both sets of load-program calls
; the coverage table retrieved should include counts for both sets of load-program calls
(and
(andmap
(lambda (dumpit)
Expand Down
2 changes: 1 addition & 1 deletion mats/record.ms
Original file line number Diff line number Diff line change
Expand Up @@ -9099,7 +9099,7 @@
(and (member o l) #t))

(mat cp0-kar-kons-optimizations
; for now, it's necesary to run cp0 three times to complete the reduction
; for now, it's necessary to run cp0 three times to complete the reduction
(equal?
(with-output-to-string
(lambda ()
Expand Down
2 changes: 1 addition & 1 deletion mats/unix.ms
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
(eq? (sleep (make-time 'time-duration 0 2)) (void))
(symbol? (with-input-from-file "testfile.ss" read))
; following should be time<?, but access times are not updated on some
; file systems, particulary nfs file systems. but we wouldn't expect
; file systems, particularly nfs file systems. but we wouldn't expect
; time to run backwards (except for one hour for DST)
(time<=? $taccess (file-access-time "testfile.ss"))
(begin
Expand Down
6 changes: 3 additions & 3 deletions s/5_3.ss
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
(define flatanh
(or (op-if-entry? cflop1 "(cs)atanh")
; |x| <= 1
; principle expression:
; principal expression:
; (log(1+x)-log(1-x))/2
; should use "log1p" but it doesn't exist on the 88k
(let ([f (lambda (x)
Expand All @@ -219,7 +219,7 @@
(define flasinh
; scheme-coded version needs "log2"
(or (op-if-entry? cflop1 "(cs)asinh")
; prinicple expression:
; principal expression:
; log(x + sqrt(xx + 1))
; avoids spurious overflows
; avoids underflow problems from negative x by using identity
Expand All @@ -236,7 +236,7 @@
; scheme-coded version needs "log2"
(or (op-if-entry? cflop1 "(cs)acosh")
; x >= 1
; prinicple expression:
; principal expression:
; log(x + sqrt(xx - 1))
; avoids spurious overflows
(lambda (x)
Expand Down
Loading

0 comments on commit b8c3631

Please sign in to comment.