Generic INI save and restore



Many programs need a way to save their configuration data. (Window positions, program options, etc.) OS/2 uses INI files for this purposes. The INI file format is a binary file format that is efficient in terms of rapid access, but it is not human-readable. The present package provides a way of saving INI data in human-readable form. The DumpINI program converts a binary INI file into a corresponding plain-text form. The LoadINI program performs the reverse conversion: it translates human-readable data into the binary INI form.

The original OS/2 design probably envisaged that there would be just two INI files: OS2SYS.INI for the system data, and OS2.INI for the application data. Experience has shown us, however, that it is not a good idea to keep all application data in a central registry. We have evolved towards a more robust design, where each application saves its own configuration data. Some application programmers have chosen to use application-specific configuration files, but many still use INI files for that purpose.

There are two good reasons why you would want to use LoadINI and DumpINI:

  • As a matter of principle, you should keep backups of your INI data. Of course there are existing simple solutions (a periodic "copy app.ini app.ini.bak"), but having a human-readable backup might be more robust.

  • There is a design bug in OS/2 that causes INI data to be lost under certain "out of memory" conditions. This motivates us to move towards a system that does not depend on the native INI support.

In the interests of better development, this package is free and open-source. You may redistribute these utilities, or derived versions, under the conditions of the GNU General Public License. You may also use the TNI format and the TNI code in your own applications, without restriction other than what is implied in the GNU General Public License.

Download

You can get this software from ftp://ftp.pmoylan.org/software/genini_2.0.zip. The source code can be downloaded from ftp://ftp.pmoylan.org/software/geninisrc_2.0.zip.





  OS/2 home
Software

RTFM

Download




Author: Peter Moylan

Last updated: 18 November 2020