continuation", where a backslash followed immediately by EOL (end-of-line) causes the line break to be ignored, and the "logical line" to be continued on the next actual line from the INI file. Implementation of various "special characters" with escape sequences is also seen. Accessing INI files Under Windows, the Profile API is the programming interface used to read and write settings from classic Windows .ini files. For example, the GetPrivateProfileString function retrieves a string from the specified section in an initialization file. (The "private" profile is contrasted with , which fetches from WIN.INI.) The following sample C program demonstrates reading property values from the above sample INI file (let the name of configuration file be dbsettings.ini): #include <windows.h> int main(int argc, _TCHAR *argv[]) { _TCHAR dbserver[1000]; int dbport; GetPrivateProfileString("database", "server", "127.0.0.1", dbserver, sizeof(dbserver) / sizeof(dbserver[0]), ".\\dbsettings.ini"); dbport = GetPrivateProfileInt("database", "port", 143, ".\\dbsettings.ini"); // N.B. WritePrivateProfileInt() does not exist return 0; } The third parameter of the GetPrivateProfileString function is the default value, which are "127.0.0.1" and 143 respectively in the two function calls above. If the argument supplied for this parameter is NULL, the default is an empty string, "". Under Unix, many different configuration libraries exist to access INI files. They are often already included in frameworks and toolkits. Examples of INI parsers for Unix include GLib, iniparser and libconfini. Comparison of INI parsers File mapping Initialization file mapping creates a mapping between an INI file and the Registry. It was introduced with Windows NT and Windows 95 as a way to migrate from storing settings in classic .ini files to the new Windows Registry. File mapping traps the Profile API calls and, using settings from the IniFileMapping Registry section, directs reads and writes to appropriate places in the Registry. Using the example below, a string call could be made to fetch the name key from the owner section from a settings file called, say, dbsettings.ini. The returned value should be the string "John Doe": GetPrivateProfileString("owner", "name", ... , "c:\\programs\\oldprogram\\dbsettings.ini"); INI mapping takes this Profile API call, ignores any path in the given filename and checks to see if there is a Registry key matching the filename under the directory: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\ CurrentVersion\IniFileMapping If this exists, it looks for an entry name matching the requested section. If an entry is found, INI mapping uses its value as a pointer to another part of the Registry. It then looks up