(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "CL") (IL:FILECREATED "16-Apr-2018 22:46:19"  IL:|{DSK}kaplan>Local>medley3.5>lispcore>sources>CMLMODULES.;2| 3470 IL:|changes| IL:|to:| (IL:FUNCTIONS REQUIRE) IL:|previous| IL:|date:| "12-Jun-90 16:56:18" IL:|{DSK}kaplan>Local>medley3.5>lispcore>sources>CMLMODULES.;1|) ; Copyright (c) 1986, 1987, 1988, 1990, 2018 by Venue & Xerox Corporation. All rights reserved. (IL:PRETTYCOMPRINT IL:CMLMODULESCOMS) (IL:RPAQQ IL:CMLMODULESCOMS ((IL:VARIABLES *MODULES*) (IL:FUNCTIONS PROVIDE REQUIRE) (IL:PROP IL:FILETYPE IL:CMLMODULES) (IL:PROP IL:MAKEFILE-ENVIRONMENT IL:CMLMODULES))) (DEFVAR *MODULES* NIL "A list of all modules currently provided to the system.") (DEFUN PROVIDE (MODULE-NAME) "Declare that module-name is provided to the system." (DECLARE (SPECIAL *MODULES*)) (IF (SYMBOLP MODULE-NAME) (SETQ MODULE-NAME (SYMBOL-NAME MODULE-NAME))) (PUSHNEW MODULE-NAME *MODULES* :TEST #'STRING=) MODULE-NAME) (DEFUN REQUIRE (MODULE-NAME &OPTIONAL (PATHNAME NIL)) (IL:* IL:|;;|  "Rewritten by Ron Kaplan, April 2018. Commonlisp search logic was complicated and broken") (IL:* IL:|;;| "Declare that module-name is needed. If already loaded do nothing. If not, load using the pathname, which is a single pathname or list of pathnames. If pathname is not provided use the system default paths ( and directories).") (DECLARE (SPECIAL *MODULES* *DEFAULT-PATHNAME-DEFAULTS* IL:DIRECTORIES IL:*COMPILED-EXTENSIONS*)) (UNLESS (MEMBER MODULE-NAME *MODULES* :TEST #'STRING=) (LET (FOUND (SEARCHPATHS (CONS (NAMESTRING *DEFAULT-PATHNAME-DEFAULTS*) IL:DIRECTORIES))) (IL:* IL:\;  "default is connected directory") (IL:* IL:\;  "maybe final try should be home?") (DOLIST (PATHNAME (ETYPECASE PATHNAME (NULL (LIST MODULE-NAME)) ((OR SYMBOL STRING PATHNAME) (LIST PATHNAME)) (LIST PATHNAME)) T) (SETQ PATHNAME (NAMESTRING PATHNAME)) (OR (IL:* IL:\;  "first look for a compiled file, then source") (SETQ FOUND (IL:FINDFILE-WITH-EXTENSIONS PATHNAME SEARCHPATHS IL:*COMPILED-EXTENSIONS*)) (SETQ FOUND (IL:FINDFILE PATHNAME SEARCHPATHS)) (CERROR "Don't load file ~S~*." "Can't find file ~S for required module ~S." PATHNAME MODULE-NAME)) (IL:* IL:|;;| "LOAD? loads only if not already loaded or FOUND is newer") (IL:LOAD? FOUND))))) (IL:PUTPROPS IL:CMLMODULES IL:FILETYPE :COMPILE-FILE) (IL:PUTPROPS IL:CMLMODULES IL:MAKEFILE-ENVIRONMENT (:READTABLE "XCL" :PACKAGE "CL")) (IL:PUTPROPS IL:CMLMODULES IL:COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1988 1990 2018)) (IL:DECLARE\: IL:DONTCOPY (IL:FILEMAP (NIL (857 1132 (PROVIDE 857 . 1132)) (1134 3188 (REQUIRE 1134 . 3188))))) IL:STOP