|
|
|
@ -82,10 +82,15 @@ CONFIGFILEPTR ConfigFileRead(BPTR configFile) |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
VOID ConfigFileSave(CONFIGFILEPTR abstractConfigFile) |
|
|
|
|
VOID ConfigFileSaveOverwrite(CONFIGFILEPTR abstractConfigFile) |
|
|
|
|
{ |
|
|
|
|
struct ConfigFile* configFile = (struct ConfigFile*)abstractConfigFile; |
|
|
|
|
BPTR file = Open(configFile->filename, MODE_NEWFILE); |
|
|
|
|
ConfigFileSaveCopyTo(abstractConfigFile, configFile->filename); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
VOID ConfigFileSaveCopyTo(CONFIGFILEPTR abstractConfigFile, STRPTR newFilename) |
|
|
|
|
{ |
|
|
|
|
BPTR file = Open(newFilename, MODE_NEWFILE); |
|
|
|
|
if( file != 0 ) |
|
|
|
|
{ |
|
|
|
|
ConfigFileWrite(abstractConfigFile, file); |
|
|
|
@ -93,6 +98,7 @@ VOID ConfigFileSave(CONFIGFILEPTR abstractConfigFile) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VOID ConfigFileWrite(CONFIGFILEPTR abstractConfigFile, BPTR file) |
|
|
|
|
{ |
|
|
|
|
ULONG index = 0; |
|
|
|
|