Skip to content

Commit 6c3faff

Browse files
committed
Global whitespace normalization
1 parent f821e3b commit 6c3faff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2191
-2191
lines changed

contrib/sb-concurrency/queue.lisp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ sequence enqueued."
5353
(loop with tail = (queue-tail queue)
5454
do (setf (node-next node) tail)
5555
(when (eq tail
56-
(setf tail
57-
(sb-ext:compare-and-swap (queue-tail queue)
58-
tail node)))
56+
(setf tail
57+
(sb-ext:compare-and-swap (queue-tail queue)
58+
tail node)))
5959
(setf (node-prev tail) node)
6060
(return value)))))
6161

contrib/sb-posix/posix-tests.lisp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@
174174
(typep
175175
(sb-posix:syscall-errno c)
176176
'(member
177-
#+darwin
178-
#.sb-posix:eisdir
179-
#+win32
180-
#.sb-posix::eacces
181-
#+win32
182-
#.sb-posix::enotempty
183-
#+sunos
184-
#.sb-posix::einval
185-
#-(or darwin win32 sunos)
186-
#.sb-posix::ebusy)))) t)
177+
#+darwin
178+
#.sb-posix:eisdir
179+
#+win32
180+
#.sb-posix::eacces
181+
#+win32
182+
#.sb-posix::enotempty
183+
#+sunos
184+
#.sb-posix::einval
185+
#-(or darwin win32 sunos)
186+
#.sb-posix::ebusy)))) t)
187187

188188
(deftest rmdir.error.4
189189
(let* ((dir (ensure-directories-exist

contrib/sb-simple-streams/simple-stream-tests.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,8 @@ Nothing to see here, move along.")
942942
:endian-swap :network-order)
943943
(aref b 0))))
944944
(with-open-file (stream
945-
(merge-pathnames #P"lp491087.txt"
946-
*test-path*) :class 'file-simple-stream)
945+
(merge-pathnames #P"lp491087.txt"
946+
*test-path*) :class 'file-simple-stream)
947947
(let* ((start (file-position stream))
948948
(integer (read-big-int stream))
949949
(end (file-position stream)))

contrib/sb-sprof/sb-sprof.lisp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -510,27 +510,27 @@ profiling")
510510

511511
(progn
512512
(declaim (inline win32-suspend-get-context win32-resume)
513-
(optimize (speed 3) (safety 0)))
513+
(optimize (speed 3) (safety 0)))
514514

515515
(define-alien-routine win32-suspend-get-context
516-
system-area-pointer
516+
system-area-pointer
517517
(os-thread (unsigned #.sb-vm:n-word-bits)))
518518

519519
(define-alien-routine win32-resume void
520520
(context system-area-pointer))
521521

522522
(defmacro with-thread-context ((sap-variable thread) &body body)
523523
`(without-gcing
524-
(let ((,sap-variable (win32-suspend-get-context
525-
(sb-thread::thread-os-thread ,thread))))
526-
(unwind-protect ((lambda () ,@body))
527-
(win32-resume ,sap-variable)))))
524+
(let ((,sap-variable (win32-suspend-get-context
525+
(sb-thread::thread-os-thread ,thread))))
526+
(unwind-protect ((lambda () ,@body))
527+
(win32-resume ,sap-variable)))))
528528
(defmacro with-os-thread-context ((sap-variable os-thread) &body body)
529529
`(without-gcing
530-
(let ((,sap-variable (win32-suspend-get-context ,os-thread)))
531-
(unless (sap= ,sap-variable (int-sap 0))
532-
(unwind-protect ((lambda () ,@body))
533-
(win32-resume ,sap-variable)))))))
530+
(let ((,sap-variable (win32-suspend-get-context ,os-thread)))
531+
(unless (sap= ,sap-variable (int-sap 0))
532+
(unwind-protect ((lambda () ,@body))
533+
(win32-resume ,sap-variable)))))))
534534

535535
;; Ensure that only one thread at a time will be doing profiling stuff.
536536
(defvar *profiler-lock* (sb-thread:make-mutex :name "Statistical Profiler"))
@@ -546,28 +546,28 @@ profiling")
546546
(defun thread-distribution-handler ()
547547
(declare (optimize sb-c::merge-tail-calls))
548548
(#-win32 when #-win32 *sampling* #+win32 let #+win32 ((*sampling* t))
549-
#+sb-thread
550-
(let ((lock *distribution-lock*))
551-
;; Don't flood the system with more interrupts if the last
552-
;; set is still being delivered.
553-
(unless (sb-thread:mutex-value lock)
554-
(sb-thread::with-system-mutex (lock)
555-
(dolist (thread (profiled-threads))
556-
;; This may occasionally fail to deliver the signal, but that
557-
;; seems better then using kill_thread_safely with it's 1
558-
;; second backoff.
559-
(let ((os-thread (sb-thread::thread-os-thread thread)))
560-
(when os-thread
561-
#+win32
562-
(with-os-thread-context (scp os-thread)
563-
(sigprof-handler 0 0 scp :self thread))
564-
#-win32
565-
(pthread-kill os-thread sb-unix:sigprof)))))))
566-
#-sb-thread
567-
(unix-kill 0 sb-unix:sigprof)))
549+
#+sb-thread
550+
(let ((lock *distribution-lock*))
551+
;; Don't flood the system with more interrupts if the last
552+
;; set is still being delivered.
553+
(unless (sb-thread:mutex-value lock)
554+
(sb-thread::with-system-mutex (lock)
555+
(dolist (thread (profiled-threads))
556+
;; This may occasionally fail to deliver the signal, but that
557+
;; seems better then using kill_thread_safely with it's 1
558+
;; second backoff.
559+
(let ((os-thread (sb-thread::thread-os-thread thread)))
560+
(when os-thread
561+
#+win32
562+
(with-os-thread-context (scp os-thread)
563+
(sigprof-handler 0 0 scp :self thread))
564+
#-win32
565+
(pthread-kill os-thread sb-unix:sigprof)))))))
566+
#-sb-thread
567+
(unix-kill 0 sb-unix:sigprof)))
568568

569569
(defun sigprof-handler (signal code scp
570-
#+win32 &key #+win32 (self sb-thread:*current-thread*))
570+
#+win32 &key #+win32 (self sb-thread:*current-thread*))
571571
(declare (ignore signal code) (optimize speed (space 0))
572572
(disable-package-locks sb-di::x86-call-context)
573573
(muffle-conditions compiler-note)
@@ -597,15 +597,15 @@ profiling")
597597
(with-alien ((scp (* os-context-t) :local scp))
598598
(let* ((pc-ptr (sb-vm:context-pc scp))
599599
(fp (sb-vm::context-register scp #.sb-vm::ebp-offset))
600-
(sp (sb-vm::context-register scp #.sb-vm::esp-offset)))
600+
(sp (sb-vm::context-register scp #.sb-vm::esp-offset)))
601601
;; foreign code might not have a useful frame
602602
;; pointer in ebp/rbp, so make sure it looks
603603
;; reasonable before walking the stack
604604
(unless
605-
#+win32
606-
(> 1024000 (- fp sp) 0)
607-
#-win32
608-
(sb-di::control-stack-pointer-valid-p (sb-sys:int-sap fp))
605+
#+win32
606+
(> 1024000 (- fp sp) 0)
607+
#-win32
608+
(sb-di::control-stack-pointer-valid-p (sb-sys:int-sap fp))
609609
(record samples pc-ptr)
610610
(return-from sigprof-handler nil))
611611
(incf (samples-trace-count samples))

make-genesis-1a.lisp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
(read s)))
1414

1515
#!-sb-dynamic-core
16-
(progn
16+
(progn
1717
(host-load-stem "src/compiler/generic/genesis" nil)
1818
(sb!vm:genesis :object-file-names *target-object-file-names*
19-
:c-header-dir-name "output/genesis-1a"
20-
:symbol-table-file-name "src/runtime/sbcl-own.nm")
19+
:c-header-dir-name "output/genesis-1a"
20+
:symbol-table-file-name "src/runtime/sbcl-own.nm")
2121

2222
;; The map file is not needed by the system, but can be
2323
;; very handy when debugging cold init problems.
@@ -28,18 +28,18 @@
2828
(let ((sb!fasl::*cold-foreign-symbol-table* (make-hash-table :test 'equal)))
2929
(sb!fasl::load-cold-foreign-symbol-table "src/runtime/mangled-stuff.nm")
3030
(loop for name being each hash-key of sb!fasl::*cold-foreign-symbol-table*
31-
for at-pos = (position #\@ name :from-end t)
32-
when at-pos
33-
do (let ((demangled-name (subseq name 0 at-pos)))
34-
(setf (gethash (subseq demangled-name 1) *mangled-names*)
35-
(subseq name 1)))))
31+
for at-pos = (position #\@ name :from-end t)
32+
when at-pos
33+
do (let ((demangled-name (subseq name 0 at-pos)))
34+
(setf (gethash (subseq demangled-name 1) *mangled-names*)
35+
(subseq name 1)))))
3636

3737
(with-open-file (undefs "src/runtime/gen1a-undefs" :direction :output
38-
:if-does-not-exist :create :if-exists :supersede)
38+
:if-does-not-exist :create :if-exists :supersede)
3939
(let ((n 0))
4040
(dolist (symbol sb!fasl::*cold-foreign-undefined-symbols*)
41-
(format undefs "FOREIGN_REFERENCE(~A)~%"
42-
(gethash symbol *mangled-names* symbol))))))
41+
(format undefs "FOREIGN_REFERENCE(~A)~%"
42+
(gethash symbol *mangled-names* symbol))))))
4343

4444
#+cmu (ext:quit)
4545
#+clisp (ext:quit)

package-data-list.lisp-expr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ of SBCL which maintained the CMU-CL-style split into two packages.)"
5959
"UNLOAD-SHARED-OBJECT"
6060
"UNSIGNED"
6161
"UNSIGNED-CHAR" "UNSIGNED-INT" "UNSIGNED-LONG" "UNSIGNED-LONG-LONG" "UNSIGNED-SHORT"
62-
"UNSIGNED-ALIEN-WORD" "SIGNED-ALIEN-WORD"
62+
"UNSIGNED-ALIEN-WORD" "SIGNED-ALIEN-WORD"
6363
"UTF8-STRING"
6464
"VOID"
6565
"WITH-ALIEN"))

src/assembly/x86/assem-rtns.lisp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@
379379
;; targets. Hence the following disaster.
380380

381381
;; Kovalenko: I had to reimplement it in x86-assem.S anyway, in order
382-
;; to satisfy DEP restriction on SEH handler location.
383-
;;
382+
;; to satisfy DEP restriction on SEH handler location.
383+
;;
384384
;; #!+#.(cl:if (cl:member sb-assembling cl:*features*) win32 '(or))
385385
#|
386386
(define-assembly-routine

src/code/fd-stream.lisp

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
;; units are (normally) 64K. There are at least three reasonable
8383
;; choices: switch to malloc(), increase the size, arrange for some
8484
;; kind of sharing a single VA block among buffers. Throwing away
85-
;; 15/16 of the buffer seems extremely unwise; applies to 7/8 too.
86-
85+
;; 15/16 of the buffer seems extremely unwise; applies to 7/8 too.
86+
8787
#!+win32 (* 64 1024)
8888
#!+sb-doc
8989
"Default number of bytes per buffer.")
@@ -304,12 +304,12 @@
304304
;; thread might have moved head...
305305
(setf (buffer-head obuf) (+ count head))
306306
(queue-or-wait))
307-
#!-win32
307+
#!-win32
308308
((eql errno sb!unix:ewouldblock)
309309
;; Blocking, queue or wair.
310310
(queue-or-wait))
311-
;; if interrupted on win32, just try again
312-
#!+win32 ((eql errno sb!unix:eintr))
311+
;; if interrupted on win32, just try again
312+
#!+win32 ((eql errno sb!unix:eintr))
313313
(t
314314
(simple-stream-perror "Couldn't write to ~s"
315315
stream errno)))))))))))))
@@ -2539,59 +2539,59 @@
25392539
(setf *available-buffers* nil)))
25402540
(with-output-to-string (*error-output*)
25412541
(let ((ttyname #.(coerce "/dev/tty" 'simple-base-string))
2542-
(stdstream-vars '(*stdin* *stdout* *stderr* *tty*)))
2542+
(stdstream-vars '(*stdin* *stdout* *stderr* *tty*)))
25432543
#!+win32 (declare (ignorable ttyname))
25442544
(loop for fd in '(0 1 2 nil)
2545-
and auto-close-p in '(nil nil nil t)
2546-
and stream-var in stdstream-vars
2547-
and direction in '(:input :output :output :io)
2548-
and name in '("standard input"
2549-
"standard output"
2550-
"standard error"
2551-
"the terminal")
2552-
do
2553-
(let ((outputp (not (eq direction :input)))
2554-
(inputp (not (eq direction :output))))
2555-
(unless fd
2556-
#!+win32
2557-
(multiple-value-bind (keyboard screen)
2558-
(sb!win32::make-console-fds)
2559-
(setf (symbol-value stream-var)
2560-
(make-two-way-stream
2561-
(if keyboard
2562-
(make-fd-stream keyboard :name name :input t
2563-
:element-type :default :buffering :line
2564-
:auto-close auto-close-p
2565-
:external-format :ucs-2)
2566-
*stdin*)
2567-
(if screen
2568-
(make-fd-stream screen :name name :output t
2569-
:element-type :default :buffering :line
2570-
:auto-close auto-close-p
2571-
:external-format :ucs-2)
2572-
*stdout*)))
2573-
(return))
2574-
#!-win32
2575-
(setf fd (sb!unix:unix-open ttyname sb!unix:o_rdwr 0)))
2576-
(setf (symbol-value stream-var)
2577-
(if fd
2578-
(make-fd-stream fd
2579-
:name name
2580-
:input inputp
2581-
:output outputp
2582-
:buffering :line
2583-
:element-type :default
2584-
#!-win32 :serve-events #!-win32 inputp
2585-
:auto-close auto-close-p
2586-
:external-format
2587-
(or
2588-
#!+win32
2589-
(let ((handle (sb!win32:get-osfhandle fd)))
2590-
(when (and (/= handle -1)
2591-
(logbitp 0 handle)
2592-
(logbitp 1 handle)) :ucs-2))
2593-
(stdstream-external-format outputp)))
2594-
(make-two-way-stream *stdin* *stdout*))))))
2545+
and auto-close-p in '(nil nil nil t)
2546+
and stream-var in stdstream-vars
2547+
and direction in '(:input :output :output :io)
2548+
and name in '("standard input"
2549+
"standard output"
2550+
"standard error"
2551+
"the terminal")
2552+
do
2553+
(let ((outputp (not (eq direction :input)))
2554+
(inputp (not (eq direction :output))))
2555+
(unless fd
2556+
#!+win32
2557+
(multiple-value-bind (keyboard screen)
2558+
(sb!win32::make-console-fds)
2559+
(setf (symbol-value stream-var)
2560+
(make-two-way-stream
2561+
(if keyboard
2562+
(make-fd-stream keyboard :name name :input t
2563+
:element-type :default :buffering :line
2564+
:auto-close auto-close-p
2565+
:external-format :ucs-2)
2566+
*stdin*)
2567+
(if screen
2568+
(make-fd-stream screen :name name :output t
2569+
:element-type :default :buffering :line
2570+
:auto-close auto-close-p
2571+
:external-format :ucs-2)
2572+
*stdout*)))
2573+
(return))
2574+
#!-win32
2575+
(setf fd (sb!unix:unix-open ttyname sb!unix:o_rdwr 0)))
2576+
(setf (symbol-value stream-var)
2577+
(if fd
2578+
(make-fd-stream fd
2579+
:name name
2580+
:input inputp
2581+
:output outputp
2582+
:buffering :line
2583+
:element-type :default
2584+
#!-win32 :serve-events #!-win32 inputp
2585+
:auto-close auto-close-p
2586+
:external-format
2587+
(or
2588+
#!+win32
2589+
(let ((handle (sb!win32:get-osfhandle fd)))
2590+
(when (and (/= handle -1)
2591+
(logbitp 0 handle)
2592+
(logbitp 1 handle)) :ucs-2))
2593+
(stdstream-external-format outputp)))
2594+
(make-two-way-stream *stdin* *stdout*))))))
25952595
(princ (get-output-stream-string *error-output*) *stderr*))
25962596
(values))
25972597

src/code/filesys.lisp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@
302302
(unless existsp
303303
(when (sb!win32:close-handle
304304
(sb!win32:create-file filename 0
305-
(logior sb!win32::file-share-read
306-
sb!win32::file-share-write) nil
307-
sb!win32:file-open-existing
308-
0 0))
305+
(logior sb!win32::file-share-read
306+
sb!win32::file-share-write) nil
307+
sb!win32:file-open-existing
308+
0 0))
309309
(setf existsp t)
310310
(let* ((attributes (sb!win32:get-file-attributes filename))
311311
(valid-attributes

0 commit comments

Comments
 (0)