Changeset 38cf544c for owl.c


Ignore:
Timestamp:
Jun 4, 2003, 12:04:54 AM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
96f8e5b
Parents:
fd93b41
Message:
Added the 'startup' and 'unstartup' commands
The $HOME/.owl directory is created on startup if it does not exist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r3abf28b r38cf544c  
    2222#include <sys/param.h>
    2323#include <sys/types.h>
     24#include <sys/stat.h>
    2425#include "owl.h"
    2526
     
    3738  time_t nexttime, now;
    3839  struct tm *today;
     40  char *dir;
    3941
    4042  argcsave=argc;
     
    123125    init_pair(OWL_COLOR_WHITE,   COLOR_WHITE,   -1);
    124126  }
     127
    125128   
    126129  /* owl init */
     
    128131  if (debug) owl_global_set_debug_on(&g);
    129132  owl_global_set_startupargs(&g, argcsave, argvsave);
    130   owl_context_set_readconfig(owl_global_get_context(&g));
     133
     134  /* create the owl directory, in case it does not exist */
     135  dir=owl_sprintf("%s/%s", owl_global_get_homedir(&g), OWL_CONFIG_DIR);
     136  mkdir(dir, S_IRWXU);
     137  owl_free(dir);
    131138
    132139  /* set the tty, either from the command line, or by figuring it out */
     
    138145
    139146  /* setup the default filters */
    140 
    141147  /* the personal filter will need to change again when AIM chat's are
    142148   *  included.  Also, there should be an %aimme% */
     
    191197  owl_view_create(owl_global_get_current_view(&g), f);
    192198
     199  /* process the startup file */
     200  owl_function_execstartup();
     201
     202
    193203  /* read the config file */
     204  owl_context_set_readconfig(owl_global_get_context(&g));
    194205  ret=owl_readconfig(configfile);
    195206  if (ret) {
Note: See TracChangeset for help on using the changeset viewer.