/*
 * This app reads 8-bpp PCX files in the format described below and adds
 * them to the token database using a sort of annonymous token that will
 * be recognized by GeoManager when you create a DOS launcher.  This app
 * is here to make importing icons meant for DOS launchers easier on the
 * lucky fellow who gets to do it.
 *
 * The particular PCX format supported here is:
 *   8-bit per pixel, indexed (any color map you like)
 *   Mask MUST be color index 1
 *   PCX file contains two icons for application, 48x30 and 15x15
 *   PCX file must be at least 65x31 BECAUSE
 *    - 48x30 icon must start at (1,1)
 *    - 15x15 icon must start at (50,1)
 *    (where the upper-left-hand corner is origin (0,0))
 *
 *
 * NOTE 1:
 * Most of the PCX conversion code ported from cvtpcx.c, a unix/dos
 * utility to convert PCX files into visMonikers.
 *
 * NOTE 2:
 * If you cared, the tokens created by this thing are of a manufacturer
 * id: MANUFACTURER_ID_DOS_LAUNCHER (5).  To find unique 4 char token
 * string, we get all tokens matching manufID 5 and sort them based on
 * their token strings.  Then, our first attempt is with the string
 * "0AAA" (that's a zero).  If that is taken, we move to "0AAB", etc,
 * eventually moving to "0AAZ" and then "0ABA", etc.  If you notice,
 * the icons that appear in the icon list in this app are in a different
 * order then the ones that appear in GeoManager's Create/Edit Launcher
 * dialog because these are sorted.
 *
 * NOTE 3: (Added by R. Bettsteller, 2013)
 * I have slightly modified this program.
 * This version of the program can easy create icons that have an other
 * id than 5. In fact, this program was able to do that before, but this
 * feature was not easy to find. Now, you may use your own id to create 
 * icons for your R-BASIC programs.
 *
 */