home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / BASIC / LIBWIZ11.ZIP / LIBWIZ.DOC < prev    next >
Encoding:
Text File  |  1991-03-31  |  13.0 KB  |  274 lines

  1.                  The Library Wizard's *BASIC Library Manager*           page 1
  2.                  =------------------------------------------=
  3.                                   Version 1.1
  4.  
  5.                LIBWIZ  Copyright (c) 1991  Thomas G. Hanlin III
  6.  
  7.  
  8.  
  9. This is LIBWIZ, a collection of utilities for managing BASIC libraries.  It
  10. allows you to customize your libraries, selecting just the routines you want.
  11. As well as creating a new library, LIBWIZ creates a corresponding "include"
  12. file and a quick reference of the routines in the library.
  13.  
  14. LIBWIZ requires a special description file to work with a library.  My own
  15. libraries come complete with description files (BASWIZ as of v1.5, PBClone as
  16. of v1.4).  The LIBWIZU utility assists in creating description files for
  17. libraries which don't have them.  The UNLIB utility allows you to extract all
  18. .OBJ files from a .LIB, since LIBWIZ needs to work with the .OBJs directly.
  19.  
  20. The LIBWIZ collection is copyrighted and may be distributed only under the
  21. following conditions:
  22.  
  23.    1) No fee of over $10.00 may be charged for distribution.  This
  24.       restriction applies only to physical copies and is not meant to
  25.       prevent distribution by telecommunication services.
  26.  
  27.    2) All LIBWIZ files must be distributed together in original, unaltered
  28.       form.  This includes FILES.LST, LIBWIZ.DOC, LIBWIZ.EXE, LIBWIZ.NEW,
  29.       LIBWIZU.EXE, LIB2OBJ.BAT and UNLIB.EXE.
  30.  
  31. You use these utilities at your own risk.  They have been tested by me on my
  32. own computer, but I will not assume any responsibility for any problems which
  33. they may cause you.  If you do encounter a problem, please let me know about
  34. it, and I will do my best to verify and repair the error.
  35.  
  36.                               Table of Contents                         page 2
  37.  
  38.  
  39.  
  40.  Overview and Legal Info ................................................ 1
  41.  
  42.  The LIBWIZ Library Manager ............................................. 3
  43.  
  44.  The LIBWIZU .INF Maker ................................................. 5
  45.  
  46.  Merging Libraries ...................................................... 6
  47.  
  48.  Miscellaneous .......................................................... 7
  49.  
  50.                           The LIBWIZ Library Manager                    page 3
  51.  
  52.  
  53.  
  54. A library is a collection of routines, or partial programs, which can be used
  55. directly as if they were part of the language itself.  A library may be
  56. considered as a language extender.  Since library routines can be written in
  57. a variety of languages, they may provide capabilities that are impossible
  58. using the target language alone.  Even if the routines do something that is
  59. within the capabilities of the target language, they are valuable in that
  60. they are already tested and provide a standardized approach to whatever they
  61. do.  The flexibility of libraries is a part of their power... and a problem!
  62.  
  63. The sheer number and variety of libraries available for BASIC is staggering.
  64. Many libraries contain hundreds of different routines of all descriptions!
  65. Sifting out just the routines you need is a hassle.  It's rarely practical to
  66. combine entire libraries, either due the presence of routines by the same
  67. name in different libraries or simply memory limitations.  In fact, my
  68. shareware libraries BASWIZ and PBClone have each grown too large for BASIC to
  69. deal with comfortably!
  70.  
  71. LIBWIZ provides a solution.  It allows you to choose just the routines you
  72. want from a library, either individually or by category.  It resolves any
  73. interdependencies to make sure the library contains all the routines it needs
  74. to function.  As well as customizing the library itself, LIBWIZ creates new
  75. "quick reference" and "include" files.
  76.  
  77. In order to do its stuff, LIBWIZ needs a ".INF" file which tells it about the
  78. library to be customized.  Appropriate files are included with the current
  79. versions of my own libraries.  The LIBWIZU utility can be used to create .INF
  80. files for other libraries.  Aside from the .INF file, LIBWIZ needs to have
  81. access to all of the .OBJ files that make up the library.  If your library
  82. didn't come with the separate .OBJ files, you can usually extract them from
  83. the .LIB using UNLIB.EXE and LIB2OBJ.BAT:
  84.  
  85.    UNLIB LibName
  86.    LIB2OBJ
  87.  
  88. Note that I said "usually"!  On occasion, LIB refuses to recognize an object
  89. name that UNLIB specifies.  I've inspected the library in these cases and the
  90. object name appears correct.  I'm not sure why LIB doesn't cooperate.  The
  91. problem is uncommon, however, and you'll probably never run across it.
  92.  
  93.                           The LIBWIZ Library Manager                    page 4
  94.  
  95.  
  96.  
  97. To use LIBWIZ, move to the directory which holds the .OBJ files and the .INF
  98. file for the library you wish to customize.  The syntax is:
  99.  
  100.    LIBWIZ InfName LibName
  101.  
  102. ...where "InfName" is the name of the .INF file and "LibName" is the name of
  103. the desired .LIB library.  The option "/B" can be used to force a monochrome
  104. display, although LIBWIZ will usually detect mono displays by itself.  I
  105. don't -think- any further instructions are needed, as picking the routines is
  106. a fairly simple process-- give it a go. If I've blundered in this regard,
  107. please let me know, and I'll try to provide more detailed instructions!
  108.  
  109. When you are done, provided that you told LIBWIZ to go ahead and create a
  110. library, it will create a number of files: an "include" (.BI) file, a revised
  111. library info (.INF) file, a batch file (.BAT) and response file (.IN) to
  112. actually make the library, and a quick reference (.REF) file.  These files
  113. will all take the name you specified as "LibName".
  114.  
  115. LIBWIZ doesn't actually create a library itself, as mentioned above.  It
  116. makes a batch file which tells LIB.EXE to create the desired library.  Only
  117. the .LIB form of the library will be created.  This is the form of library
  118. used when compiling from the command line or compiling to an .EXE from inside
  119. the QuickBASIC environment.  If you expect to use the library inside the
  120. QuickBASIC environment, you will need to make one in .QLB form as well.  This
  121. can be done by typing something like the following:
  122.  
  123.    LINK Libname.LIB/Q/SE:512,,NUL,BQLB45;
  124.  
  125. The "BQLB45" part is only for QuickBASIC 4.5.  For QuickBASIC 4.0, you would
  126. use either "BQLB40" or "BQLB41", depending on the particular QuickBASIC
  127. revision-- use "DIR BQLB*" wherever your QuickBASIC libraries are kept to
  128. find out which.  The BQLBxx.LIB file is provided with QuickBASIC.
  129.  
  130. If you are using the BASCOM "Professional Development System" v7.x, specify
  131. "QBXQLB" instead of BQLBxx.
  132.  
  133.  
  134.  
  135. At the moment, LIBWIZ can handle up to 1,023 routines per library; up to 4
  136. categories per routine; up to 255 categories total.
  137.  
  138. If you are processing a large library, have patience!  LIBWIZ has a lot of
  139. work to do and may take a while to write all the files for a big library.
  140. I'll improve its efficiency further in later versions.
  141.  
  142.                         The LIBWIZU .INF Maker                          page 5
  143.  
  144.  
  145.  
  146. The LIBWIZ library manager requires an .INF file to tell it about a library.
  147. This file specifies routine names, categories, object modules, declarations
  148. and descriptions.  If you don't have an .INF file for your library, the
  149. LIBWIZU utility will handle most of the work of creating it for you.
  150.  
  151. To use LIBWIZU, move to the directory which holds the .OBJ files and .BI
  152. (declaration) file for your library.  Type:
  153.  
  154.    LIBWIZU LibName
  155.  
  156. ...where LibName is the name of the .BI file.  After chugging through the
  157. declaration and object files, LIBWIZU will create an .INF file for the
  158. library.  It will also report on Public routines (routines listed in the
  159. declaration file, which are evidently intended for public use), Private
  160. routines (routines which can be accessed but are not in the declaration file
  161. and are assumed to be private for use by the public routines), and Orphans.
  162. Private routines will not be shown by LIBWIZ, but will be pulled into a
  163. library if needed by a public routine that was selected. Orphans are routines
  164. which are listed in the declaration file but which do not appear in the
  165. object files.  If there are any orphans, ORPHAN.LST will contain their names.
  166.  
  167. The .INF file created by LIBWIZU is not complete.  You must fill it in using
  168. a text editor.  A description for each routine is a good idea, though not
  169. strictly mandatory.  A description may be no longer than 70 characters.  Each
  170. routine must be in at least one category or it is assumed to be private.  A
  171. category can be as many as 16 characters.  A routine may be in up to four
  172. categories (list them on the same line, separated by spaces).
  173.  
  174. Here's a sample entry for a routine (taken from PBCLONE.INF):
  175.  
  176. Name: CLOCK
  177. Mod : CLOCK.OBJ
  178. Decl: DECLARE SUB Clock (BYVAL DisplayOn%)
  179. Type: Display Time
  180. Desc: Keep a clock displayed on the screen
  181.  
  182. The entries are created in this order by default, but may be in any order as
  183. long as the "Name:" definition is first.  If you would like to enter comments
  184. into the file, use "Note:".  Such notes will be ignored by LIBWIZ.
  185.  
  186. If you need information in the .BI file other than just DECLAREs, such as
  187. perhaps TYPE definitions, DEFINT or other statements, you must create an
  188. additional file with an .HDR (header) extension.  If LIBWIZ detects the file
  189. InfName.HDR, it will copy that file to LibName.HDR and "REM $INCLUDE" it in
  190. LibName.BI before the DECLAREs for the library.
  191.  
  192.                                Merging Libraries                        page 6
  193.  
  194.  
  195.  
  196. In order to combine two libraries, you must have both libraries in .LIB form.
  197. A new, combined .LIB can be created with the LIB.EXE utility that comes with
  198. BASIC:
  199.  
  200.    LIB NewLib,+LibOne.LIB+LibTwo.LIB;
  201.  
  202. A combined .QLB can be created using LINK:
  203.  
  204.    LINK LibOne.LIB+LibTwo.LIB/Q/SE:512,NewLib.QLB,NUL,BQLB45;
  205.  
  206. As noted earlier, you may need to use a different name than "BQLB45".  If you
  207. have QuickBASIC 4.0, it will be either "BQLB40" or "BQLB41".  If you have
  208. BASCOM 7.x ("Professional Development System"), it will be "QBXQLB".
  209.  
  210. The /SE option is used to tell LINK it may have to deal with a lot more
  211. routines than it expected by default.  If you get an overflow error, there
  212. are too many routines than will fit into the .QLB library.  Take some out.
  213.  
  214. If both libraries have a routine by the same name, there will be a conflict.
  215. You can fix this by changing the name of the routine in one of the libraries.
  216. My OBJTOOL utility (available elsewhere) allows you to do this.
  217.  
  218. OBJTOOL, like LIBWIZ and LIBWIZU, expects to deal with .OBJ files rather than
  219. with .LIB or .QLB files.  If you only have a .QLB library, there's nothing
  220. you can do about this.  If you have a .LIB library, however, you can use the
  221. LIB.EXE utility to remove .OBJ files from the library.
  222.  
  223. When LIB gives you the "Operations" prompt, use:
  224.  
  225.    *ObjName     to copy an .OBJ file from the library onto your disk
  226.    -ObjName     to delete an .OBJ from the library
  227.    +ObjName     to add an .OBJ to the library
  228.    -+ObjName    to update an .OBJ file in the library from your disk
  229.  
  230. If you don't know the names of the .OBJ modules, ask LIB.  Just press <enter>
  231. when it asks for Operations, then give it the name of a file when it prompts
  232. for a "List file".  The resulting file will contain a list of the modules in
  233. the library and what routines are in each module.
  234.  
  235. When combining libraries, don't forget to combine their .INF files as well!
  236. It takes no more than joining the two files:
  237.  
  238.    COPY LibOne.INF+LibTwo.INF NewLib.INF
  239.  
  240. You can join the .REF and .BI files the same way, or use LIBWIZ to generate
  241. new .REF and .BI files from the new .INF file.
  242.  
  243.                                  Miscellaneous                          page 7
  244.  
  245.  
  246.  
  247. Note that LIBWIZ places certain limitations on the valid routine names in
  248. order to make it possible to screen out names that are in BASIC's runtime
  249. libraries.  Names may not contain dollar signs, start with underscores, end
  250. with "QQ", or contain lowercase letters.  It is important to understand that
  251. BASIC normally converts routine names to uppercase and removes any type
  252. specifiers from function names, so BASIC is not normally capable of
  253. generating routine names that would break these restrictions (except for
  254. routines ending in QQ, of course).  This is more of a caution for routines
  255. that may have been written in other languages, such as assembly or C.
  256.  
  257. The LIBWIZ utilities were written using QuickBASIC 4.5 and routines from my
  258. BASWIZ and PBClone libraries.  They were linked with Crescent's PDQ library,
  259. which made the .EXE files much smaller.
  260.  
  261. This initial version of LIBWIZ is somewhat rudimentary.  The interface will
  262. improve in later versions.  I also have additional functions and utilities
  263. planned.  Of course, I will be delighted to hear your ideas on how to make
  264. LIBWIZ better.  Let me hear from you!
  265.  
  266. Sampler disks are available from me for $5.00.  These disks contain the
  267. latest versions of many of my shareware and free works, including BASWIZ,
  268. LIBWIZ, OBJTOOL and PBClone.  Please specify disk size.
  269.  
  270.    Thomas G. Hanlin III
  271.    3544 E. Southern Ave. #104
  272.    Mesa, AZ 85204
  273.  
  274.