Changeset 4
- Timestamp:
- 02/09/2008 09:24:02 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 edited
-
COPYING (added)
-
COPYING.LESSER (added)
-
csv.lisp (modified) (3 diffs)
-
dso-csv.asd (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/csv.lisp
r2 r4 1 1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp -*- 2 3 #| 4 Copyright (C) 2007, 2008 David Owen <dsowen@fugue88.ws> 5 6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU Lesser Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU Lesser Public License for more details. 15 16 You should have received a copy of the GNU Lesser Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 |# 2 19 3 20 (defpackage #:dso-csv … … 14 31 15 32 16 (flet ((trim (s) ( substring s :start 1 :length (- (length s) 2))))33 (flet ((trim (s) (dso-parse::substring s :start 1 :length (- (length s) 2)))) 17 34 (defun un-squote (s) 18 35 (cl-ppcre:regex-replace-all "''" (trim s) "'")) … … 59 76 (file (+ row)) 60 77 (row (t-value (* row-rest) (= t-newline)) 61 (lambda (row) (cons (caar row) (mapcar #'second (second row)))))62 (row-rest ((= t-comma) t-value) car))78 :filter (lambda (row) (cons (caar row) (mapcar #'second (second row))))) 79 (row-rest ((= t-comma) t-value) :filter car)) 63 80 64 81 -
trunk/dso-csv.asd
r1 r4 2 2 3 3 #| 4 Copyright (C) 2007 David Owen <dsowen@fugue88.ws>4 Copyright (C) 2007, 2008 David Owen <dsowen@fugue88.ws> 5 5 6 This library is free software; you can redistribute it and/or7 modify it under the terms of the GNU Lesser General Public 8 License as published by the Free Software Foundation; either9 version 2.1 of the License, or(at your option) any later version.6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU Lesser Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 10 11 This libraryis distributed in the hope that it will be useful,11 This program is distributed in the hope that it will be useful, 12 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14 Lesser GeneralPublic License for more details.13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU Lesser Public License for more details. 15 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 You should have received a copy of the GNU Lesser Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 19 18 |# 20 19
Note: See TracChangeset
for help on using the changeset viewer.
