home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / infidx13.zip / infidx.doc < prev    next >
Text File  |  1993-07-03  |  7KB  |  139 lines

  1.  * INFIDX
  2.  *
  3.  * -----ABSTRACT-------------------------------------------------------------
  4.  * A program to open an INF-file from a user configurable selection-listbox
  5.  * of all INF-files.
  6.  *
  7.  * -----PURPOSE--------------------------------------------------------------
  8.  * As I have much of my INF-files on a removable MO-disk, I don't
  9.  * want to create static WPS-objects for them, but I need a way to
  10.  * decect dynamically which INF-files are there and display only these ones.
  11.  * (Is the disk insertet or not?)
  12.  *
  13.  * Other advanteges are:
  14.  *  - fixed screen portion needed (independent of number of INF-files)
  15.  *  - order/sorting determined by user (order of dirs in BOOKSHELF and order
  16.  *    of entries in the config files)
  17.  *  - the setup is easily ported over all reinstallations, as it is done in
  18.  *    plain text files
  19.  *  - you can add your own (longer) titles to the INF-files in the list
  20.  *
  21.  * This program is to fullfill this job. It will search in all directories
  22.  * listed in the environment variable BOOKSHELF for a file called 'infidx'.
  23.  * These configuration files must hold the name and a description for all
  24.  * the INF-files that are to be shown in the selection list. There may reside
  25.  * one 'infidx'-file in each scanned directory and the contents of all of them
  26.  * is shown in the list in the order the entries are read.
  27.  *
  28.  * -----INSTALLATION---------------------------------------------------------
  29.  * This is a standalone program (no entries in INI-files no DLL). All you need
  30.  * is the EXE (in your PATH) and the following setup:
  31.  *  - Add all the directories containing your INF-files to the environment
  32.  *    variable BOOKSHELF.
  33.  *    NOTE: - Order matters. The directories are scanned in this order and by
  34.  *            this the directory of the INF-files you need most often should
  35.  *            come first.
  36.  *          - It is save to name not (allways) available drives/directories
  37.  *            like A:.
  38.  *  - Create a configuration file in all directories named in BOOKSHELF.
  39.  *    (see "infidx-FILE_FORMAT")
  40.  *    NOTE: -- Not all directories MUST have a config file.
  41.  *          -- It is possible to have absolute pathes in the config files and
  42.  *             let them refere to INF-files not in the directory of the
  43.  *             config-file, but this is NOT recommended. By this you would
  44.  *             have spread the information where your INF-files are located
  45.  *             and a movement of the files would make it neccessary to edit
  46.  *             the config-files too and not just adjust BOOKSHELF.
  47.  *  - Positioning of the list on screen.
  48.  *    The dialog with the list will startup at a fixed position. This position
  49.  *    defaults to the lower left corner of the screen (coordinates 0,0).
  50.  *    You can change the position in two ways:
  51.  *    - Set an environment variable by     "set INFIDX=yourx,youry"
  52.  *    - Invoke the program with arguments  "infidx yourx youry"
  53.  *
  54.  * -----INVOCATION-----------------------------------------------------------
  55.  * Start the program by:
  56.  *      infidx [yourx youry]
  57.  * (See INSTALLATION about the parameters.)
  58.  *
  59.  * -----USING----------------------------------------------------------------
  60.  * The program interfaces the user with a dialog. This dialog contains a
  61.  * listbox, and four buttons (OPEN, EXIT, REINIT and ABOUT).
  62.  *
  63.  * To view an INF-file, select the corresponding entry in the listbox and push
  64.  * the OPEN button.
  65.  *
  66.  * To exit the program just push the EXIT button.
  67.  *
  68.  * To rebuild the list after any changes made by you (changes of a config file
  69.  * or media changes in drives in your BOOKSHELF-path).
  70.  *
  71.  * -----infidx-FILE_FORMAT---------------------------------------------------
  72.  * These files can hold entry- and comment-lines. A comment-line starts with
  73.  * a '#' in the first column. All other lines are interpreted as entry-lines.
  74.  * An entry-line must hold at least two 'words'. The first word ist the param
  75.  * given to view (the name of the INF-file. All other words are the title that
  76.  * will be displayed in the list.
  77.  *
  78.  * Entry-lines are processed in the following way:
  79.  *  - remove trailing white-space
  80.  *  - skip leading white-space
  81.  *  - store the first sequence of non-white-space-characters as the argument
  82.  *    that will be passed to VIEW.EXE if this entry is selected
  83.  *    (You must not include the path of an INF-file, if it resides in the
  84.  *     same directory as the 'infidx'-file just processed, as a change dir to
  85.  *     this place will take place on the start of this entry.)
  86.  *  - skip the white-space following this first 'word'
  87.  *  - store the rest of the line as the entry-text to be shown in the list
  88.  *
  89.  * Sample-entry-lines
  90.  *   GG243730.INF                  Redbook 1 Control Program (general info)
  91.  *   GG243730.INF+GG243731.INF     Redbook 1 & 2
  92.  *   G:\BOOK.ADD\GG243730.INF      Redbook 1 Control Program (general info)
  93.  *
  94.  * -----LIMITS---------------------------------------------------------------
  95.  * The program can only handle 300 entries at all. To increase this value
  96.  * change the define in the header and recompile.
  97.  *
  98.  * -----IMPLEMENTATION-------------------------------------------------------
  99.  * This is a one day program and this shows the source. Do not blame me for the
  100.  * layout, grouping and endless functions. I wanted this program and I wanted
  101.  * to build it with C++ and a the IBM GUI-class-lib. But hello-world was over
  102.  * 500K in size after the half of this day. So I had to switch back to C-mode
  103.  * and hand made PM-calls on the run. (I hope XVT will lead to smaller EXE's
  104.  * in the future.)
  105.  *
  106.  * The program is made of a window and a dialog.
  107.  * The window does no user interaction, but is resposible for:
  108.  * - scanning the config-files
  109.  * - starting the view processes (via system("start /N view param"))
  110.  * - starting the dialog
  111.  * The dialog does all the user interaction.
  112.  *
  113.  * The building environment:
  114.  * - OS/2 2.1 GA (de)
  115.  * - IBM C/C++ Set/2 (beta B4)
  116.  * - TOOLKIT-20
  117.  * - LINK386 (version 2.01.005,  16.3.93)
  118.  * - NMAKE   (version 2.001.000, 11.2.93)
  119.  *
  120.  * -----LICENCE--------------------------------------------------------------
  121.  * This program may be used for free. You may distribute the WHOLE packet
  122.  * UNMODIFIED for any NONCOMERCIAL purpose.
  123.  * The source code is primaly supplied to allow recompilations for other
  124.  * OS/2 versions (if it is necessary at all). It although makes bugfixes and 
  125.  * enhancements possible. If you do something of the later please send the
  126.  * CHANGES TO ME, so that I can merge them in and release them. I would not
  127.  * like you to make any changes and distribute the program under the same
  128.  * name. You may use the code as a base for own developments but it would
  129.  * be nice to MENTION MY NAME.
  130.  *
  131.  * Just use it!
  132.  *
  133.  * -----DISCLAIMER-----------------------------------------------------------
  134.  * THIS PROGRAM DOES NOT FULLFILL ANY TASK AT ALL. THE ONLY GUARANTEE GIVEN
  135.  * IS, THAT THE PROGRAM WILL DAMAGE AND DESTROY THE HARDWARE AND SOFTWARE IT
  136.  * IS RUN ON. THE AUTHOR (THATS ME) IS NOT LIABLE FOR ANY LOSS YOU GET AS THE
  137.  * RESULT OF USING THIS PROGRAM.
  138.  *
  139.