diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:19:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-02-22 12:19:12 +0000 |
commit | 22b7701fe75cce9afdbc27046821dc089f9e7dac (patch) | |
tree | ca5b4f0428fad0fc9c775dfb0ac879ddee863846 /apps/settings.c | |
parent | 376057d2b67bae0a7b24ae1715d3cbb0b540b7a9 (diff) | |
download | rockbox-22b7701fe75cce9afdbc27046821dc089f9e7dac.tar.gz rockbox-22b7701fe75cce9afdbc27046821dc089f9e7dac.zip |
Build cleanup and general fixes. fprintf() is now fdprintf(), the separation
between uisimulator files and firmware/apps files are better done.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6031 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/settings.c b/apps/settings.c index ba80bfb9d9..86c1178745 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -1127,13 +1127,13 @@ static void save_cfg_table(const struct bit_entry* p_table, int count, int fd) | |||
1127 | 1127 | ||
1128 | if (p_run->cfg_val == NULL) /* write as number */ | 1128 | if (p_run->cfg_val == NULL) /* write as number */ |
1129 | { | 1129 | { |
1130 | fprintf(fd, "%s: %ld\r\n", p_run->cfg_name, value); | 1130 | fdprintf(fd, "%s: %ld\r\n", p_run->cfg_name, value); |
1131 | } | 1131 | } |
1132 | else /* write as item */ | 1132 | else /* write as item */ |
1133 | { | 1133 | { |
1134 | const char* p = p_run->cfg_val; | 1134 | const char* p = p_run->cfg_val; |
1135 | 1135 | ||
1136 | fprintf(fd, "%s: ", p_run->cfg_name); | 1136 | fdprintf(fd, "%s: ", p_run->cfg_name); |
1137 | 1137 | ||
1138 | while(value >= 0) | 1138 | while(value >= 0) |
1139 | { | 1139 | { |
@@ -1146,9 +1146,9 @@ static void save_cfg_table(const struct bit_entry* p_table, int count, int fd) | |||
1146 | write(fd, &c, 1); /* char by char, this is lame, OK */ | 1146 | write(fd, &c, 1); /* char by char, this is lame, OK */ |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | fprintf(fd, "\r\n"); | 1149 | fdprintf(fd, "\r\n"); |
1150 | if (p_run->cfg_val != off_on) /* explaination for non-bool */ | 1150 | if (p_run->cfg_val != off_on) /* explaination for non-bool */ |
1151 | fprintf(fd, "# (possible values: %s)\r\n", p_run->cfg_val); | 1151 | fdprintf(fd, "# (possible values: %s)\r\n", p_run->cfg_val); |
1152 | } | 1152 | } |
1153 | } | 1153 | } |
1154 | } | 1154 | } |
@@ -1195,21 +1195,21 @@ bool settings_save_config(void) | |||
1195 | return false; | 1195 | return false; |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | fprintf(fd, "# >>> .cfg file created by rockbox %s <<<\r\n", appsversion); | 1198 | fdprintf(fd, "# .cfg file created by rockbox %s - ", appsversion); |
1199 | fprintf(fd, "# >>> http://rockbox.haxx.se <<<\r\n#\r\n"); | 1199 | fdprintf(fd, "http://www.rockbox.org\r\n#\r\n"); |
1200 | fprintf(fd, "#\r\n# wps / language / font \r\n#\r\n"); | 1200 | fdprintf(fd, "#\r\n# wps / language / font \r\n#\r\n"); |
1201 | 1201 | ||
1202 | if (global_settings.wps_file[0] != 0) | 1202 | if (global_settings.wps_file[0] != 0) |
1203 | fprintf(fd, "wps: %s/%s.wps\r\n", ROCKBOX_DIR, | 1203 | fdprintf(fd, "wps: %s/%s.wps\r\n", ROCKBOX_DIR, |
1204 | global_settings.wps_file); | 1204 | global_settings.wps_file); |
1205 | 1205 | ||
1206 | if (global_settings.lang_file[0] != 0) | 1206 | if (global_settings.lang_file[0] != 0) |
1207 | fprintf(fd, "lang: %s/%s.lng\r\n", ROCKBOX_DIR LANG_DIR, | 1207 | fdprintf(fd, "lang: %s/%s.lng\r\n", ROCKBOX_DIR LANG_DIR, |
1208 | global_settings.lang_file); | 1208 | global_settings.lang_file); |
1209 | 1209 | ||
1210 | #ifdef HAVE_LCD_BITMAP | 1210 | #ifdef HAVE_LCD_BITMAP |
1211 | if (global_settings.font_file[0] != 0) | 1211 | if (global_settings.font_file[0] != 0) |
1212 | fprintf(fd, "font: %s/%s.fnt\r\n", ROCKBOX_DIR FONT_DIR, | 1212 | fdprintf(fd, "font: %s/%s.fnt\r\n", ROCKBOX_DIR FONT_DIR, |
1213 | global_settings.font_file); | 1213 | global_settings.font_file); |
1214 | #endif | 1214 | #endif |
1215 | 1215 | ||