Generic INI save and restore: Difference between revisions
Created page with "==Description== A pair of utilities that convert INI files to and from human-readable form. Many programs need a way to save their configuration data. (Window positions, pro..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
A pair of utilities that convert INI files to and from human-readable form. | A pair of utilities that convert INI files to and from human-readable form. | ||
Line 7: | Line 6: | ||
There are two good reasons why you would want to use LoadINI and DumpINI: | 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. | * 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. | * 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. | ||
==License== | ==License== | ||
* GNU GPL V3 | *GNU GPL V3 | ||
*Author: [[Peter Moylan]] | |||
==Links== | ==Links== | ||
* http://www.pmoylan.org/pages/os2/genini.html | * http://www.pmoylan.org/pages/os2/genini.html | ||
[[Category:Software]] | [[Category:Open Source Software]] |
Revision as of 15:02, 11 January 2018
A pair of utilities that convert INI files to and from human-readable form.
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.
License
- GNU GPL V3
- Author: Peter Moylan