THIS IS NOT FOR RE-DISTRIBUTION, AND IT SHOULD NOT BE PUBLICLY DISCUSSED
IT IS BETA SOFTWARE FOR MEMBERS OF THE VIPER X-SERVER BETA TESTERS ONLY.

 * COPYRIGHT 1994 BY HARRY LANGENBACHER
 * HARRY LANGENBACHER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS. IN NO EVENT SHALL HARRY LANGENBACHER BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
 * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 ----------------------------------------------------------------------

   NOTE - ADJUSTMENTS HAVE BEEN MADE FOR MODEDB LINES FOR 16 or 24
	bit color modes - the 4 horizontal timing numbers have been
	divided by 2 or 4 for 16 or 24 bit modes respectively.  and
	if the 2nd horizontal timing number (hsync start) must be
	greater than the 1st number (the horizontal resolution).

	I think there is no reason not to use the 8-bit timing
	numbers for 16 or 24 bit color modes, but some software
	will generate different timings for different color modes
	in viper.ini. With the adjustments made, the 8-bit, 16-bit
	and 24-bit modedb lines will probably look the same for
	the same resolution, unless you use Himalayan Software
	setmode.exe

Usage:  ini2xconfig x y colorbits [viper.ini_style_file]

where x is the horizontal resolution, y is the vertical res., colorbits
is the number of bits of color per pixel (24 bits of color uses 32 bits
in h/w and s/w) as shown in the viper.ini file, and
viper.ini_style_file defaults to viper.ini

      unlike the sample code, which accepts header if and only if it is at
      the end of a line (even if the line starts with ; or ; or
      anything other than the header) - I will accept header only if
      it's at beginning of line, regardless of what it's followed by
      on the line 
where header is [hardware] or [XxYxBPP]
---------------------------
ini2xconfig or ini2xconfigstatic - interprets your viper.ini, and outputs
modedb lines for you Xconfig.
ini2xconfig compiled and stripped with Linux 1.08, gcc 2.5.8, libc.so.4.5.24.
ini2xconfigstatic here is a statically linked version of ini2xconfig
 (so it runs under any *nix?????).

ini2xconfig is different from the original method of
interpreting viper.ini - it will accept mode sections and hardware
section - only if it starts in the 1st column of the line like:

[1152x900x8]
or
[hardware]

 ... while

;[1152x900x8] or
anything[1152x900x8]

are treated like commments

also ini2xconfig:
 
- has more error detection, no defaults for resolution dependent
  stuff, and tells you what it uses for defaults on res-independent
  stuff.
- accepts dos OR *nix format files (issues warning for DOS format)
 
-----------------------------
ini2xconfigallmodes
quick and dirty - looks at all modes in your viper.ini with ini2xconfig


Harry Langenbacher harry@jpl.nasa.gov  7-23-94
