(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) (FILECREATED "18-Oct-93 10:41:09" "{Pele:mv:envos}Sources>CLTL2>CMLDOC.;2" 3493 previous date%: "14-Apr-92 20:18:56" "{Pele:mv:envos}Sources>CLTL2>CMLDOC.;1") (* ; " Copyright (c) 1986, 1987, 1990, 1991, 1992, 1993 by Venue & Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT CMLDOCCOMS) (RPAQQ CMLDOCCOMS ( (* ;;; "Documentation strings") (VARIABLES *DOCUMENTATION-HASH-TABLE*) (FUNCTIONS LISP:DOCUMENTATION HASH-TABLE-FOR-DOC-TYPE SET-DOCUMENTATION) (SETFS LISP: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 ((LISP::HT (LISP:MAKE-HASH-TABLE :TEST 'EQ :SIZE 10 :REHASH-SIZE 5))) [FOR TYPE-LIST IN '((TYPES TYPE) (SETFS LISP:SETF) (STRUCTURES LISP:STRUCTURE RECORD RECORDS) (FUNCTIONS LISP:FUNCTION FN FNS) (VARIABLES LISP:VARIABLE VAR VARS)) DO (LET ((TABLE (LISP:MAKE-HASH-TABLE :TEST 'LISP:EQUAL :SIZE 50 :REHASH-SIZE 50))) (FOR TYPE IN TYPE-LIST DO (LISP:SETF (LISP:GETHASH TYPE LISP::HT) TABLE] LISP::HT)) (LISP:DEFUN LISP:DOCUMENTATION (NAME DOC-TYPE) (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE))) (LISP: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*)) (LISP:SETF (GETHASH DOC-TYPE *DOCUMENTATION-HASH-TABLE*) (LISP:MAKE-HASH-TABLE :TEST 'LISP:EQUAL :SIZE 50 :REHASH-SIZE 50)))) (LISP:DEFUN SET-DOCUMENTATION (NAME DOC-TYPE NEW-STRING) (* ; "Edited 14-Apr-92 20:16 by jrb:") (LISP:CHECK-TYPE NEW-STRING (OR (EQL NIL) STRING)) (LISP:IF LISPXHIST (UNDOABLY-SETF (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE)) NEW-STRING) (LISP:SETF (GETHASH NAME (HASH-TABLE-FOR-DOC-TYPE DOC-TYPE)) NEW-STRING))) (LISP:DEFSETF LISP:DOCUMENTATION SET-DOCUMENTATION) (* ;; "Use the proper compiler") (PUTPROPS CMLDOC FILETYPE LISP:COMPILE-FILE) (PUTPROPS CMLDOC COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1990 1991 1992 1993)) (DECLARE%: DONTCOPY (FILEMAP (NIL))) STOP