home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / infxdl86.lzh / INFCON.DOC < prev    next >
Text File  |  1994-05-10  |  25KB  |  478 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. Three Things You Must Do :-
  15.  
  16. 1 - Remove Any Old Version Of 'Infcon.ini' Before Loading this Newer Version !!
  17. 2 - Replace any old version of BOTH Infcon.exe and Infccona.exe with the ones in
  18.     this package, and put them in the same directory.
  19. 3 - Ensure Vrobj.dll (ver1.01 or later - not included) is in a directory on the
  20.     Libpath.
  21.  
  22. Usage :-
  23.  
  24. Set up infcon.exe as an object on the desktop. Ensure infcon.exe and 
  25. infccona.exe are in the same directory, the working directory of the object 
  26. settings, or that infccona.exe is in a directory included in the path statement
  27. in config.sys There is an icon, infcon.ico, which can be set to infcon.exe.
  28. The VXREXX dll file VRobj.dll needs to be in a directory which is included in 
  29. the 'libpath' statement of config.sys. NB. This file is not included in with this
  30. version of Infconvert PM, and needs to be obtained from a previous release or 
  31. elsewhere. Infconvert needs the file Vrobj.dll ver 1.01, and will NOT work 
  32. properly with the dll of VXREXX 1.0, but it will work with later patch levels.
  33.  
  34.           _____________________________________
  35.   
  36.        Contents :-
  37.                 1- The Main Window.
  38.                 2 - The List All Window.
  39.                 3 - The Found Window.
  40.                 4 - Converting Files.
  41.                 5 - Searching .Inf and .Hlp Files.
  42.                 6 - Opening and Viewing Files.
  43.                 7 - The Settings Window.
  44.                 8 - A Note About Fonts.
  45.                 9 - A Note about Threads.
  46.                10 - Window Positions and Sizes.
  47.                11 - Infconvert's Temporary Directory.
  48.                12 - What Infconvert doesn't do.
  49.                13 - Inf file oddities.
  50.                14 - History and Musings.
  51.                15 - Registration.
  52.                16 - Version & Files.
  53.                17 - Copyright, Disclaimer and Author.
  54.           _____________________________________
  55.  
  56. 1- The Main Window
  57.  
  58. After an initial info and nag screen, Infconvert PM brings up a window with a
  59. stanard OS/2 type menu. Briefly, the items are as follows:-
  60.  
  61. Open-
  62.    -Open Inf - Opens an inf file to view topics
  63.    -Open Hlp - Opens a hlp file to view topics
  64.    -List All - Opens another window with a list of all the Inf or hlp files on a
  65.                 selected drive.
  66.  
  67. Convert-
  68.    -Convert Inf - Select an Inf file to convert to text
  69.    -Convert Hlp - Select a Hlp file to convert to text
  70.    -Convert Open - Convert the currently open file to text
  71.  
  72. Settings-
  73.    -Font Palette - Open an OS/2 Font Palette
  74.    -Settings - Opens a secondary window where Infconverts options can be set.
  75.  
  76. View- Opens a secondary window with the text related to the currently selected 
  77.         topic.
  78.  
  79. Search-
  80.     -Search Inf - Search an Inf for a given word or part word
  81.     -Search Hlp - Search an hlp for a given word or part word
  82.     -Search Open - Search the currently open file for a given word or part word
  83.  
  84. Most actions from the main Infconvert window relate to actions performed on a 
  85. single file. Actions (ie converting, searching) on groups of files can be 
  86. performed from the windows brought up from the "List All" selection under the 
  87. "Open" item on the main menu.
  88.  
  89. 2 - The List All Window.
  90.  
  91. Clicking on "List All" selection under the "Open" item on the main menu open a 
  92. second window (in a separate thread) whch displays all the Inf or Hlp files on 
  93. a particular drive. A separate window is opened for each drive/file type
  94. combination which the user selects. Groups of files can be selected and 
  95. converted or searched for the occurance of a word or part word. A single file 
  96. may be opened in Infconvert's main window.
  97.  Select groups of files to convert or search by clicking on the individual file
  98. titles. Alternatively if you check the "Sweep Select" option from the "Viewer"
  99. page in Settings window, you can drag down the list of files to select a group.
  100. Unfortunately this option restricts files chosen to a contiguous group in the
  101. file list. If you wish to change to this option once a file list is open it is
  102. necessary to close the list and reopen it before the new selection method takes
  103. effect. Double clicking on the list deselects all items.
  104.  
  105.  
  106. 3 -The Found Window.
  107.  
  108. The results of a succesful search of a file from either of the above two windows
  109. are displayed in a third separately threaded window, with a list of topics where
  110. the text was found at the top, and the text relating to the selected topic 
  111. displayed in the bottom half of the window. Up to eight separate found windows 
  112. can be opened at any one time. Double clicking on a topic will display the
  113. related text, and menu items allow the user to move to the next occurance of the
  114. text found, or to step forward or back topic by topic.
  115.  
  116. 4 - Converting Files.
  117.  
  118.    Converting IPF files to plain text is Infconvert PM's main purpose.
  119.  
  120.  Any choice from under "Convert" brings up, after file selection, a dialog box 
  121. where the user can set the range of topics to be converted. The "Start At" and
  122. "End At" selections are initially set so that the whole of the file would be
  123. converted. The text files produced are named after the inf or hlp file, with a 
  124. "Txt" extension.  The output files are placed in the directory specified by the
  125. option set in the "Settings" dialog. The line length, margin, and degree of 
  126. blank line stripping are also configurable from Infconvert's Settings. 
  127. Conversion is usually quite fast:- a one megabyte inf usually takes less 
  128. than 30 seconds to convert on the author's 486sx25Mhz 8meg machine, if nothing 
  129. else intensive is running.
  130.  
  131. "Convert List" on the "All Files" window allows a group of files selected to be
  132. and converted in full. The settings used are those of "Settings" in the main
  133. window. It is possible to use "Convert List" from several drive/type windows
  134. and also to open a file in the main window at the same time. However, if you
  135. open a file, and that file is on a list of files being converted, but has not
  136. yet been converted, there may be some problem in opening the file and conversion
  137. may fail.
  138.  
  139. "Cancel" on the "All Files" window allows you to stop the conversion of the
  140. files being converted from "Convert List". This does not halt conversion of the
  141. file currently being converted, but prevents further files from being converted.
  142.  
  143.  
  144. 5 - Searching .Inf and .Hlp Files.
  145.  
  146. Infconvert has the ability to search both single or multiple inf and hlp files,
  147. from the main window menu or the menu of the "List All" window. Clicking
  148. on "Search" in either of these windows will bring up a dialog box where you
  149. can enter up to 255 characters to be searched for. In the main window, only one 
  150. file, either the presently opened file or the one chosen from "Search Inf" 
  151. or Search Hlp" is searched, and if the desired text is found, a "Found" window
  152. is opened which displays where the text has been found in the file. This window
  153. is similar in type to the "View" window mentioned below, with the addition of
  154. a list of topic headings under which the text searched for was found. From the
  155. "List All" window's menu the procedure is similar, except that there is an
  156. intermediate listing of which files the text was found in and one or more files
  157. can be opened and displayed in the "Found" window. Multiple "Found" windows may
  158. be opened at the same time, to a maximum of eight concurrently open. Any number
  159. of files, from 1 to the entire list of files in the "List All" window may be
  160. searched at one time. Searching can be whole word or part word, and either case
  161. sensitive or not.
  162.  
  163.  Words or part words may be searched for, however phrases and symbols made
  164. up from separate elements will not be found. e.g. a non whole word search for
  165. "ever" would be sucessful if the file searched had "ever" or "never" or
  166. "However" in it, but a search for "OS/2" may well fail, because in the word list
  167. of the inf file "OS/2" is (most probably) stored as "O" & "S" & "/" & "2" in
  168. separate locations.
  169. Nevertheless, Infconvert searches the topic names as well as the list of words,
  170. and the topic names are stored as text strings, so a search for "OS/2" may well
  171. not fail, but almost certainly would be incomplete.
  172.  
  173. The "Found" window list of topics is restricted to 250 entries at one time.
  174. However further topics will be displayed if the user double clicks on the 
  175. "More...." entry at the bottom (and top) of incomplete lists.
  176.  
  177. The default action for the "Found" window is to display the next occurance of 
  178. the found text, but the user can also view the previous and next topics by 
  179. clicking "Back" or "Forward".
  180.  
  181. Either all the text displayed, or the text the user has marked can be copied to 
  182. the OS/2 clipboard.
  183.  
  184. 6 - Opening and Viewing Files.
  185.  
  186.  Opening an Inf file displays a list of topics on Infconvert's main window. 
  187. You can list the contents of a file from the "All files" window by selecting one
  188. file and clicking on "Open". This works if only one file is selected.
  189.  
  190. Each item listed is in three parts:
  191. 1- A number before the slash(/), which is the topic number in the inf file.
  192. 2- A number and perhaps a + sign after the slash, which is an indication of the
  193. nesting of the topic in the inf file. Topics nested at 2 are subtopics of a
  194. previous topic nested as 1 etc. A + sign after a nesting number indicates that 
  195. this topic has 'children'.
  196.  3- A topic name. This is sometimes blank. If so its because there is no topic
  197. name in the inf file.
  198.  
  199. The list of topics is limited in size by the 16 bit nature of parts of PM. Large
  200. lists (bigger than about 1000 items) won't all fit in at once. If the inf file 
  201. has a topics list which is too big to display all at once the two small buttons
  202. to the bottom left of the window under the list will show as being active.
  203. Clicking on the button with the down arrow fills the window with the next
  204. part of the list. This can take a second or two.
  205.  
  206.   The View Window.
  207. You can view an individual topic by either double clicking on any number part
  208. of the topic name or by clicking on the 'View' item on the menu. Both these
  209. actions bring up a view window. This window displays the text from the selected
  210. topic. It can be resized as needed.
  211.  
  212. The menu at the top has three items.
  213.  
  214. Copy - brings up two choices.
  215.     Copy All copies the whole topic to OS/2's clipboard.
  216.     Copy Selected copies any marked text to OS/2's clipboard.
  217.  
  218. Back - View the numerically previous topic.
  219.  
  220. Forward - View the next topic. If 'Convert with Cross Reference' is set then the
  221. numerically next section may have already been viewed. If so, then these will be
  222. skipped when Forward is clicked.
  223.  
  224.  
  225.  
  226. 7 - The Settings Window.
  227.  
  228. Clicking on the 'Settings' item in the menu brings up a sub menu which has two
  229. options :- Font palette' and 'Settings'.
  230.  
  231. 'Font Palette' opens a default view of OS/2's font palette. Fonts from this can
  232. be dropped onto Infconvert. The font of the 'View' window and that of the main 
  233. window list can be saved, and these are used by Infconvert for the other view 
  234. windows in the 'Found' windows and the main lists in the 'List All' window. 
  235.  
  236. Clicking on the 'Settings' item in the menu brings up a window where most
  237. of the settings of infconvert can be altered and set. The window has a poor 
  238. man's version of an OS/2 notebook. Clicking on any of the 'tabs' brings up a
  239. 'page' of related options.
  240.  
  241.   Output File.
  242. Infconvert PM produces plain text files with the same name as the inf or hlp
  243. file, but with a .txt extension. The top box displays the name of the proposed
  244. output file of the selected file. Infconvert PM can be set to either overwrite
  245. the last output file from the selected inf, or to number output files from an
  246. extension '.tx1' to '.999'. The default is not to overwrite files. Check
  247. 'Overwrite Existing Files' to alter this. The line length and margin in the
  248. output file can be directly entered in the two fields provided. The line length
  249. is the total line length including the width of the margin. Line length can be
  250. from 40 to 500, and margin can be from 0 to 40.
  251.  
  252.  Subsections.
  253. Checking 'Convert Cross Reference' enables infconvert PM to convert some types 
  254. of inf file more neatly. If, when viewed with View.exe, an inf file shows a list
  255. down one side with 'select one' or some such above, then this selection allows 
  256. infconvert to convert all the selections sequentially in the output file. NB- it
  257. doesn't work with all this type of file - try it and see.
  258. Checking 'Convert Subsections with Parent' will make infconvert convert all
  259. subsections of a parent topic even if only the parent was selected to convert.
  260.  
  261.  Output Dir.
  262. The output directory an be set to that of the input inf or hlp file or to a 
  263. directory entered in the box provided. Infconvert checks to ensure the directory
  264. exists before accepting it.
  265.  
  266.  Blank Lines.
  267. Select 'None' for no blank lines in the output file.
  268. Select 'At Headings Only' for a blank line before and after each topic name.
  269. Select 'Throughout Text' for all blank lines in the text to be included.
  270. Infconvert always suppresses double blank lines, except where two topic 
  271. headings with no associated text appear in a file.
  272.  
  273.  Input Dirs.
  274. The directory the menu 'Open', 'Convert' and 'Search' find dialog defaults to 
  275. can be set from this 'page' for both inf and hlp files.
  276.  
  277.  Viewer.
  278. The view window provided has word wrap turned off as default, mainly for line
  279. diagrams to display properly. You can turn word wrap on so that, for example, 
  280. you can view all of some text with the view window set narrow.
  281. Viewer Line Length can be set to any desired length between 50 and 200
  282. characters. Th default is 82. If tables appear corrupted when viewed, try a 
  283. longer line length, use a monospaced font and turn word wrap off. All the VIO 
  284. fonts are monspaced as well as System Monospaced.
  285.  
  286. Checking "Sweep Select In All Files List" enables group selection in the "All 
  287. Files" window by holding down the mouse button as the mouse is dragged down the 
  288. list. Only contiguous groups of files titles may be selected with this option 
  289. enabled.
  290.  
  291.  Save Settings
  292. None of the entries set are saved to infcon.ini unless Save is pressed. In
  293. addition to the settings listed, this also saves the font used in the view 
  294. window and the window lists, and Infconverts temporary directory..
  295.  
  296.  Save Windows.
  297. The Window positions of Infconvert's main windows are saved when the program
  298. is closed. They may also be saved to the ini file by clicking on "Save Windows" 
  299. The windows of "List All" and "Found" are only saved after they have been closed
  300. once. Thus if you want to save these during a session, they must first be 
  301. opened, repositioned to the desired location, and closed. The position of the
  302. first "Found" window and "List All" window to be opened are the ones which are
  303. saved and used as a reference for the others of their type. 
  304.  
  305.  
  306. The Settings window has a minimise button and system menu for closing
  307. hiding the window. Most of the options are set by infconvert with the window
  308. open, but closing (or minimising) the window ensures all are. (The ones that may
  309. not be are those where you can enter a value. Focus must leave the entryfield
  310. window before the entry is accepted. Thus clicking on any button after finishing
  311. entries ensures all options are set.)
  312.  
  313. 8 - A Note About Fonts.
  314.  
  315. All font can be changed, but only the fonts of the topic and file lists, and 
  316. those of the view windows can be saved. One saved font is used for view windows,
  317. and a separate font saved for use in the topic and file lists.
  318. The font in the view window is initially set to system monospaced to allow 
  319. proper viewing of line drawings with ascii characters. This font can be changed
  320. from OS/2's font palette, which can be brought up from a selection under
  321. "Settings" item on the menu. If this font is changed, it is saved when the 
  322. window is closed, so that when the next view window is opened the font from the
  323. last window closed is used.  This font is subsequently used in the View
  324. windows of the Found window as well as the main window's View window. 
  325.  
  326. The font in the View part and the Topic List part of the first Found window open
  327. at any time, are similarily saved when the winodw is closed, and are set to the
  328. default fonts for other list and view windows.
  329.  I have not been able to allow an application wide font change, principally
  330. because the font of the menu can not be changed with VXRexx's internal commands.
  331.  
  332. Changes are saved in Infcon.ini only when save is pressed in the options window.
  333.  
  334. 9 - A Note about Threads.
  335.  
  336. Infconvert PM is multithreaded. All conversions and searches take place in
  337. separate threads, and each 'Found' and 'List All' window is in its own thread.
  338. Infconvert tries hard to ensure that all threads are stopped when Infconvert is
  339. closed.
  340.  
  341. 10 - Window Positions and Sizes.
  342.  
  343. The size and position of all Infconvert's main, Found and List All winodws are 
  344. saved when Infconvert closes. They can also be saved from the setting window 
  345. with the Save Windows button. The position of the first List All and Found 
  346. Window opened at any one time is the one which is saved
  347.  
  348. 11 - Infconvert's Temporary Directory and INI File.
  349.  
  350. Infconvert uses its own Ini file to store some of its settings in between
  351. sessions. This is a plain text file, which it usually puts on the same directory
  352. as Infcon.exe. If it can't find or write it there, it looks for it and tries to 
  353. write it in the same directory as OS2.INI. If neither of these directories can 
  354. be used, Infconvert will not start.
  355.  
  356. Infconvert tries to set up a temporary directory under the directory it is run 
  357. from for its temporary files. If it can't set this up when it opens, it will
  358. prompt the user for a path for this directory. It should clean out this 
  359. directory when it closes, but any files it leaves there can safely be deleted 
  360. after Infconvert has closed.
  361.  
  362. 12 - What Infconvert doesn't do.
  363.  
  364. It ignores graphics and text effects such as italics, bold type, font
  365. changes, etc. There are no hypertext links in the view window.       
  366.         
  367. Infconvert checks the top of the inf file for a byte which should be present 
  368. if the file is an inf or hlp file. If this byte isn't present infconvert 
  369. doesn't continue. There are some files on OS/2 systems which have a hlp 
  370. or inf extension, but are not of the IPF type.
  371.  
  372. 13 - Inf file oddities.
  373.  
  374. Some inf files have lots of small sections with topics with no names.
  375. Some inf files have sections which are just large lists of other topics.
  376. Some inf files have hard coded carriage returns which prevent the line length
  377. from being extended - very annoying.
  378. Some inf files reference enteries in other inf files - Infconvert can't handle 
  379. these.
  380. Some topics have no text associated with them - sometimes these appear in large 
  381. numbers at the end of files.
  382. Some topics are still shown by infconvert, although never displayed by view.exe.
  383. Topics with a nesting level of 0 are generally footnotes.
  384.  
  385. Depending on the degree of blank line stripping used, infconvert typically
  386. produces text files which are 1.25 times the size of their inf originals. With
  387. inf files with lots of graphics and complicated structures, this ratio is 
  388. nearer one, with files which have acres of text in them and little else, its
  389. nearer 1.5
  390.  
  391. Occasionally Infconvert PM will close but the Vxrexx console persists. It may be
  392. necessary to reboot to remove this console. Watcom are aware of this problem.
  393.  
  394.  
  395. 14 - History and Musings
  396.  
  397. Infconvert was produced using Watcom's VXREXX, and Emx port of the GCC 
  398. compiler, and was developed from a previous version written entirely in OS/2's
  399. REXX. All the inf file manipulation is done by the C program and all the user
  400. interaction by the VXREXX program. The C program is a PM program with no output
  401. other than to file, and only command line arguments as input. 
  402.  
  403. Because of the nature of VXREXX, a console from it is always present, though
  404. minimised, and will appear in OS/2's windows list. (The latest version of vxrexx
  405. allows this to be turned off, but for some reason this prevents Infconvert from
  406. closing some of its files properly.) If you are programming with VXRexx, please
  407. note that sometimes I cannot get Infconvert to run when the VXRexx editor is
  408. also running.
  409.  
  410.  The bulk of my understanding of IPF files comes from studying hex dumps of inf
  411. files and the text they produced. However I am indebted to Carl Hauser for some
  412. information from his document Info1.doc, in regard to which bits are set for
  413. various nesting conditions. 
  414.  
  415. Info1.doc has now been upgraded by Marcus Groeber, (its now Info2.doc) and is 
  416. now accurate in in its description of the inf file header. Info2.doc will point
  417. you in the right direction if you wish to produce an inf viewer. Apart from a 
  418. few little differences it now is similar to my understanding of IPF file
  419. structure. It is, however, written in "C" pseudocode, and is thus difficult for
  420. "non C" people to understand.
  421.  
  422.  For the record, I deciphered the IPF file stucture independently, duplicating
  423. much of the work which Carl and Marcus had done and, with the exception of 
  424. the nesting levels mentioned above, nothing I have included in Infconvert has
  425. been derived from Info1.doc or Info2.doc.
  426.  
  427. I didn't see either of these files until after my decoding effort was done. Its
  428. not that wouldn't have used the information if I had found it, just that I 
  429. didn't find it till it was too late!
  430.  
  431.  
  432. 15 - Registration.
  433.  
  434. Infconvert PM is Shareware. You have a licence to use and evaluate
  435. Infconvert PM for a period of sixty days. If you wish to use it past this point,
  436. you are obliged to register your copy. The registration fee is 10 pounds 
  437. Sterling and should be sent to me at the address below. Unfortunately at this
  438. stage I am unable to accept credit cards or cheques drawn on non UK banks in
  439. currencies other than sterling. Eurocheques and International money orders are
  440. acceptable, however. Please contact me for bulk order discounts. All
  441. registrations will be acknowledged, and a registration number issued which will
  442. turn off the opening information and nag screen. Registration will be for all
  443. future beta releases and at least the first non beta release.
  444.  
  445. 16 - Version & Files.
  446.  
  447.        The zip file, Infxdl85.lzh, contains the following files;
  448.                 Infcon.exe - the VXRexx 'exe' file.
  449.                 Infccona.exe - the C exe file.
  450.                 Infcon.doc - this document.                
  451.                 Infprint.cmd - a small print utility program.
  452.                 Infprint.doc - some notes for the above.
  453.                 Whats.New - changes over versions.
  454.                 ReadMe.1st - get going with this.
  455.  
  456. The file Vrobj.dll (ver1.01), Watcom's runtime .dll is required to run
  457. Infconvert. I have not included it with this version of Infconvert, as it 
  458. appears to be readily available on its own, and was distributed with a previous 
  459. version's archive -(Infcnb79.lzh). I can make a version of this archive with the
  460. .dll included available for anyone who needs it.
  461.     
  462. These may be freely distributed until a later version is released, provided :-
  463.  1) All the files must be distributed together, unaltered and in full.
  464.  2) Infconvert PM may not be bundled with any commercial product.
  465.  
  466. 17 - Copyright, Disclaimer and Author.
  467.  
  468.   (c) Copyright Colin Thomson 1994.  All Rights Reserved.
  469.    No warranty of any kind is implied or given.
  470.    No liability is accepted for any consequences of the use of this program.
  471.  
  472. My address is :- Colin Thomson, 9, Manor Park, Oakworth, Keighley,
  473.                                  West Yorkshire, UK, BD22 7PW.
  474.  
  475.     Fidonet  - DoNoR/2  (2:440/4)           1st March 1994.
  476.     Internet - colin@donor2.ukmail.net
  477.       _____________________________________
  478.