(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) (FILECREATED "16-May-90 13:06:35" {DSK}local>lde>lispcore>sources>CMLDOC.;2 3285 changes to%: (VARS CMLDOCCOMS) previous date%: "19-Mar-87 12:29:50" {DSK}local>lde>lispcore>sources>CMLDOC.;1) (* ; " Copyright (c) 1986, 1987, 1990 by Venue & Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT CMLDOCCOMS) (RPAQQ CMLDOCCOMS ( (* ;;; "Documentation strings") (VARIABLES *DOCUMENTATION-HASH-TABLE*) (FUNCTIONS CL:DOCUMENTATION HASH-TABLE-FOR-DOC-TYPE SET-DOCUMENTATION) (SETFS CL:DOCUMENTATION) (* ;; "Use the proper compiler") (PROP FILETYPE CMLDOC))) (* ;;; "Documentation strings") (DEFGLOBALVAR *DOCUMENTATION-HASH-TABLE* (* ;;; "This is the repository for all documentation strings in the system. It is a two-level hash-table scheme, just like *definition-hash-table*. At the first level, *DOCUMENTATION-HASH-TABLE* maps the symbols that name documentation-types into a separate hash table for each type. Those tables map names into the documentation strings for those names. The first-level table uses an EQ test while the second-level ones use CL:EQUAL.") (* ;; "The hash-table is initialized to have second-level tables for each of the required documentation types.") (LET ((CL::HT (CL:MAKE-HASH-TABLE :TEST 'EQ :SIZE 10 :REHASH-SIZE 5))) [FOR TYPE-LIST IN '((TYPES TYPE) (SETFS CL:SETF) (STRUCTURES CL:STRUCTURE RECORD RECORDS) (FUNCTIONS CL:FUNCTION FN FNS) (VARIABLES CL:VARIABLE VAR VARS)) DO (LET ((TABLE (CL:MAKE-HASH-TABLE :TEST 'CL:EQUAL :SIZE 50 :REHASH-SIZE 50))) (FOR TYPE IN TYPE-LIST DO (CL:SETF (CL:GETHASH TYPE CL::HT) TABLE] CL::HT)) (CL:DEFUN CL:DOCUMENTATION (NAME DOC-TYPE) (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE))) (CL:DEFUN HASH-TABLE-FOR-DOC-TYPE (DOC-TYPE) (OR (GETHASH DOC-TYPE *DOCUMENTATION-HASH-TABLE*) (AND FILEPKGFLG (GETHASH (SETQ DOC-TYPE (GETFILEPKGTYPE DOC-TYPE 'TYPE)) (* ;;  "note that GETFILEPKGTYPE will signal an error if it doesn't recognize the type.") *DOCUMENTATION-HASH-TABLE*)) (CL:SETF (GETHASH DOC-TYPE *DOCUMENTATION-HASH-TABLE*) (CL:MAKE-HASH-TABLE :TEST 'CL:EQUAL :SIZE 50 :REHASH-SIZE 50)))) (CL:DEFUN SET-DOCUMENTATION (NAME DOC-TYPE NEW-STRING) (CL:IF LISPXHIST (UNDOABLY-SETF (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE)) NEW-STRING)) (CL:SETF (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE)) NEW-STRING)) (CL:DEFSETF CL:DOCUMENTATION SET-DOCUMENTATION) (* ;; "Use the proper compiler") (PUTPROPS CMLDOC FILETYPE CL:COMPILE-FILE) (PUTPROPS CMLDOC COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1990)) (DECLARE%: DONTCOPY (FILEMAP (NIL))) STOP