;;; -*- Mode: lisp; Package:USER; Base:10 -*-

#+ :3600
(select (or (si:get-release-version)
	    (si:get-system-version))
    (6 (cl:pushnew :version-6 cl:*features*) )
  (otherwise (cl:pushnew :version-7 cl:*features*)))
;#+ :3600
;(defpackage clisp (:use CL))
#+ :3600
(CL:in-package 'clisp ':use 'CL)
#+ :ti
(in-package 'clisp ':use 'lisp)

#+ :ti 
(shadowing-import '(ticl:putprop) 'clisp)

(SHADOW '(tconc putassoc eqmemb mklist pack pack* nconc1 
		u-case eqlength memq assq puthash neq bind) 'clisp)

#+ :ti
(export '(MEMQ ASSQ PUTPROP PUTHASH ADD1 SUB1 NEQ SMALLP MAPRINT
	       NLEFT DREVERSE DREMOVE PACK* PACK NCONC1 NLISTP VALUE-IF-LISTP
	       VALUE-IF-NUMBERP SAFE-GET REPLACE-CONS-PARTS REPLACE-CONS
	       VALUE-IF-TAILP U-CASEP L-CASEP U-CASE CLISPARRAY
	       for while until bind clisp-translate
	       repeatwhile repeatuntil collect join sum
	       always never thereis in on inside from
	       to eachtime $$VAL $$OUT $$LP $$ITERATE
	       FOR WHILE UNTIL BIND CLISP-TRANSLATE
	       REPEATWHILE REPEATUNTIL COLLECT JOIN SUM
	       ALWAYS NEVER THEREIS IN ON INSIDE FROM
	       TO EACHTIME _ TCONC MYPACK*
	       RECORD TYPERECORD PROPRECORD HASHLINK ACCESSFN
	       ACCESSFNS HASHRECORD ATOMRECORD ARRAYRECORD 
	       BLOCKRECORD ASSOCRECORD CACCESSFNS ARRAYBLOCK SYNONYM
	       record typerecord proprecord hashlink accessfn
	       accessfns hashrecord atomrecord arrayrecord 
	       BLOCKRECORD ASSOCRECORD CACCESSFNS ARRAYBLOCK SYNONYM
	       //REPLACE COPYING FETCH FFETCH FREPLACE REUSING
	       SMASHING TYPE? USING //replace copying fetch ffetch freplace
	       reusing smashing type? using OF of WITH with CREATE
	       create INITRECORD initrecord HASHLINK ACCESSFN
	       STRPOSL STRPOS-WITHOUT-WILDCARD SUBSTRING CONCAT
	       NCHARS NTHCHAR NTHCHARCODE CHCON1 CHCON PACKC SUBATOM
	       ASKUSER //push //PUSH //pushnew PUSHLIST pushlist //PUSHNEW
	       PRINT-SPACES
	       MKATOM  swap   SWAP FLENGHT FMEMB FASSOC PUTASSOC
	       TYPENAME EQMEMB MKLIST SETQQ PRIN2 TAB PRINTPARA
	       ARG INTERLISP-NO-SPREAD-ARGS eqlength nlambda-function-p
	       lambda-function-p EQLENGTH NLAMBDA-FUNCTION-P LAMBDA-FUNCTION-P
	       ) 'clisp
	)


#+ :ti 
(GLOBAL:defsystem clisp
    (:name "CLISP")
  (:short-name "CLISP")
  (:pathname-default "clisp:clisp;")
  (:patchable)
  (:module lowlevel  ("franzmacs" "string-functions"))
  (:module iteration ("clispiter"))
  (:compile-load lowlevel)
  (:compile-load iteration
   (:fasload lowlevel)(:fasload lowlevel)))

#+ :version-7
(SCL:defsystem clisp
  (:default-pathname "clisp:clisp;"
   :pretty-name "CLISP System"
   :short-name "clisp"
   :default-package clisp
   :default-module-type :lisp
   :patchable nil
   :initial-status :released
   :advertised-in :herald
   :distribute-sources t
   :distribute-binaries t) 
  (:serial "franzmacs.lisp" "string-functions.lisp" "clispiter.lisp"))

#+ version-6
(loop for x in 
  '("franzmacs" "string-functions" "clispiter")
 do (load (format nil "pet-food:>clisp>~A-6.bin" x)))
   
#+ :version-6 
 (defsystem clisp)
