home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / educ / boot.doc < prev    next >
Encoding:
Text File  |  1988-05-03  |  8.4 KB  |  217 lines

  1.     BOOT.DOC by Richard Conn
  2.  
  3.     The following documentation illustrates the steps taken to
  4. bootstrap in several key programs which enable the Ada Software Repository
  5. online documentation system to be used from any computer which supports
  6. a validated Ada compiler.  This documentation is divided into sections,
  7. where each section contains comment text (which follows the keyword COMMENT:)
  8. and a sample session (which follows the centered keyword SESSION).
  9.     This session is done on a 4.2 BSD UNIX system using the Verdix Ada
  10. Compiler.  All file names and commands are lower-case (but they are printed
  11. in upper-case in the COMMENT section).  This session has been edited
  12. to remove extraneous detail and to change directory names.
  13.  
  14. ----------------------------------------------------------------------------
  15. COMMENT:
  16.     Once logged into the DDN host computer (running 4.2 BSD UNIX), I
  17. transferred the following files from SIMTEL20:
  18.     PD:<ADA.PAGER> UNPAGE.ADA
  19.     PD:<ADA.PAGER> PAGER.SRC
  20.     PD:<ADA.ONLINE-DOC> HELP.SRC
  21.     PD:<ADA.ONLINE-DOC> HELP.DAT
  22.  
  23.     The UNPAGE program (file UNPAGE.ADA) is easy to compile (only one
  24. program containing the mainline procedure UNPAGE), and it is used to
  25. extract the component files from PAGER.SRC.
  26.     PAGER (file PAGER.SRC) is a useful tool which can be employed to
  27. extract component files from SRC files in the repository and to build
  28. and analyze SRC files.
  29.     Finally, once PAGER was compiled and operational, I used it to
  30. extract the component files from HELP.SRC.  These were then compiled
  31. to create the programs AHELP_BUILD (which converts the text file HELP.DAT
  32. into a direct access file which can be used by the other tools), AHELP_ANALYZE
  33. (which presents a tree structure of the contents of a direct access file
  34. created from HELP.DAT), and AHELP (which displays the direct access file
  35. created from HELP.DAT in a convenient fashion).
  36.  
  37.                 SESSION
  38.  
  39. 8% ftp simtel20
  40. Connected to simtel20.arpa.
  41. 220 SIMTEL20.ARPA FTP Server Process 5Z(46)-7 at Fri 11-Apr-86 08:14-MST
  42. Name: anonymous
  43. Password: 
  44. 331 ANONYMOUS user ok, send real ident as password.
  45. 230 User ANONYMOUS logged in at Fri 11-Apr-86 08:14-MST, job 8. 
  46. ftp> cd pd:<ada.pager>
  47. 331 Default name accepted. Send password to connect to it.
  48. ftp> get unpage.ada
  49. 200 Port 5.147 at host 26.5.0.47 accepted.
  50. 150 ASCII retrieve of PD:<ADA.PAGER>UNPAGE.ADA.1 started.
  51. 226 Transfer completed. 5618 (8) bytes transferred.
  52. 5618 bytes received in 5.34 seconds (1 Kbytes/s)
  53. ftp> get pager.src
  54. 200 Port 5.148 at host 26.5.0.47 accepted.
  55. 150 ASCII retrieve of PD:<ADA.PAGER>PAGER.SRC.5 started.
  56. 226 Transfer completed. 86752 (8) bytes transferred.
  57. 86752 bytes received in 105.31 seconds (0.8 Kbytes/s)
  58. ftp> cd pd:<ada.online-doc>
  59. 331 Default name accepted. Send password to connect to it.
  60. ftp> get help.src
  61. 200 Port 5.149 at host 26.5.0.47 accepted.
  62. 150 ASCII retrieve of PD:<ADA.ONLINE-DOC>HELP.SRC.2 started.
  63. 226 Transfer completed. 63360 (8) bytes transferred.
  64. 63360 bytes received in 28.66 seconds (2.2 Kbytes/s)
  65. ftp> get help.dat
  66. 200 Port 5.150 at host 26.5.0.47 accepted.
  67. 150 ASCII retrieve of PD:<ADA.ONLINE-DOC>HELP.DAT.1 started.
  68. 226 Transfer completed. 122782 (8) bytes transferred.
  69. 122782 bytes received in 73.68 seconds (1.6 Kbytes/s)
  70. ftp> quit
  71. 221 QUIT command received. Goodbye.
  72.  
  73. ----------------------------------------------------------------------------
  74. COMMENT:
  75.     The following files are now on the local host computer.
  76.  
  77.     Size          File
  78.       ------              ------------
  79.       119110 Apr 11 10:20 help.dat
  80.        61100 Apr 11 10:19 help.src
  81.        83516 Apr 11 10:17 pager.src
  82.         5447 Apr 11 10:15 unpage.ada
  83.  
  84. ----------------------------------------------------------------------------
  85. COMMENT:
  86.     First, I rename UNPAGE.ADA to UNPAGE.A (the Verdix Ada compiler
  87. expects Ada source files to have a .a suffix).  I then compile UNPAGE.A
  88. to create UNPAGE.  UNPAGE is then used to extract the components from
  89. PAGER.SRC (issue the command UNPAGE and type in PAGER.SRC to the prompt
  90. -- all inputs are in lower case).  After this was done, the directory display
  91. looked like this:
  92.  
  93.                 SESSION
  94.  
  95. %2 ls
  96. GVAS_table              help.src                pager.src
  97. ada.lib                 pager.a                 pager_compile.dis
  98. cas3.a                  pager.dis               pager_documentation.dis
  99. character_set.a         pager.doc               pager_support.a
  100. gnrx.lib                pager.pro               unpage*
  101. help.dat                pager.rno               unpage.a
  102.  
  103. ----------------------------------------------------------------------------
  104. COMMENT:
  105.     Now, the components of PAGER.SRC have to be compiled in the correct
  106. order to create the PAGER program.  Note the warnings ... I did not see
  107. these under DEC Ada, but they are not fatal and no harm is done.  I will
  108. probably modify PAGER and its component files someday to eliminate these
  109. warnings.  They revolve around the use of procedures with IN OUT parameters,
  110. where the parameters are not assigned prior to calling the procedures.  I used
  111. this style so that said parameters could be freely used on both sides of
  112. the assignment statements.
  113.  
  114.                 SESSION
  115.  
  116. 3% ada character_set.a
  117. Queued, waiting to run....running
  118. 4% ada cas3.a
  119. Queued, waiting to run....running
  120. /enfac/eng/ada/work2/cas3.a, line 134, char 14:warning:
  121.     RM 3.2.1(18): variable may not yet have a value
  122. 5% ada pager_support.a
  123. Queued, waiting to run....running
  124. /enfac/eng/ada/work2/pager_support.a, line 649, char 46:warning:
  125.     RM 3.2.1(18): variable may not yet have a value
  126. /enfac/eng/ada/work2/pager_support.a, line 649, char 58:warning:
  127.     RM 3.2.1(18): variable may not yet have a value
  128. /enfac/eng/ada/work2/pager_support.a, line 649, char 65:warning:
  129.     RM 3.2.1(18): variable may not yet have a value
  130. /enfac/eng/ada/work2/pager_support.a, line 649, char 75:warning:
  131.     RM 3.2.1(18): variable may not yet have a value
  132. 6% ada -M pager -o pager pager.a
  133. Queued, waiting to run....running
  134.  
  135. ----------------------------------------------------------------------------
  136. COMMENT:
  137.     Finally, we are ready to compile the HELP program and its two
  138. support programs, HELP_BUILD and HELP_ANALYZE.  I used PAGER to extract
  139. the components, then I renamed them (.ada to .a), edited HELP_SYSDEP (set
  140. the name of the default direct-access help file to SIMTEL20.HLP in the
  141. local directory), and compiled.  So as not to conflict with the UNIX HELP
  142. program, I renamed HELP to AHELP, HELP_ANALYZE to AHELP_ANALYZE, and HELP_BUILD
  143. to AHELP_BUILD.
  144.     Once compiled, AHELP_BUILD is used to convert HELP.DAT into
  145. a direct-access file (SIMTEL20.HLP).  AHELP_ANALYZE and AHELP then execute
  146. and use SIMTEL20.HLP.
  147.  
  148.                 SESSION
  149.  
  150. 7% ls -l help.*
  151. -rw-r--r--  1 119110 Apr 11 11:08 help.dat
  152. -rw-r--r--  1  61100 Apr 11 10:55 help.src
  153. 8% pager
  154. PAGER, Version 1.6
  155. Type HELP for Help
  156. PAGER> help
  157. PAGER Commands:
  158.  CHECK filename  --  Ada Check on File
  159.  LIST filename   --  List Names of Component Files
  160.  PAGE filename   --  Create Paged File
  161.  SCAN filename   --  List Files in Paged File
  162.  TOGGLE          --  Indicate Flag Settings
  163.  TOGGLE flag     --  Toggle Indicated Flag:
  164.                      Comment, Include File, or
  165.                      Verbose
  166.  UNPAGE filename --  Extract from Paged File
  167.  X (Exit)        --  Exit PAGER
  168. PAGER> u help.src
  169.      help.dis
  170.             25 Lines
  171.      help_sysdep.ada
  172.            109 Lines
  173.      help.ada
  174.            722 Lines
  175.      help_analyze.ada
  176.            278 Lines
  177.      help_build.ada
  178.            243 Lines
  179.      help.doc
  180.            619 Lines
  181.      help.rno
  182.            243 Lines
  183. PAGER> x
  184. 9% mv help_sysdep.ada help_sysdep.a
  185. 10% mv help.ada help.a
  186. 11% mv help_analyze.ada help_analyze.a
  187. 12% mv help_build.ada help_build.a
  188. 13% ed help_sysdep.a
  189. 3395
  190. /SIMTEL/
  191.   HELP_FILE_NAME : constant STRING := "DBA4:[CONTR13.EXE]SIMTEL20.HLP";
  192. s/DBA4:\[CONTR13.EXE\]SIMTEL20.HLP/simtel20.hlp/p
  193.   HELP_FILE_NAME : constant STRING := "simtel20.hlp";
  194. w
  195. 3377
  196. q
  197. 15% ada help_sysdep.a
  198. Queued, waiting to run....running
  199. 16% ada -M help -o ahelp help.a
  200. Queued, waiting to run....running
  201. 24% ada -M help_build -o ahelp_build help_build.a
  202. Queued, waiting to run....running
  203. 25% ada -M help_analyze -o ahelp_analyze help_analyze.a
  204. Queued, waiting to run....running
  205. 27% ahelp_build
  206. HELP File Builder, Version 1.1
  207. Source Text File                       > help.dat
  208. Help File to Build (RETURN for Default)> 
  209. Number of Screens Written:   253
  210. Number of Headers Written:   148
  211. 28% ahelp
  212. HELP, Version 1.3
  213. Help File (RETURN for Default)> 
  214.  
  215.     << details of execution omitted >>
  216.  
  217.