/[meta-cvs]/meta-cvs/F-396AC90CF9764F6D317C43BA46376C96.lisp
ViewVC logotype

Contents of /meta-cvs/F-396AC90CF9764F6D317C43BA46376C96.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Nov 24 04:53:50 2006 UTC (7 years, 5 months ago) by kaz
Branch: MAIN
CVS Tags: asdf-import-branch~merged-to-HEAD-0, mcvs-1-1-98, asdf-import-branch~branch-point, HEAD
Branch point for: asdf-import-branch
Changes since 1.3: +1 -1 lines
Stylistic change.

* code/add.lisp: Change in-package calls not to use the all-caps
"META-CVS" string string, but rather the :meta-cvs keyword.
* code/branch.lisp: Likewise.
* code/chatter.lisp: Likewise.
* code/checkout.lisp: Likewise.
* code/clisp-unix.lisp: Likewise.
* code/cmucl-unix.lisp: Likewise.
* code/convert.lisp: Likewise.
* code/create.lisp: Likewise.
* code/dirwalk.lisp: Likewise.
* code/error.lisp: Likewise.
* code/execute.lisp: Likewise.
* code/filt.lisp: Likewise.
* code/find-bind.lisp: Likewise.
* code/generic.lisp: Likewise.
* code/grab.lisp: Likewise.
* code/link.lisp: Likewise.
* code/main.lisp: Likewise.
* code/mapping.lisp: Likewise.
* code/memoize.lisp: Likewise.
* code/move.lisp: Likewise.
* code/multi-hash.lisp: Likewise.
* code/options.lisp: Likewise.
* code/paths.lisp: Likewise.
* code/print.lisp: Likewise.
* code/prop.lisp: Likewise.
* code/purge.lisp: Likewise.
* code/rcs-utils.lisp: Likewise.
* code/remap.lisp: Likewise.
* code/remove.lisp: Likewise.
* code/restart.lisp: Likewise.
* code/restore.lisp: Likewise.
* code/seqfuncs.lisp: Likewise.
* code/slot-refs.lisp: Likewise.
* code/split.lisp: Likewise.
* code/sync.lisp: Likewise.
* code/types.lisp: Likewise.
* code/unix.lisp: Likewise.
* code/update.lisp: Likewise.
* code/watch.lisp: Likewise.
1 ;;; This source file is part of the Meta-CVS program,
2 ;;; which is distributed under the GNU license.
3 ;;; Copyright 2002 Kaz Kylheku
4
5 (in-package :meta-cvs)
6
7 (defclass multi-hash ()
8 ((dimensions :initarg :dimensions :accessor dimensions)
9 (root-hash :initform nil)
10 (tests :initform nil :initarg :tests :accessor tests)))
11
12 (defmethod initialize-instance :after ((h multi-hash) &rest stuff)
13 (declare (ignore stuff))
14 (with-slots (dimensions root-hash tests) h
15 (setf root-hash (make-hash-table :test (or (first tests) #'eql)))))
16
17 (defmacro multi-hash-common-code (setf-p)
18 `(with-slots (dimensions root-hash tests) multi-hash
19 (do* ((i 0 (1+ i))
20 (next-hash nil (or (gethash (first arg) current-hash)
21 ,(if setf-p
22 `(setf (gethash (first arg) current-hash)
23 (make-hash-table :test (or (nth i tests)
24 #'eql)))
25 `(return (values nil nil)))))
26 (arg args (rest arg))
27 (current-hash root-hash next-hash))
28 ((= i (1- dimensions))
29 ,(if setf-p
30 `(setf (gethash (first arg) current-hash) (second arg))
31 `(gethash (first arg) current-hash))))))
32
33 (defun get-multi-hash (multi-hash &rest args)
34 (multi-hash-common-code nil))
35
36 (defun set-multi-hash (multi-hash &rest args)
37 (multi-hash-common-code t))
38
39 (defsetf get-multi-hash set-multi-hash)

  ViewVC Help
Powered by ViewVC 1.1.5