Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rad15610 r34509d5  
    1818  struct hostent *hent;
    1919  char hostname[MAXHOSTNAMELEN];
    20   char *cd;
    2120
    2221  g->malloced=0;
     
    8786  g->homedir=owl_strdup(getenv("HOME"));
    8887
    89   g->confdir = NULL;
    90   g->startupfile = NULL;
    91   cd = owl_sprintf("%s/%s", g->homedir, OWL_CONFIG_DIR);
    92   owl_global_set_confdir(g, cd);
    93   owl_free(cd);
    94 
    9588  owl_messagelist_create(&(g->msglist));
    9689  owl_mainwin_init(&(g->mw));
     
    326319}
    327320
    328 char *owl_global_get_confdir(owl_global *g) {
    329   if (g->confdir) return(g->confdir);
    330   return("/");
    331 }
    332 
    333 /*
    334  * Setting this also sets startupfile to confdir/startup
    335  */
    336 void owl_global_set_confdir(owl_global *g, char *cd) {
    337   free(g->confdir);
    338   g->confdir = owl_strdup(cd);
    339   free(g->startupfile);
    340   g->startupfile = owl_sprintf("%s/startup", cd);
    341 }
    342 
    343 char *owl_global_get_startupfile(owl_global *g) {
    344   if(g->startupfile) return(g->startupfile);
    345   return("/");
    346 }
    347 
    348321int owl_global_get_direction(owl_global *g) {
    349322  return(g->direction);
     
    545518    len+=strlen(argv[i])+5;
    546519  }
    547   g->startupargs=malloc(len+5);
     520  g->startupargs=owl_malloc(len+5);
    548521
    549522  strcpy(g->startupargs, "");
Note: See TracChangeset for help on using the changeset viewer.