XEROX NEW-WHERE-IS 2 4 1 NEW-WHERE-IS 1 4 By: Doug Cutting (cutting.pa@xerox.com) Uses: HASH-FILE, CASH-FILE, and FILEPKG-PATCH This document last edited on October 7, 1987. Introduction This is a new implementation of a facility similar to but not compatible with the WHEREIS library module. Whereas WHEREIS only indexed Interlisp FNS definitions, NEW-WHERE-IS indexes all definers. The intent of NEW-WHERE-IS is to allow the file manager to know of many more definitions than are actually in the files which have been noticed. In order to achieve this the behavior of the following file manager functions is changed when NEW-WHERE-IS is loaded. (il:whereis name type files filter) [Function] Performs as described in the Interlisp Reference Manual. Returns the subset of files that contain a type definition for name. Files defaults to il:filelst (all noticed files). When NEW-WHERE-IS is loaded and il:whereis is passed t as its files argument il:whereis will look in the NEW-WHERE-IS databases. (il:typesof name possible-types impossible-types source filter) [Function] Performs as described in the Interlisp Reference Manual. Returns the subset of possible-types that name is defined as. Possible-types defaults to il:filepkgtypes (all define types). When NEW-WHERE-IS is loaded il:typesof will also include the types for name in its databases. Note that both of these functions are called by the edit interface (the function cl:ed). Thus when NEW-WHERE-IS is loaded the contents of its databases are known to the editor. Using A Database (xcl::add-where-is-database pathname) [Function] Adds the database in the file named by pathname to the databases known to NEW-WHERE-IS. If a database on an older version of this file is already known, then this will cause NEW-WHERE-IS to start using the new version. (xcl::del-where-is-database pathname) [Function] Deletes the database named by pathname from the databases known to NEW-WHERE-IS. Note that there is a proceed case for errors while accessing a database which will delete the offending database. This can be useful when a file server goes down. Building A Database (xcl::where-is-notice database-file &key files new hash-file-size temp-file-name define-types quiet) [Function] Records the definers on files in the file named by database-file. Files can be a pathname or a list of pathnames. The default for files is "*.;". Note that it is important to include the trailing semi-colon so that only definers on the most recent version are recorded. If new is true a new database file will be created, otherwise database-file is presumed to name an existing NEW-WHERE-IS database to be augmented. The default for new is nil. Hash-file-size is only used when new is false and is passed as the size argument to make-hash-file. The default for hash-file-size is xcl::*where-is-hash-file-size*, which has a default top-level value of 10,000. If temp-file-name is provided then all changes will happen in the temporary file named, which will afterwards be renamed to database-file. This can both make things faster (if the temporary file is on a faster device) and doesn't generate a new version of a database until the new version is ready to be used. The use of a temporary file may slow things down though when a large existing database is just being updated to reflect a small number of changes. Define-types is the list of define types (file package types) which should be recorded. The default define types are all those on IL:FILEPKGTYPES which are not aliases for others and which are not in the list xcl::*where-is-ignore-define-types*. Unless quiet is true, xcl::where-is-notice will print the name of each file as it is processed. xcl::where-is-notice returns the pathname of the hash file written. (LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 153) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))).ÈÈ(È(È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADTERMINAL MODERN MODERN MODERN MODERNMODERN LOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN ).. Æ  P  7   *  P 2 !Q] '¬ +¤    <€8 Y5.1k C Æ# 60ÝÄzº