home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / dirutl / chdir.lbr / CHDIR.HZP / CHDIR.HLP
Text File  |  1987-12-26  |  29KB  |  662 lines

  1. Overview of CHDIR
  2. Installation
  3. Basic Definitions
  4. Moving Into a Directory
  5. Creation of New Directories "On the Fly"
  6. Displaying the Directories
  7. Setup Mode
  8. Planning a Directory Structure
  9. :Overview of CHDIR
  10.  
  11.      CHDIR  (CHange DIRectory) is a program which gives a CP/M or 
  12. CP/ZM system a new virtual directory structure.   Ever since CP/M 
  13. 2.0 came out, users have been forced to refer to the environments 
  14. that  their  files are located in by user number and  disk  name.  
  15. This was an improvement over CP/M 1.4 in that projects and  files 
  16. associated  to  each  other for one reason or  another  could  be 
  17. logically  grouped together into a user area on a particular disk 
  18. and could easily be kept separate from other files.  
  19.  
  20.      This improvement is desirable and useful, but there are some 
  21. capabilities  lacking in this design that limit  its  usefulness.  
  22. One  such capability is the need for duplication of a COM file or 
  23. directory entry for a COM file in order to access this file  from 
  24. more  than one user area.   Another such capability is the human-
  25. interface  requirement  for  a  logically-named  user  area  that 
  26. indicates  the  purpose  of the user area as  opposed  to  simply 
  27. providing a number for it.
  28.  
  29.      Under  CP/M  2.x,  unfortunately,  if you wanted to issue  a 
  30. command,  you  had to have a copy of that particular COM file  in 
  31. your current user area in order for the operating system to  find 
  32. the command and load it.   User areas were of less use because of 
  33. this,  since  several commonly-used commands had to be duplicated 
  34. into  each  user  area.   This took up more disk  space  and  was 
  35. somewhat awkward.
  36.  
  37.      In answer to this and other desired capabilities,  ZCPR  was 
  38. created.   Placed  on  top of the CP/M CCP,  ZCPR provides a  new 
  39. command  processor for the CP/M user which is  upward  compatible 
  40. with  the  old command processor but adds several  new  features, 
  41. including a command-search hierarchy.   Now, when a user issues a 
  42. command,  ZCPR  will  search  for it if it is not  found  in  the 
  43. current user area on the current or specified disk.  The user can 
  44. specify the path to follow; however, ZCPR is initially configured 
  45. to search the current user area on the current disk,  user area 0 
  46. on  the current disk,  and user area 0 of disk A before producing 
  47. an  error message.   With ZCPR it is no longer necessary to  keep 
  48. several copies of files on disk in order to use the user areas.
  49.  
  50.      The  user areas and disks were still addressed  as  separate 
  51. elements of an overall file system,  however.  The user had to be 
  52. constantly  aware  of  where he was,  and ZCPR also  gave  him  a 
  53. different  prompt  which  indicated  the current  disk  and  user 
  54. number.   If  a user wished to employ user area 1 for  C  program 
  55. development and user area 2 for C source code storage,  he had to 
  56. note for himself that this is where these things were.
  57.  
  58.      Now,  CHDIR  is  introduced which adds a new outlook to  the 
  59. user  environment.   The user may now give each user area/disk  a 
  60. logical name (such as C-DEV or C-PGMS) and not worry about  where 
  61. they  actually are on disk.   Combined wisely with ZCPR or ZMCPR, 
  62. all utilities may be placed in a commonly-scanned directory (user 
  63. area/disk)  so  they will always be found by  the  CPR,  and  the 
  64. user's  entire microcomputer disk system now resembles one  large 
  65. disk  with  several  named subdirectories which  contain  related 
  66. files.
  67.  
  68.      CHDIR artificially imposes a named directory structure  onto 
  69. CP/M and CP/ZM.   Each named directory corresponds to a user area 
  70. on  a particular disk,  and the user need never be concerned with 
  71. what  user  area he is in if he uses ZCPR or  ZMCPR  with  CHDIR.  
  72. Each  disk/user  area  is called a directory and may be  given  a 
  73. logical name (up to 8 characters long).
  74.  
  75.      The simplest form of the CHDIR command is:
  76.  
  77.           CHDIR <directory name>
  78.  
  79. where <directory name> is a logical name (8 chars max) recognized 
  80. by  CHDIR.   This command logs the user into the  user  area/disk 
  81. associated with the indicated directory name.
  82.  
  83.      For example, given the following environment:
  84.  
  85.           User Disk Directory
  86.            10    A  SYS1
  87.            11    A  SYS2
  88.             8    B  C-DEV
  89.             7    A  C-PGMS
  90.             7    B  PAS-DEV
  91.             6    A  PAS-PGMS
  92.  
  93. the command:
  94.  
  95.           CHDIR C-DEV
  96.  
  97. logs the user into user area 8 on Drive B:; also, the command:
  98.  
  99.           CHDIR PAS-PGMS
  100.  
  101. logs the user into user area 6 on Drive A:.
  102.      CHDIR combined with ZCPR or ZMCPR,  then,  provides a useful 
  103. named-directory  working environment which is completely  compat-
  104. ible  with  CP/M,  and almost all CP/M programs can  run  without 
  105. modification in this new environment.
  106.  
  107.      CHDIR  employed  in a hard disk  environment  is  especially 
  108. useful  in  that the different logical disks associated with  the 
  109. hard  disk may now be grouped into one named directory  structure 
  110. and need no longer be treated as separate disks.
  111.  
  112.      In  addition  to the named directory structure,  CHDIR  also 
  113. creates a priveleged user environment.   This environment,  which 
  114. only  becomes  effective  if the USER  command  (and  other  such 
  115. facilities) are removed from ZCPR (and the COM files removed from 
  116. the disk),  defines two classes of users.  A normal user only has 
  117. access  to  certain  user  areas  (0 to  9  by  default),  and  a 
  118. priveleged user has access to all user areas.   In order to  move 
  119. into user areas greater than 9,  a password must be known.   Once 
  120. in  a priveleged user area,  no password is necessary to move  to 
  121. any other user area.
  122.  
  123.      This  feature  gives  a  certain  amount  of  protection  to 
  124. systems,  such as Remote Bulletin Board Systems,  against hostile 
  125. users.   Certain  priveleged  commands,  such  as  debuggers  and 
  126. language utilities,  may be placed into the protected user  areas 
  127. and employed only by those who know the password.   Two different 
  128. command  processors  can even be made to come into play  (in  the 
  129. case  of ZMCPR),  where the normal user sees a menu-driven set of 
  130. commands while a priveleged user sees a ZCPR-like command line.
  131.  
  132.      Refer  to  the documentation on ZCPR and ZMCPR  for  further 
  133. details.
  134.  
  135. :Installation
  136.      Installation of CHDIR is performed in two parts:   Compiling 
  137. CHDIR and Initializing the Internal Buffers of CHDIR.
  138.  
  139.  
  140.      Before  compiling CHDIR,  there are several internal default 
  141. values  that the user may wish to set in the source code  of  the 
  142. program.  These values and their meanings are:
  143.  
  144.           defname  -- default  name  for the COM file  of  CHDIR; 
  145. change  this  if you want CHDIR to be known by  some  other  name 
  146. after  initialization;  this name may also be later changed under 
  147. Setup Mode
  148.           dirmax -- maximum number of directory names allowed;  a 
  149. minimum value of 64 is recommended
  150.           syspass -- default System Password for CHDIR;  this  is 
  151. up  to 20 characters long,  and case is significant;  this may be 
  152. later changed under the Setup Mode
  153.  
  154.           sysuser  -- lowest user number for a  priveleged  user; 
  155. default value is 10; values should be in the range from 0 to 15
  156.           tryent   -- number  of  tries  permitted  to  enter   a 
  157. priveleged directory before CHDIR aborts; default value is 1
  158.           tryset -- number of tries permitted to enter Setup Mode 
  159. before CHDIR aborts; default value is 3
  160.           exitcmd  -- command to be executed if a valid  password 
  161. is  not  given  in the required number of tries;  default  is  no 
  162. command;  this should be the name of a COM file,  like  "HOSTILE" 
  163. for HOSTILE.COM, and should be in upper-case
  164.  
  165.      All  of  these  defined values are located  just  after  the 
  166. initial comments within the program source code.
  167.  
  168.  
  169.                     Part I -- Compiling CHDIR
  170.  
  171.      CHDIR was compiled by the BDS C compiler.   No special flags 
  172. or options are necessary.   Once compiled,  however, the COM file 
  173. produced  must be modified so that the stack used by this program 
  174. does not overwrite the CCP or CPR.
  175.  
  176.      To do this, the user may use the NOBOOT program from the BDS 
  177. C  user's group or manually modify the code at the  beginning  of 
  178. the  COM file.   Using the 1.45 version of BDS C,  the first  few 
  179. bytes  of the COM file load the HL register pair from locations 6 
  180. and 7 and then load the SP register from HL.  This is followed by 
  181. several  NOPs.   To  correct  the  stack  problem,  replace  this 
  182. sequence with an LXI D,-A00H,  DAD D,  and SPHL starting with the 
  183. SPHL instruction.  Example follows:
  184.  
  185.      Original Code       New Code
  186.  
  187.      LHLD 6              LHLD 6
  188.      SPHL                LXI D,-A00H
  189.      NOP
  190.      NOP
  191.      NOP                 DAD D
  192.      NOP                 SPHL
  193.  
  194.      Once this has been installed using a debugger like DDT,  the 
  195. COM file may be resaved to disk using the SAVE command,  and  the 
  196. user is ready to proceed to Part II of the installation.   If the 
  197. NOBOOT  command is available and works for the user's version  of 
  198. BDS C, then this manual procedure may be replaced by the command:
  199.  
  200.           NOBOOT CHDIR.COM
  201.  
  202.  
  203.               Part II -- Initializing CHDIR Buffers
  204.  
  205.      Once  CHDIR.COM has been patched so that it's stack does not 
  206. overwrite  the  CCP or CPR,  then its internal  buffers  must  be 
  207. initialized.  This is done to perform two basic functions:
  208.  
  209.           1) define the password for the priveleged user
  210.           2) clear the directory name table
  211.  
  212.      To perform this initialization, issue the command:
  213.  
  214.           CHDIR /S
  215.  
  216.      This places the user into SETUP Mode.  If the user runs this 
  217. command from user areas 0 to 9,  he will be asked for the "System 
  218. Password",  which is initially "chdir" (no quotes).   If the user 
  219. runs this command from user areas greater than 9,  he is declared 
  220. priveleged and is not asked for the password.
  221.      Once into SETUP Mode, the user is prompted with:
  222.  
  223.           Setup Command (? for Help)?
  224.  
  225.      He  should  issue  the  following commands  to  perform  the 
  226. initialization:
  227.  
  228.           I or i -- clear the directory name table; the user will 
  229. be  prompted  with "Verify Initialization (Y/N)?",  to  which  he 
  230. should respond with a Y or y.
  231.  
  232.           P or p -- set the password;  the user will be  prompted 
  233. with  "New System Password?" and 20 dots to indicate the size  of 
  234. the  allotted password;  he may then type the new  password,  and 
  235. case is significant ("test" is NOT the same as "TEST")
  236.  
  237.           X or x -- Exit and rewrite CHDIR.COM to disk;  the user 
  238. will be prompted with "Write New File (Y/N)?", to which he should 
  239. respond with Y or y, and then "Name of File (RETURN=CHDIR.COM)?", 
  240. to which he should strike the RETURN key.
  241.  
  242.      SETUP  Mode  is described in more detail later in  this  HLP 
  243. file.   The  procedure just outlined is all that is required  for 
  244. initialization, and CHDIR is now ready for use.
  245.  
  246.      The  first step is to plan and define the named directories.  
  247. The other sections of this HLP file tell you how to do this.
  248. :Basic Definitions
  249.      The following symbolic names are defined:
  250.  
  251.           <directory name>    <du>      <password>
  252.  
  253.      A  <directory  name> may contain up to  8  characters.   The 
  254. characters "*",  "?",  ".", and "/" should not be used as part of 
  255. the directory name since the CCP,  CPR, or CHDIR routines perform 
  256. special processing on them.  Lower-case letters are automatically 
  257. converted to upper-case.
  258.  
  259.      <du> is the disk letter and user number combination which is 
  260. assigned  to the <directory name> given.   It is a single  letter 
  261. (lower-case  is converted to upper-case) in the range from A to P 
  262. followed immediately by the digits of the user number (0 to 15).
  263.  
  264.      <password>  is  the System Password for CHDIR.   This  is  a 
  265. string  of up to 20 characters.   Case is significant ("test"  is 
  266. NOT the same as "TEST"),  and any printable character may be used 
  267. as part of the password as a general rule.
  268.  
  269. :Moving Into a Directory
  270.      The CHDIR command of the following form is used to move into 
  271. a directory:
  272.  
  273.           CHDIR <directory name>
  274.  
  275.      A  <directory  name> may contain up to  8  characters.   The 
  276. characters "*",  "?",  ".", and "/" should not be used as part of 
  277. the directory name since the CCP,  CPR, or CHDIR routines perform 
  278. special processing on them.  Lower-case letters are automatically 
  279. converted to upper-case.
  280.  
  281.      If  the user is not priveleged (residing in user area 10  or 
  282. greater,  by  default) and the name of a priveleged directory  is 
  283. given,  he will be asked for the System Password.   In this case, 
  284. he will be given only one try before the command aborts.
  285.  
  286.      Examples:
  287.           CHDIR C-DEV              CHDIR work
  288.           chdir cpci81             chdir 1temp
  289. :Creation of New Directories "On the Fly"
  290.      The  CHDIR command of the following form is used  to  create 
  291. new directories at will:
  292.  
  293.           CHDIR <directory name> <du>
  294.  
  295.      <directory name> is of the same form as described above.
  296.  
  297.      <du> is the disk letter and user number combination which is 
  298. assigned  to the <directory name> given.   It is a single  letter 
  299. (lower-case is converted to upper-case) in the range from A to  P 
  300. followed immediately by the digits of the user number (0 to 15).
  301.  
  302.      If  the user issues this command and is not priveleged (run-
  303. ning from user area 10 or greater,  by default),  then he will be 
  304. asked for the System Password before the command is executed.  If 
  305. he is priveleged, CHDIR will execute the command without prompt.
  306.  
  307.      Examples:
  308.           CHDIR C-DEV A5                chdir 1temp m0
  309.           chdir work b4                 chdir sys1 a10
  310. :Displaying the Directories
  311.      The  CHDIR command of the following form is used to  display 
  312. the names of the existing directories:
  313.  
  314.           CHDIR /DISPLAY
  315.  
  316.      Only  the  "/D"  is required to complete  the  command;  any 
  317. characters following the "/D" are ignored.
  318.  
  319.      If  the  user is not  priveleged,  only  the  non-priveleged 
  320. directories are displayed.   If he is priveleged, all directories 
  321. are  displayed.   A  priveleged  user is identified by  the  user 
  322. number  he is currently residing in (10 and above are  priveleged 
  323. by default).
  324.  
  325.      A count of the number of directory names defined and  amount 
  326. of directory space left for more names is given, and, if the user 
  327. is  not priveleged,  the count of defined names may not match the 
  328. number of displayed directory names since he is not permitted  to 
  329. see the names of the priveleged directories.
  330.  
  331. :Setup Mode
  332.      The CHDIR command of the following form places the user into 
  333. Setup Mode:
  334.  
  335.           CHDIR /SETUP
  336.  
  337.      Only  the  "/S"  is required to complete  the  command;  any 
  338. characters following the "/S" are ignored.
  339.  
  340.      Setup Mode is employed by a priveleged user to:
  341.           1) initialize the directory names
  342.           2) set/change the System Password
  343.           3) add/delete directory names
  344.           4) display the System Password and directory names
  345.           5) sort the directory names by disk/user area
  346.           6) save the current named directory structure to disk
  347.  
  348.      If  the  "CHDIR  /SETUP"  command  is  issued  from  a  non-
  349. priveleged  user  area (user areas 0 to 9 by default),  then  the 
  350. user  will be prompted for the System Password.   He is  given  3 
  351. tries to get it right before CHDIR aborts (by default).
  352.  
  353.      Once in Setup Mode, the user is prompted with
  354.  
  355.           Setup Command (? for Help)?
  356.  
  357. and  Setup  is  waiting for the user to type  a  single-character 
  358. command  letter.   If he types a ?  or any other invalid  command 
  359. letter,  he  is presented with a summary of the Setup  Mode  com-
  360. mands.   These  commands are invoked by striking a single  letter 
  361. and case is not significant.  A summary of these commands is:
  362.  
  363.           D -- Display System Password and Directory Names
  364.           I -- Initialize and Clear All Directory Names
  365.           N -- Create a New Directory Name
  366.           P -- Set the System Password
  367.           Q -- Quit without Updating
  368.           S -- Sort Directory by Disk and User Number
  369.           X -- Exit and Update CHDIR.COM on Disk
  370.  
  371.      Each command is explained on the following screens.
  372.         D -- Display System Password and Directory Names
  373.  
  374.      This command prints three groups of information.  They are:
  375.  
  376.         "System  Password  is ..."
  377.                -- current setting for the System Password
  378.         "Defined Directory Names --
  379.              du: name1      du: name2      du:name3     du:name4"
  380.                -- disk, user area, and name for directories
  381.                     4 entries are printed per line
  382.         "n Directory Names Defined, Space Left for m More Names"
  383.                -- number of names defined and space left
  384.           I -- Initialize and Clear All Directory Names
  385.  
  386.      This command performs the following initializations:
  387.  
  388.           1)  the  System  Password  is renamed  to  the  default 
  389. programmed value of the variable syspass;  this name is initially 
  390. "chdir"
  391.           2)  all  disk names,  user areas,  and  directory  name 
  392. strings are initialized to zero
  393.  
  394.      The  user  is prompted with "Verify  Initialization  (Y/N)?" 
  395. immediately  after he strikes the letter I or i.   If  he  replys 
  396. with  any letter other than Y or y,  the message  "Initialization 
  397. Aborted"  is  printed and he is returned to Setup Command  level.  
  398. If  he  types  a  Y  or  y  in  response  to  this  prompt,   the 
  399. initialization is performed and the message "All Directory  Names 
  400. Cleared" is printed.
  401.                 N -- Create a New Directory Name
  402.  
  403.      In response to this command, the message
  404.  
  405.           "System User Areas start at nn"
  406.  
  407. is  printed  to remind the user where the priveleged  user  areas 
  408. begin, and the user is placed into a loop, prompted with
  409.  
  410.           "Disk Letter and User (RETURN=Done or A-P 0-15)?"
  411.  
  412.      If  the user wishes to create a new directory,  he types one 
  413. letter A-P (case is not significant) followed by a number in  the 
  414. range  from 0 to 15.   If the user does not wish to create a  new 
  415. directory,  he  strikes the RETURN key to abort to Setup  Command 
  416. level.
  417.  
  418.            N -- Create a New Directory Name, Continued
  419.  
  420.      If  the user selected a valid disk/user combination,  he  is 
  421. prompted with
  422.  
  423.           "Directory Name (RETURN = Delete Old Name)?"
  424.  
  425. to  which  he may strike the RETURN key to delete  the  directory 
  426. name previously associated with the disk/user specified or he may 
  427. type a directory name (case is not significant and all lower-case 
  428. letters  are capitalized) to create a new directory or rename  an 
  429. old one.
  430.  
  431.      If  the  directory  name or RETURN is  accepted,  the  "Disk 
  432. Letter  and  User"  prompt will reappear to  allow  the  user  to 
  433. continue  creating  directory  names or abort  to  Setup  Command 
  434. level.
  435.            N -- Create a New Directory Name, Continued
  436.  
  437.      Several  error  messages are possible while in this part  of 
  438. the Setup Mode.  These messages are:
  439.  
  440.      "Invalid Disk Letter"
  441.           -- Disk was not in the range from A to P
  442.      "Invalid User Number"
  443.           -- User Number was not in the range from 0 to 15
  444.      "Directory Name is too long -- Reenter"
  445.           -- Entered directory name exceeded 8 characters
  446.      "Error -- Directory Name Buffer Full"
  447.           -- No more space is available in the internal buffer
  448.      "Directory Name for ud: Deleted"
  449.           -- (NOT an error message) Tells the user that a
  450.                previously-defined name was deleted
  451.                   P -- Set the System Password
  452.  
  453.      This  command in Setup Mode is immediately followed  by  the 
  454. prompt
  455.  
  456.           "New System Password?"
  457.  
  458. to which the user is allowed to enter up to 20 characters for his 
  459. password.  The user MUST enter a password; simply typing a RETURN 
  460. sets the password to null and a simple RETURN is required for the 
  461. new password when asked.
  462.                    Q -- Quit without Updating
  463.  
  464.      This command is answered with the prompt
  465.  
  466.           "Verify Abort (Y/N)?"
  467.  
  468. to  which  the  user replys with Y or y to abort Setup  Mode  and 
  469. return  to the operating system or any other character to  return 
  470. to Setup Mode.
  471.            S -- Sort Directory by Disk and User Number
  472.  
  473.      This  command causes the internal directory to be sorted  by 
  474. disk and user area.  In response to this command, CHDIR sorts the 
  475. directory (no informative prompt) and prints
  476.  
  477.           "Sort Complete"
  478.  
  479. when done.
  480.  
  481.      This command is provided for the convenience of the user.
  482.              X -- Exit and Update CHDIR.COM on Disk
  483.  
  484.      This command causes the prompt
  485.  
  486.           "Write New File (Y/N)?"
  487.  
  488. to appear.  If the user responds with anything other than Y or y, 
  489. Setup  Mode and CHDIR are aborted and control is returned to  the 
  490. operating system.
  491.  
  492.      If the user responds with Y or y, he is prompted with
  493.  
  494.           "Name of File (RETURN = CHDIR.COM)?"
  495.  
  496. to  which he may reply by striking the RETURN key to rewrite  the 
  497. file CHDIR.COM on disk or he may give another file name (the .COM 
  498. is  not necessary) to write a new file.   The  current  directory 
  499. structure  is  defined as a part of the written file,  and it  is 
  500. used  to  access  this new  directory  ala  CHDIR  commands.   In 
  501. entering the file name, case is not significant.
  502.         X -- Exit and Update CHDIR.COM on Disk, Continued
  503.  
  504.      The  prompt  may  vary if CHDIR has been rewritten  under  a 
  505. different name.  By default, the prompt is
  506.  
  507.           "Name of File (RETURN = CHDIR.COM)?"
  508.  
  509. and,  if,  for  instance,  CHDIR was rewritten as  CDIR.COM,  the 
  510. prompt from CDIR would be
  511.  
  512.           "Name of File (RETURN = CDIR.COM)?"
  513.  
  514.      Once  the  file name is specified or RETURN is  struck,  the 
  515. following messages appear:
  516.  
  517.           "Sorting Directory by Disk and User Number"
  518.           "Writing File CHDIR.COM to Disk ..."
  519.                " File CHDIR.COM Written to Disk"
  520.  
  521.      An  error message "Error -- Can't Create File CHDIR.COM"  is 
  522. possible, indicating that the disk or directory are full.
  523.                     Other Setup Mode Commands
  524.  
  525.      Striking  any key other than those just described  causes  a 
  526. built-in Help message to be displayed.   Control is then returned 
  527. to Setup Mode command level.
  528. :Planning a Directory Structure
  529.  
  530.      This section outlines a few comments and recommendations  on 
  531. a  technique  to  combine ZCPR or ZMCPR with CHDIR  to  create  a 
  532. working environment.
  533.  
  534.      The ZCPR and ZMCPR command-search hierarchy frequently  take 
  535. the  user  down to user 0 on drive A before the  invalid  command 
  536. error message is given.  This directory is, effectively, the ROOT 
  537. of  the  system,  and  this would be a good place  to  store  the 
  538. CHDIR.COM  file.   "ROOT"  itself is a good name for A0,  and  by 
  539. standardizing on this name, any user can place himself here as he 
  540. moves between systems and see the standard command set.
  541.  
  542.      Since  a  command-search  hierarchy is used under  ZCPR  and 
  543. ZMCPR,  this,  in conjunction with CHDIR, can be used to create a 
  544. hierarchial  directory structure.   The first CHDIR.COM  that  is 
  545. encountered  during a search is the one that is effective,  so by 
  546. placing a CHDIR.COM in the command-search path before the ROOT is 
  547. encountered, directory subtrees can be formed.  Let me illustrate 
  548. this concept with the following diagram:
  549.               CHDIR Directories                   Tree
  550.  
  551. Disk A:   User 0: CHDIR.COM                    (1)ROOT --> WORK
  552. Directories:   A0: ROOT       B0: WORK
  553.  
  554. Disk B:   User 0: CHDIR.COM
  555. Directories:   A0: ROOT                                    ROOT
  556.                B0: C-ROOT     B1: C-DEV                    C-DEV
  557.                B2: C-PGMS     B3: C-DOC      (2)C-ROOT --> C-PGMS
  558.           User 1: No CHDIR.COM                             C-DOC
  559.           User 2: No CHDIR.COM
  560.           User 3: CHDIR.COM
  561. Directories:   B0: C-ROOT     B3: C-DOC
  562.                B4: COMPILER   B5: PROGRAM                  C-ROOT
  563.           User 4: No CHDIR.COM                (3)C-DOC --> COMPILER
  564.           User 5: No CHDIR.COM                             PROGRAM
  565.      Using  the normal ZCPR command-search  hierarchy,  which  is 
  566. current  user/current disk to user 0/current disk to user  0/disk 
  567. A, the following can be noted:
  568.  
  569.           A) tree (1) is seen from any user number on A:
  570.           B) tree (2) is seen from any user number except 3 on B:
  571.           C) tree (3) is seen from user 3 on B:
  572.  
  573.      As  the  reader can see,  this is a very  powerful  concept.  
  574. Let's  say  that  you  are logged into A0 and want  to  read  the 
  575. documentation on the C compiler.   You would have to issue "CHDIR 
  576. WORK" to enter the directory WORK on B:.  Issuing "CHDIR /D" from 
  577. here shows you in directory C-ROOT,  and you now issue "CHDIR  C-
  578. DOC"  to enter the documentation branch of the tree.   From here, 
  579. you  issue "CHDIR COMPILER" to enter the  compiler  documentation 
  580. directory.  Expressed as a tree, this is:
  581.  
  582.      Feel  free  to move back to the previous displays via the  L 
  583. command if this is not clear to you.
  584.  
  585.                               ROOT
  586.                                 !
  587.                           C-ROOT (WORK)
  588.                          /      !      \
  589.                       C-DEV   C-PGMS  C-DOC
  590.                                       /  \
  591.                                COMPILER  PROGRAMS          
  592.  
  593.      This  is  a  simple type of tree  structure  as  implemented 
  594. above.  CHDIR goes beyond this, tho, and allows as much as a star 
  595. or ring structure as well, or any combination desired.
  596.  
  597.      One  more  step that CHDIR allows the user to take  is  with 
  598. priveleged  users.   Now,  directories can be hidden from  normal 
  599. users.   Priveleged  directories are set up like normal director-
  600. ies,  and CHDIR is the program which enforces the security.  Note 
  601. that  the USER command must be removed from the CPR for  this  to 
  602. work.
  603.  
  604.      Using  ZMCPR adds a capability of logging into a new direct-
  605. ory  and automatically invoking a new command  interpreter.   The 
  606. MENU.CCP  file  can  be either a menu display  or  an  executable 
  607. program,  and  as  an executable program,  it is run  every  time 
  608. control is returned to the CPR while the user is logged into  the 
  609. current  directory.   In this way,  a whole new command processor 
  610. can be introduced with each directory, and as the user moves from 
  611. one directory to another,  he may move from menu-driven  displays 
  612. to ZCPR-like command line processors to other processors at will.  
  613. The capabilities and potential are amazing!
  614.  
  615.  
  616.      Yet  another change may be made to enhance the  capabilities 
  617. of  CHDIR.   This  change involves modifying  the  command-search 
  618. hierarchy to a new path.  For example:
  619.  
  620.           Old Path: User Current/Disk Current
  621.                     User 0/Disk Current
  622.                     User 0/Disk A
  623.  
  624.           New Path: User Current/Disk Current
  625.                     User Current/Disk A
  626.                     User 0/Disk A
  627.  
  628.      This provides a new CHDIR environment in which utilities can 
  629. be  grouped into different directories on A and all the work done 
  630. on B.   When a command is issued,  command search falls to a pro-
  631. ject utility area on A before falling to the ROOT.  The differen-
  632. ces between these to paths can be illustrated as follows:
  633.  
  634.           Old Path: User Current/Disk Current
  635.                     User 0/Disk Current
  636.                     User 0/Disk A
  637.  
  638.           New Path: User Current/Disk Current
  639.                     User Current/Disk A
  640.                     User 0/Disk A
  641.  
  642. ------
  643.           Old Path: Work Area --> Common Root Utilities --> ROOT
  644.           New Path: Work Area --> Project Utilities --> ROOT
  645.  
  646.      Under  the new path,  different user areas on A can  contain 
  647. the utilties, say, associated with a particular language, such as 
  648. user 1 for C,  user 2 for PASCAL,  etc.   Then, the corresponding 
  649. work  areas on B would be user 1 for C work,  user 2  for  PASCAL 
  650. work,  etc.   Now, when a command is issued, the move from C work 
  651. to C compiler to ROOT or PASCAL work to PASCAL compiler to ROOT.
  652.  
  653.      As  the  reader can see,  the possibilities are  staggering.  
  654. And this is just the beginning.
  655.  
  656.      I hope you enjoy using CHDIR with ZCPR and ZMCPR,  and don't 
  657. hesitate to experiment with the possibilities available by  these 
  658. combinations.   Comments  on these programs and any new ideas the 
  659. reader has would be appreciated.
  660.  
  661.                                         Richard Conn
  662.