Changeset 2008 in orxonox.OLD
- Timestamp:
- Jun 22, 2004, 11:10:00 AM (20 years ago)
- Location:
- orxonox/branches/gui/guicc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/gui/guicc/orxonox_gui.cc
r2007 r2008 53 53 flags->setTextFromFlags (orxonoxGUI); 54 54 55 exec->setFilename (" test");55 exec->setFilename ("~/.orxonox.conf"); 56 56 exec->readFromFile (orxonoxGUI); 57 57 orxonoxGUI->listOptions(); -
orxonox/branches/gui/guicc/orxonox_gui_exec.cc
r2007 r2008 5 5 OrxonoxGuiExec::OrxonoxGuiExec (Window* orxonoxGUI) 6 6 { 7 configFile = (char*)malloc (256*sizeof(char));7 configFile = (char*)malloc (512*sizeof (char)); 8 8 9 9 execFrame = new Frame ("Execute-Tags:"); … … 36 36 void OrxonoxGuiExec::setFilename (char* filename) 37 37 { 38 39 if (filename) 40 sprintf(configFile, "%s", filename); 38 char* buffer = (char*) malloc (512*sizeof(buffer)); 39 sprintf (buffer, "%s", filename); 40 if (!strncmp (buffer, "~/", 2)) 41 { 42 #ifdef __WIN32__ 43 sprintf (configFile, "%s/%s", getenv ("USERPROFILE"), buffer+2); 44 #else 45 sprintf (configFile, "%s/%s", getenv ("HOME"), buffer+2); 46 #endif 47 } 48 else if (buffer) 49 sprintf(configFile, "%s", buffer); 50 delete buffer; 41 51 } 42 52
Note: See TracChangeset
for help on using the changeset viewer.