X-Git-Url: http://git.kpe.io/?p=reversi.git;a=blobdiff_plain;f=edge-table-storage.lisp;h=035656e732a3806ebe2f9b73c3db0a648f5be329;hp=d09f4166aeea8ee23859da69464b7b18693cb734;hb=d92820d39c18a373611b5bfb018631cffe3e4bcd;hpb=5c954ef78b1ea675a6f3f12c118b053665a38f39 diff --git a/edge-table-storage.lisp b/edge-table-storage.lisp index d09f416..035656e 100644 --- a/edge-table-storage.lisp +++ b/edge-table-storage.lisp @@ -7,16 +7,16 @@ ;;;; Programer: Kevin Rosenberg ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: edge-table-storage.lisp,v 1.3 2002/10/25 12:39:15 kevin Exp $ +;;;; $Id: edge-table-storage.lisp,v 1.5 2003/06/17 05:47:18 kevin Exp $ ;;;; -;;;; This file is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; ;;;; Reversi users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;;*************************************************************************** -(in-package :reversi) +(in-package #:reversi) (defparameter *et-path* nil) @@ -35,7 +35,8 @@ :name "edge-table" :type "dat")))) - (defun store-edge-table (et &optional (path *et-path*)) + (defun store-edge-table (et &optional (path *et-path*)) + (declare (type edge-table et)) (with-open-file (stream path :direction :output :if-exists :supersede) (print (length et) stream) @@ -48,10 +49,11 @@ (with-open-file (stream path :direction :input) (let* ((length (read stream)) (et (make-array length :element-type 'fixnum))) - (dotimes (i length) - (declare (fixnum i)) - (setf (aref et i) (read stream))) - et)))) + (declare (type (simple-array fixnum (*)) et)) + (dotimes (i length) + (declare (fixnum i)) + (setf (aref et i) (read stream))) + et)))) (unless (probe-file *et-path*) (format *trace-output* ";; Recompiling edge-table, this make take several minutes")