Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ConfigFile by
Diff: ConfigFile.cpp
- Revision:
- 4:940510a29b44
- Parent:
- 3:7250e339328c
- Child:
- 5:56d544b8e5c6
diff -r 7250e339328c -r 940510a29b44 ConfigFile.cpp
--- a/ConfigFile.cpp Sun Sep 12 07:37:25 2010 +0000
+++ b/ConfigFile.cpp Sun Sep 12 07:53:10 2010 +0000
@@ -250,7 +250,7 @@
return true;
}
-bool ConfigFile::write(char *file, FileFormat ff) {
+bool ConfigFile::write(char *file, char *header, FileFormat ff) {
/*
* Open the target file.
*/
@@ -279,6 +279,13 @@
}
/*
+ * Write the header.
+ */
+ if (header != NULL) {
+ fprintf(fp, "%s%s", header, newline);
+ }
+
+ /*
* Write the data.
*/
for (int i = 0; i < MAXCONFIG; i++) {
