;; $Id: zip-package.cl,v 1.2 2007/01/10 22:09:56 layer Exp $
;;
;; This software is Copyright (c) Kevin Layer, 2006-2007.
;; You 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),
;; known as the LLGPL.

;; This file defines the package for the `zipcodes' module.

(eval-when (compile eval load) (require :measures))

(defpackage :util.zipcodes
  (:use #:common-lisp #:excl #:util.measures)
  (:export #:*zipcodes*
	   
	   #:zip-p
	   #:zip-code
	   #:zip-state-abbrev
	   #:zip-latitude
	   #:zip-longitude
	   #:zip-city
	   #:zip-state
	   
	   #:location-to-zip
	   
	   ;; Not really needed:
	   #+ignore #:make-zip))

(in-package :util.zipcodes)

(defstruct zip code state-abbrev location city state)

(defmethod print-object ((zip zip) stream)
  (format stream "#<zip ~a (~@[~a, ~]~a): ~a>"
	  (zip-code zip) (zip-city zip) (zip-state zip)
	  (zip-location zip)))
