Changeset 4642 for trunk/gsdl/src/w32server/settings.cpp
- Timestamp:
- 2003-06-13T12:24:12+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/settings.cpp
r4339 r4642 27 27 28 28 #include "text_t.h" 29 #include "fileutil.h" 29 30 30 31 #if defined(GSDL_USE_OBJECTSPACE) … … 63 64 char gsdl_browser_exe[MAX_FILENAME_SIZE] = ""; 64 65 text_t gsdl_url; 66 text_t gsdl_conffile; 65 67 int gsdl_start_browser = 1; 66 68 … … 269 271 270 272 void write_settings (const text_t url) { 271 char conffile[MAX_FILENAME_SIZE]; 272 273 strcpy (conffile, data_location); 274 remove_end_slashes (conffile); 275 strcat (conffile, "\\gsdlsite.cfg"); 276 277 ofstream fout (conffile); 273 274 if (gsdl_conffile.empty()) { 275 find_location(); 276 gsdl_conffile = filename_cat(data_location, "gsdlsite.cfg"); 277 } 278 279 char *conffile_c = gsdl_conffile.getcstr(); 280 ofstream fout (conffile_c); 281 delete conffile_c; 278 282 if (fout) { 279 283 … … 397 401 398 402 void read_settings (int netscapeneeded) { 399 char conffile[MAX_FILENAME_SIZE]; 400 401 find_location(); 402 403 strcpy (conffile, data_location); 404 remove_end_slashes (conffile); 405 strcat (conffile, "\\gsdlsite.cfg"); 403 404 if (gsdl_conffile.empty()) { 405 find_location(); 406 gsdl_conffile = filename_cat(data_location, "gsdlsite.cfg"); 407 } 406 408 407 409 // set up defaults … … 410 412 text_t key, value, section; 411 413 char *cstr_value; 414 char *conffile_c = gsdl_conffile.getcstr(); 412 415 #if defined (GSDL_USE_IOS_H) 413 ifstream conf (conffile , ios::nocreate);416 ifstream conf (conffile_c, ios::nocreate); 414 417 #else 415 ifstream conf (conffile );418 ifstream conf (conffile_c); 416 419 #endif 420 delete conffile_c; 417 421 if (conf) { 418 422 while (read_ini_line(conf, key, value) >= 0) {
Note:
See TracChangeset
for help on using the changeset viewer.