Permalink
Browse files

lowercasing things that were uppercase (mostly T->t) to help with ACL…

… support
  • Loading branch information...
1 parent 01f5b4c commit fd6c8085ee8652e13c11778c4d9d954c72a31762 @bobbysmith007 bobbysmith007 committed Sep 28, 2012
Showing with 13 additions and 13 deletions.
  1. +3 −3 clsql.lisp
  2. +4 −4 csv.lisp
  3. +2 −2 data-table.lisp
  4. +3 −3 tests/csv.lisp
  5. +1 −1 tests/speed.lisp
View
@@ -13,7 +13,7 @@
(defun export-query ( sql &key stream path)
(with-csv-output-stream (s (or stream path))
(multiple-value-bind (rows cols)
- (clsql:query sql :flatp T)
+ (clsql:query sql :flatp t)
(write-csv-row cols :stream s)
(write-csv rows :stream s))))
@@ -69,15 +69,15 @@
(funcall importer row)
(incf row-num)))
(funcall log-fn "Starting import")
- (cl-csv:read-csv file :skip-first-p T :row-fn #'row-fn)
+ (cl-csv:read-csv file :skip-first-p t :row-fn #'row-fn)
(log-progress "Finished, total processed: ")))))
(defun serial-import-from-csv (table-name
&key file
(column-names :first-row)
(schema "public") (column-transform
#'data-table::english->postgres)
- (progress-stream T) (progress-mod 5000)
+ (progress-stream t) (progress-mod 5000)
(data-munger (lambda (row)
(mapcar #'clsql-helper:format-value-for-database
row)))
View
@@ -52,7 +52,7 @@
((or float ratio) (format nil "~F" val))
(string val)
(null "")
- (T (princ-to-string val))))
+ (t (princ-to-string val))))
(defun %char-in (c to-check)
(typecase to-check
@@ -118,7 +118,7 @@ always-quote: Defaults to *always-quote*"
(pathname
(values
(open stream-or-string :direction :output :if-exists :supersede)
- T))))
+ t))))
(defun write-csv-row (items
&key
@@ -282,7 +282,7 @@ always-quote: Defaults to *always-quote*"
(:collecting-quoted
(store-char #\newline)
(read-line-in))
- (T (finish-item) (return items))))
+ (t (finish-item) (return items))))
;; the next characters are an escape sequence, start skipping
((and (or (eql state :collecting-quoted)
@@ -311,7 +311,7 @@ always-quote: Defaults to *always-quote*"
(:collecting
(csv-parse-error "we are reading non quoted csv data and found a quote at ~D~%~A"
i line))))
- (T
+ (t
(ecase state
(:waiting
(unless (white-space? c)
View
@@ -1,6 +1,6 @@
(cl:in-package :cl-csv)
-(defun get-data-table-from-csv (file &optional (has-column-names t) (munge-types T) sample
+(defun get-data-table-from-csv (file &optional (has-column-names t) (munge-types t) sample
&aux (dt (make-instance 'data-table:data-table)))
"Gets a data-table object representing the CSV"
(cl-csv::with-csv-input-stream (in-stream file)
@@ -21,7 +21,7 @@
:stream stream))
(defun get-data-table-from-csv-list
- (list &optional (has-column-names t) (munge-types T) sample
+ (list &optional (has-column-names t) (munge-types t) sample
&aux (dt (make-instance 'data-table:data-table)))
"Create a data-table from the parsed csv as lisp lists"
(flet ((map-fn (row) (mapcar #'data-table::trim-and-nullify row)))
View
@@ -75,7 +75,7 @@ D. \"\"Ma'am, ma'am\ ma'am!\"\"\",A")
(assert-equal *test-csv1-rows* (read-csv *test-csv1-v2*)))
(define-test writing-1
- (assert-equal *test-csv1* (write-csv *test-csv1-rows* :always-quote T)))
+ (assert-equal *test-csv1* (write-csv *test-csv1-rows* :always-quote t)))
(define-test parsing-errors
(assert-error 'csv-parse-error
@@ -92,7 +92,7 @@ D. \"\"Ma'am, ma'am\ ma'am!\"\"\",A")
(define-test no-trailing-parse
(let* ((data (read-csv *test-csv-no-trailing-newline*))
- (str (write-csv data :always-quote T))
+ (str (write-csv data :always-quote t))
(data2 (read-csv str)))
(assert-equal 2 (length data))
(assert-equal 5 (length (first data)))
@@ -101,7 +101,7 @@ D. \"\"Ma'am, ma'am\ ma'am!\"\"\",A")
(define-test data-with-newlines
(let* ((data (read-csv *test-csv-data-with-newlines*))
- (str (write-csv data :always-quote T))
+ (str (write-csv data :always-quote t))
(data2 (read-csv str)))
(assert-equal 2 (length data))
(assert-equal 5 (length (first data)))
View
@@ -12,7 +12,7 @@
(apply #'format *standard-output* message args)
(format *standard-output* "~%"))
-(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
+(eval-when (:compile-toplevel :load-toplevel :execute)
(defmacro log-around ((log-name message &rest args) &body body)
"Logs the beginning and end of a body. ARGS are evaluated twice"
(let ((gmessage (gensym "GMESSAGE-")))

0 comments on commit fd6c808

Please sign in to comment.