Changeset a0a5179 for owl.c


Ignore:
Timestamp:
Nov 19, 2003, 11:19:03 PM (20 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f1645da
Parents:
52f3507
Message:
blist works for AIM even if the zephyr .anyone can't be read
AIM Buddy debugging
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r52f3507 ra0a5179  
    5757#endif
    5858
     59  owl_function_debugmsg("startup: it's the very best place to start");
     60
     61  owl_function_debugmsg("startup: processing command line arguments");
    5962  argcsave=argc;
    6063  argvsave=argv;
     
    106109#ifdef HAVE_LIBZEPHYR
    107110  /* zephyr init */
     111  owl_function_debugmsg("startup: initializing zephyr");
    108112  ret=owl_zephyr_initialize();
    109113  if (ret) {
     
    113117 
    114118  /* signal handler */
     119  owl_function_debugmsg("startup: setting up signal handler");
    115120  sigact.sa_handler=sig_handler;
    116121  sigemptyset(&sigact.sa_mask);
     
    120125
    121126  /* screen init */
     127  owl_function_debugmsg("startup: initializing screen");
    122128  sprintf(buff, "TERMINFO=%s", TERMINFO);
    123129  putenv(buff);
     
    143149
    144150  /* owl global init */
     151  owl_function_debugmsg("startup: doing owl global initialization");
    145152  owl_global_init(&g);
    146153  if (debug) owl_global_set_debug_on(&g);
     
    152159
    153160#if OWL_STDERR_REDIR
    154   /* Do this only after we've started curses up... */ 
     161  /* Do this only after we've started curses up... */
     162  owl_function_debugmsg("startup: doing stderr redirection");
    155163  newstderr = stderr_replace();
    156164#endif   
    157165
    158166  /* create the owl directory, in case it does not exist */
     167  owl_function_debugmsg("startup: creating owl directory, if not present");
    159168  dir=owl_sprintf("%s/%s", owl_global_get_homedir(&g), OWL_CONFIG_DIR);
    160169  mkdir(dir, S_IRWXU);
     
    162171
    163172  /* set the tty, either from the command line, or by figuring it out */
     173  owl_function_debugmsg("startup: setting tty name");
    164174  if (tty) {
    165175    owl_global_set_tty(&g, tty);
     
    169179
    170180  /* setup the built-in styles */
     181  owl_function_debugmsg("startup: creating built-in styles");
    171182  s=owl_malloc(sizeof(owl_style));
    172183  owl_style_create_internal(s, "default", &owl_stylefunc_default,
     
    192203  /* the personal filter will need to change again when AIM chat's are
    193204   *  included.  Also, there should be an %aimme% */
     205  owl_function_debugmsg("startup: creating default filters");
    194206  f=owl_malloc(sizeof(owl_filter));
    195207  owl_filter_init_fromstring(f, "personal", "( type ^zephyr$ "
     
    240252
    241253  /* set the current view */
     254  owl_function_debugmsg("startup: setting the current view");
    242255  owl_view_create(owl_global_get_current_view(&g), "main", f, owl_global_get_style_by_name(&g, "default"));
    243256
    244257  /* AIM init */
     258  owl_function_debugmsg("startup: doing AIM initialization");
    245259  owl_aim_init();
    246260
    247261  /* process the startup file */
     262  owl_function_debugmsg("startup: processing startup file");
    248263  owl_function_source(NULL);
    249264
    250265  /* read the config file */
     266  owl_function_debugmsg("startup: processing config file");
    251267  owl_context_set_readconfig(owl_global_get_context(&g));
    252268  perlerr=owl_perlconfig_readconfig(configfile);
     
    269285
    270286  /* execute the startup function in the configfile */
     287  owl_function_debugmsg("startup: executing perl startup, if applicable");
    271288  perlout = owl_perlconfig_execute("owl::startup();");
    272289  if (perlout) owl_free(perlout);
    273   owl_function_debugmsg("-- Owl Startup --");
    274290 
    275291  /* hold on to the window names for convenience */
     
    281297
    282298  /* welcome message */
     299  owl_function_debugmsg("startup: creating splash message");
    283300  strcpy(startupmsg, "-----------------------------------------------------------------------\n");
    284301  sprintf(buff,      "Welcome to Owl version %s.  Press 'h' for on-line help. \n", OWL_VERSION_STRING);
     
    298315  /* load zephyr subs */
    299316  if (initialsubs) {
     317    owl_function_debugmsg("startup: loading initial zephyr subs");
    300318    /* load normal subscriptions */
    301319    ret=owl_zephyr_loadsubs(NULL);
     
    312330    /* load login subscriptions */
    313331    if (owl_global_is_loginsubs(&g)) {
     332      owl_function_debugmsg("startup: loading login subs");
    314333      owl_function_loadloginsubs(NULL);
    315334    }
     
    318337  /* set the startup and default style, based on userclue and presence of a
    319338   * formatting function */
     339  owl_function_debugmsg("startup: setting startup and default style");
    320340  if (0 != strcmp(owl_global_get_default_style(&g), "__unspecified__")) {
    321341    /* the style was set by the user: leave it alone */
     
    330350  /* zlog in if we need to */
    331351  if (owl_global_is_startuplogin(&g)) {
     352    owl_function_debugmsg("startup: doing zlog in");
    332353    owl_zephyr_zlog_in();
    333354  }
    334355
     356  owl_function_debugmsg("startup: set style for the view");
    335357  owl_view_set_style(owl_global_get_current_view(&g),
    336358                     owl_global_get_style_by_name(&g, owl_global_get_default_style(&g)));   
    337  
     359
     360  owl_function_debugmsg("startup: setting context interactive");
    338361  owl_context_set_interactive(owl_global_get_context(&g));
    339362
     
    341364  nexttime=time(NULL);
    342365
     366  owl_function_debugmsg("startup: entering main loop");
    343367  /* main loop */
    344368  while (1) {
Note: See TracChangeset for help on using the changeset viewer.