Download Kylix source code

Objective: Convert conf-style files to ini-style files, such as:

CONF style: port 110
INI style: port=110

This Kylix project helps me open and convert a CONF file that I use in Linux and lacks the = character in its assignments into the INI format which I plan to use to edit parameters. I don't know whether Kylix has a better way to deal with such CONF files; I just like to use the functionality of the unit Inifiles.

First, I open the file and read it into a memo, then convert it and save it in another memo, after inserting a section header and the = signs so that it looks like a regular INI file.

Then, I can save the INI-style file and manipulate it with the Inifiles functionality.

Finally, I convert the file back to the =-less style, replace the section header with a comment, write it into the first memo object and save the file as a conf file.

Trying to play it safe, I also rename the original conf file to conf-ori and generate a backup of the conf file thusly modified.

There may be better and safer ways to do this; and this example program comes without warranty of any kind, express or implied. Use it only for study purposes.

There are two memos, one panel, and four buttons on the panel:

BuckRocks to the Rescue? You be the judge. I bet for experienced Linux coders, this is a non-issue.