- Timestamp:
- Jul 8, 2007, 3:37:43 PM (18 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- be98ba5
- Parents:
- 93f65b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
global.c
rf1fc47f rb363d83 86 86 g->homedir=owl_strdup(getenv("HOME")); 87 87 88 g->confdir = NULL; 89 g->startupfile = NULL; 90 char * cd = owl_sprintf("%s/%s", g->homedir, OWL_CONFIG_DIR); 91 owl_global_set_confdir(g, cd); 92 owl_free(cd); 93 88 94 owl_messagelist_create(&(g->msglist)); 89 95 owl_mainwin_init(&(g->mw)); … … 319 325 } 320 326 327 char *owl_global_get_confdir(owl_global *g) { 328 if (g->confdir) return(g->confdir); 329 return("/"); 330 } 331 332 /* 333 * Setting this also sets startupfile to confdir/startup 334 */ 335 void owl_global_set_confdir(owl_global *g, char *cd) { 336 free(g->confdir); 337 g->confdir = owl_strdup(cd); 338 free(g->startupfile); 339 g->startupfile = owl_sprintf("%s/startup", cd); 340 } 341 342 char *owl_global_get_startupfile(owl_global *g) { 343 if(g->startupfile) return(g->startupfile); 344 return("/"); 345 } 346 321 347 int owl_global_get_direction(owl_global *g) { 322 348 return(g->direction);
Note: See TracChangeset
for help on using the changeset viewer.