/[meta-cvs]/meta-cvs/F-FFF16CA4956A36F19290AC9E1EBAFFD8
ViewVC logotype

Diff of /meta-cvs/F-FFF16CA4956A36F19290AC9E1EBAFFD8

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.49 by kaz, Sun Oct 6 08:17:28 2002 UTC revision 1.49.2.1 by kaz, Mon Oct 21 04:46:05 2002 UTC
# Line 258  the external form that is written out to Line 258  the external form that is written out to
258                    (otherwise (error "unknown mapping entry type ~s." kind)))))                    (otherwise (error "unknown mapping entry type ~s." kind)))))
259            filemap))            filemap))
260    
261  (defun mapping-read (filename &key sanity-check)  (defun mapping-read-raw-map (stream)
262      (let ((map (read stream nil :error)))
263        (if (or (eq map :error)
264                  (and (not (consp map)) (not (null map))))
265          (malformed-map)
266          map)))
267    
268    (defun mapping-read (source &key sanity-check)
269  "Reads a Meta-CVS from a file, optionally performing a check  "Reads a Meta-CVS from a file, optionally performing a check
270  for duplicate entries"  for duplicate entries"
271    (let (filemap)    (let (filemap)
# Line 266  for duplicate entries" Line 273  for duplicate entries"
273      ;; Read the raw data, ensure that the file contains      ;; Read the raw data, ensure that the file contains
274      ;; a Lisp object and that it's a list, or at least a cons.      ;; a Lisp object and that it's a list, or at least a cons.
275      ;;      ;;
276      (with-open-file (file filename :direction :input)      (if (streamp source)
277        (setf filemap (read file nil :error))        (setf filemap (mapping-read-raw-map source))
278        (when (or (eq filemap :error)        (with-open-file (stream source :direction :input)
279                  (and (not (consp filemap)) (not (null filemap))))          (setf filemap (mapping-read-raw-map stream))))
         (malformed-map)))  
280      ;;      ;;
281      ;; Distinguish between the old-style Meta-CVS map and      ;; Distinguish between the old-style Meta-CVS map and
282      ;; the new one. The old one is a list of lists of strings.      ;; the new one. The old one is a list of lists of strings.

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.49.2.1

  ViewVC Help
Powered by ViewVC 1.1.5