home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / INFXDL79.ZIP / INFCON.DOC < prev    next >
Text File  |  1993-10-24  |  16KB  |  271 lines

  1. /*----------------------------------------------------------------------*/ 
  2.  
  3.           INFCONVERT PM - AN OS/2 .INF AND .HLP FILE CONVERTER.
  4.  
  5. Infconvert PM converts OS/2 .inf & .hlp format files to plain text files. It is
  6. an OS/2 PM program, part written with Watcom's VXREXX, part written in C.
  7. Infconvert PM was written because I wanted to print the help and inf files in
  8. os/2 2.0 and was fed up with the huge quantities of paper required when using
  9. View. Converting inf files to ascii text removes the need for a fresh page for
  10. every heading, allows the use of condensed printing utilities, (see the enclosed
  11. Infprint.cmd and infprint.doc) and produces files which can be read on and 
  12. printed from non OS/2 systems.
  13. /*----------------------------------------------------------------------*/ 
  14.  
  15. Usage :-Set up infcon.exe as an object on the desktop. Ensure infcon.exe and 
  16. infccona.exe are in the same directory, the working directory of the object 
  17. settings, or that infccona.exe is in a directory included in the path statement
  18. in config.sys There is an icon, infcon.ico, which can be set to infcon.exe.
  19. The VXREXX dll file VRobj.dll needs to be in a directory which is included in 
  20. the 'libpath' statement of config.sys. NB. The included file is the VRobj.dll 
  21. of VXREXX 1.01a, Infconvert PM will NOT work properly with the dll of VXREXX 
  22. 1.0.
  23.  
  24. After an initial info and nag screen, Infconvert PM brings up a window with a
  25. menu across the top. Click on 'File', and then on 'Inf' or 'Hlp' to bring up a
  26. file selection window. Select an inf or hlp file from this standard OS/2 file
  27. selection. When the file has been selected, a few seconds will pass before the
  28. file's list of Topics will appear in the main Infconvert window.
  29. Alternatively all inf or hlp files on any drive can be listed by choosing 'List
  30. All' from the 'File' menu. A "Drive and Type" window lets you select the drive, 
  31. inf or hlp. A selection from this window opens another window with a list of 
  32. all of the chosen file types on the chosen drive.  Select groups of files to
  33. convert by clicking on the individual file titles. Alternatively if you check 
  34. the "Sweep Select" option from the "Viewer" page in Options window, you can 
  35. drag down the list of files to select a group. Unfortunately this option
  36. restricts files chosen to a contiguous group in the file list. If you wish to
  37. change to this option once a file list is open it is necessary to close the list
  38. and reopen it before the new selection method takes effect. Double clicking on
  39. the list deselects all items.
  40.  
  41. You can list the contents of a file from the "All files" window by selecting one
  42. file and clicking on "Open". This works if only one file is selected.
  43. Each item listed is in three parts:
  44. 1- A number before the slash(/), which is the topic number in the inf file.
  45. 2- A number and perhaps a + sign after the slash, which is an indication of the
  46. nesting of the topic in the inf file. Topics nested at 2 are subtopics of a
  47. previous topic nested as 1 etc. A + sign after a nesting number indicates that 
  48. this topic has 'children'.
  49.  3- A topic name. This is sometimes blank. If so its because there is no topic
  50. name in the inf file.
  51. The list of topics is limited in size by the 16 bit nature of parts of PM. Large
  52. lists (bigger than about 1000 items) won't all fit in at once. If the inf file 
  53. has a topics list which is too big to display all at once the two small buttons
  54. to the right top of the window under the menu will show as being active. 
  55. Clicking on the button with the down arrow fills the window with the next part 
  56. of the list. This does take a second or two.
  57.  
  58.  Converting Files.
  59. The 'Convert' item on the menu drops down a secondary list of 'Convert All' and 
  60. 'Convert Range'. Clicking on Convert All starts the converison of the inf or hlp
  61. file according to the settings of the 'Options' window. Conversion is in a 
  62. separate thread, so the manipulation of the main window is unaffected by it. 
  63. When conversion is complete, a message box appears on the screen, giving the 
  64. output file name and the time for conversion if more than 10 seconds. Clicking 
  65. on 'Convert Range' starts conversion of the range of topics set by the 'Start 
  66. At' and 'End At' entryfields. These default to the first and last topics and can
  67. be altered in two ways:-
  68. 1 - The start and end topic numbers can be typed into the entryfields.
  69. 2-  Click on 'Start At' or 'End At' button and then double click on the number 
  70. of the topic in the main window. Note if you double click on the number in the 
  71. main window first, you will view the topic and not set 'Start At' or 'End At'.
  72. Otherwise 'Convert Range' is the same as 'Convert All'.
  73. "Convert List" on the "All Files" window allows a group of files selected to be
  74. and converted in full. The settings used are those of "Options" in the main
  75. window. It is possible to use "Convert List" from several drive/type windows
  76. and also to open a file in the main window at the same time. However, if you
  77. open a file, and that file is on a list of files being converted, but has not 
  78. yet been converted, there may be some problem in opening the file and conversion
  79. may fail. 
  80. "Cancel" on the "All Files" window allows you to stop the conversion of the 
  81. files being converted from "Convert List". This does not halt conversion of the 
  82. file currently being converted, but prevents further files from being converted.
  83.  
  84.   The View Window.
  85. You can view an individual topic by either double clicking on the number part of
  86. the topic listing, or by swipe selecting on the number part of the topic listing
  87. and clicking on the 'View' item on the menu. Both these actions bring up a view
  88. window and display the selected topic. This window displays the text from the
  89. selected topic. It can be resized as needed.
  90. The menu at the top has three items.
  91. Copy - brings up two choices.
  92.     Copy All copies the whole topic to OS/2's clipboard.
  93.     Copy Selected copies any marked text to OS/2's clipboard.
  94. Back - View the numerically previous topic.
  95. Forward - View the next topic. If 'Convert with Cross Reference' is set then the
  96. numerically next section may have already been viewed. If so, then these will be
  97. skipped when Forward is clicked.
  98. The font in the view window is set to system monospaced to allow proper viewing
  99. of line drawings with ascii characters. This font can be changed from OS/2's
  100. font palette. Changes are saved in Infconvert.ini when save is pressed in the
  101. options window.
  102.  
  103.  The Options Window.
  104. Cilcking on the 'Options' item in the menu brings up a window where most of the 
  105. settings of infconvert can be altered and set. The window has a poor man's 
  106. version of an OS/2 notebook. Clicking on any of the 'tabs' brings up a 'page' of
  107. related options.
  108.   Output File.
  109. Infconvert PM produces plain text files with the same name as the inf or hlp
  110. file, but with a .txt extension. The top box displays the name of the proposed
  111. output file of the selected file. Infconvert PM can be set to either overwrite
  112. the last output file from the selected inf, or to number output files from an
  113. extension '.tx1' to '.999'. The default is not to overwrite files. Check
  114. 'Overwrite Existing Files' to alter this. The line length and margin in the
  115. output file can be directly entered in the two fields provided. The line length
  116. is the total line length including the width of the margin. Line length can be
  117. from 40 to 500, and margin can be from 0 to 40.
  118.  Subsections.
  119. Checking 'Convert Cross Reference' enables infconvert PM to convert some types 
  120. of inf file more neatly. If, when viewed with View.exe, an inf file shows a list
  121. down one side with 'select one' or some such above, then this selection allows 
  122. infconvert to convert all the selections sequentially in the output file. NB- it
  123. doesn't work with all this type of file - try it and see.
  124. Checking 'Convert Subsections with Parent' will make infconvert convert all
  125. subsections of a parent topic even if only the parent was selected to convert.
  126.  Output Dir.
  127. The output directory an be set to that of the input inf or hlp file or to a 
  128. directory entered in the box provided. Infconvert checks to ensure the directory
  129. exists before accepting it.
  130.  Blank Lines.
  131. Select 'None' for no blank lines in the output file.
  132. Select 'At Headings Only' for a blank line before and after each topic name.
  133. Select 'Throughout Text' for all blank lines in the text to be included.
  134. Infconvert always suppresses double blank lines, except where two topic 
  135. headings with no associated text appear in a file.
  136.  Input Dirs.
  137. The directory the menu 'File' find dialog defaults to can be set from this 
  138. 'page' for both inf and hlp files.
  139.  Viewer.
  140. Infconvert produces temporary files with an extension '.HDN' when producing its 
  141. topic lists. If this file is alredy present in the output directory from a 
  142. previous opening of the inf or hlp file, the listing of the topics is 
  143. considerably faster. Check 'Delete Heading Files After Use' to delete these 
  144. files on a new inf or hlp file selection.
  145. The view window provided has word wrap turned off as default, mainly for line 
  146. diagrams to display properly. You can turn word wrap on so that, for example, 
  147. you can view all of some text with the view window set narrow.
  148. Checking "Sweep Select In All Files List" enables group selection in the "All 
  149. Files" window by holding down the mouse button as the mouse is dragged down the 
  150. list. Only contiguous groups of files titles may be selected with this option 
  151. enabled.
  152.  
  153.  Save
  154. None of the entries set are saved to infcon.ini unless save is pressed. In
  155. addition to the settings listed, this also saves the font used in the view 
  156. window.
  157.  
  158. The options window now has a minimise button and system menu for closing
  159. hiding the window. Most of the options are set by infconvert with the window
  160. open, but closing (or minimising) the window ensures all are. (The ones that may
  161. not be are those where you can enter a value. Focus must leave the entryfield
  162. window before the entry is accepted. Thus clicking on any button after finishing
  163. entries ensures all options are set. )
  164.  
  165.  
  166. /*---------------------------------------------------------------*/
  167.  
  168. What infconvert doesn't do.
  169. It ignores graphics and text effects such as italics, bold type, font
  170. changes, etc. There are no hypertext links in the view window.       
  171.         
  172. Infconvert checks the top of the inf file for a byte which should be present 
  173. if the file is an inf or hlp file. If this byte isn't present infconvert 
  174. doesn't continue. There are some files on OS/2 systems which have a hlp 
  175. or inf extension, but are not of the IPF type.
  176.  
  177. Inf file oddities 
  178. Some inf files have lots of small sections with topics with no names.
  179. Some inf files have section which are just large lists of other topics.
  180. Some inf files have hard coded carriage returns which prevent the line length
  181. from being extended - very annoying.
  182. Some inf files reference enteries in other inf files - Infconvert can't handle 
  183. these.
  184. Some topics have no text associated with them - sometimes these appear in large 
  185. numbers at the end of files .
  186. Some topics are still shown by infconvert, although never displayed by view.exe.
  187. Topics with a nesting level of 0 are generally footnotes.
  188.  
  189. Depending on the degree of blank line stripping used, infconvert typically
  190. produces text files which are 1.25 times the size of their inf originals. With
  191. inf files with lots of graphics and complicated structures, this ratio is 
  192. nearer one, with files which have acres of text in them and little else, its
  193. nearer 1.5
  194.  
  195. Occasionally Infconvert PM will close but the Vxrexx console persists. It may be
  196. necessary to reboot to remove this console. Watcom are aware of this problem.
  197.  
  198. /*---------------------------------------------------------------*/
  199.  
  200. Infconvert was produced using Watcom's VXREXX and Borland's BC++ for OS/2,
  201. and was developed from a previous version written entirely in OS/2's REXX. All
  202. the inf file manipulation is done by the C program and all the user interaction
  203. by the VXREXX program. The C program is actually a PM program with no output
  204. other than to file, and only command line arguments as input. I intend to change
  205. this from an exe to a dll at some point.
  206.  Because of the nature of VXREXX, a console from it is always present, though
  207. minimised, and will appear in OS/2's windows list. (The latest version of vxrexx
  208. allows this to be turned off, but for some reason this prevents Infconvert from
  209. closing some of its files properly.) If you are programming with VXRexx, please
  210. note that sometimes I cannot get Infconvert to run when the VXRexx editor is
  211. also running.
  212.  
  213. /*--------------------------------------------------------------*/
  214.  
  215. I intend to develop Infconvert as my understanding of the internal nature of IPF
  216. files increases. I have only recently acquired an IPF compiler (along with BC++)
  217. and haven't had any great chance to study the documentation or the structure of 
  218. output created from known input. The text files which Infconvert produces
  219. are likely to be improved upon a little -but I think they're pretty good already
  220. - and there is likely to be improvements in linking at viewing in future 
  221. versions of Infconvert.
  222.  The bulk of my understanding of IPF files comes from studying hex dumps of inf
  223. files and the text they produced. However I am indebted to Carl Hauser for some
  224. information from his document Info1.doc, in regard to which bits are set for
  225. various nesting conditions. Info1.doc will point you in the right direction if
  226. you wish to produce an inf viewer but is substantially inconsistent with my
  227. interpretation of inf file structure. When I have time I will 'update' Info1.doc
  228. with my interpretation.
  229. Please let me know of any problems you have or improvements you would like to 
  230. see. 
  231. /*--------------------------------------------------------------*/
  232.  
  233. Infconvert PM is Shareware. You have a licence to use and evaluate
  234. Infconvert PM for a period of sixty days. If you wish to use it past this point,
  235. you are obliged to register your copy. The registration fee is 10 pounds 
  236. Sterling and should be sent to me at the address below. Unfortunately at this
  237. stage I am unable to accept credit cards or cheques drawn on non UK banks in
  238. currencies other than sterling. Eurocheques and International money orders are
  239. acceptable, however. Please contact me for bulk order discounts. All
  240. registrations will be acknowledged, and a registration number issued which will
  241. turn off the opening information and nag screen. Registration will be for all
  242. future beta releases and at least the first non beta release.
  243.  
  244. /*--------------------------------------------------------------*/
  245. Version & Files.  The zip file, Infcnb79.zip, contains the following files;
  246.                 Infcon.exe - the VXRexx 'exe' file.
  247.                 Infccona.exe - the C exe file.
  248.                 Infcon.doc - this document.
  249.                 VROBJ.DLL - Watcom's runtime dll for Infcon.exe.
  250.                 Infprint.cmd - a small print utility program.
  251.                 Infprint.doc - some notes for the above.
  252.                 Whats.New - changes over versions.
  253.  
  254.       The zip file, Infxdl79.zip, contains the above files without VRobj.dll.
  255.  
  256. These may be freely distributed until a later version is released, provided :-
  257.  1) All the files must be distributed together, unaltered and in full.
  258.  2) Infconvert PM may not be bundled with any commercial product.
  259.  
  260. NB The file VROBJ.DLL must not be distributed other than with the rest of this 
  261. package.
  262.  
  263. (c) Copyright Colin Thomson 1993.  All Rights Reserved.  No warranty of any 
  264. kind is implied or given.  No liability is accepted for any consequences of 
  265. the use of this program.
  266. My address is :- Colin Thomson, 9, Manor Park, Oakworth, Keighley,
  267.                                  West Yorkshire, UK, BD22 7PW
  268.  
  269.     Fidonet @ STRANGE***daze*** 2:250/313           24rd October 1993.
  270. /*----------------------------------------------------------------------*/ 
  271.