Index: owl.c
===================================================================
--- owl.c	(revision 52f35074cbf1b1c6d354ce19c191f15592eac3df)
+++ owl.c	(revision a0a517919ef86311a49f1e5652564bf3c3408ef0)
@@ -57,4 +57,7 @@
 #endif
 
+  owl_function_debugmsg("startup: it's the very best place to start");
+
+  owl_function_debugmsg("startup: processing command line arguments");
   argcsave=argc;
   argvsave=argv;
@@ -106,4 +109,5 @@
 #ifdef HAVE_LIBZEPHYR
   /* zephyr init */
+  owl_function_debugmsg("startup: initializing zephyr");
   ret=owl_zephyr_initialize();
   if (ret) {
@@ -113,4 +117,5 @@
   
   /* signal handler */
+  owl_function_debugmsg("startup: setting up signal handler");
   sigact.sa_handler=sig_handler;
   sigemptyset(&sigact.sa_mask);
@@ -120,4 +125,5 @@
 
   /* screen init */
+  owl_function_debugmsg("startup: initializing screen");
   sprintf(buff, "TERMINFO=%s", TERMINFO);
   putenv(buff);
@@ -143,4 +149,5 @@
 
   /* owl global init */
+  owl_function_debugmsg("startup: doing owl global initialization");
   owl_global_init(&g);
   if (debug) owl_global_set_debug_on(&g);
@@ -152,9 +159,11 @@
 
 #if OWL_STDERR_REDIR
-  /* Do this only after we've started curses up... */  
+  /* Do this only after we've started curses up... */
+  owl_function_debugmsg("startup: doing stderr redirection");
   newstderr = stderr_replace();
 #endif   
 
   /* create the owl directory, in case it does not exist */
+  owl_function_debugmsg("startup: creating owl directory, if not present");
   dir=owl_sprintf("%s/%s", owl_global_get_homedir(&g), OWL_CONFIG_DIR);
   mkdir(dir, S_IRWXU);
@@ -162,4 +171,5 @@
 
   /* set the tty, either from the command line, or by figuring it out */
+  owl_function_debugmsg("startup: setting tty name");
   if (tty) {
     owl_global_set_tty(&g, tty);
@@ -169,4 +179,5 @@
 
   /* setup the built-in styles */
+  owl_function_debugmsg("startup: creating built-in styles");
   s=owl_malloc(sizeof(owl_style));
   owl_style_create_internal(s, "default", &owl_stylefunc_default,
@@ -192,4 +203,5 @@
   /* the personal filter will need to change again when AIM chat's are
    *  included.  Also, there should be an %aimme% */
+  owl_function_debugmsg("startup: creating default filters");
   f=owl_malloc(sizeof(owl_filter));
   owl_filter_init_fromstring(f, "personal", "( type ^zephyr$ "
@@ -240,13 +252,17 @@
 
   /* set the current view */
+  owl_function_debugmsg("startup: setting the current view");
   owl_view_create(owl_global_get_current_view(&g), "main", f, owl_global_get_style_by_name(&g, "default"));
 
   /* AIM init */
+  owl_function_debugmsg("startup: doing AIM initialization");
   owl_aim_init();
 
   /* process the startup file */
+  owl_function_debugmsg("startup: processing startup file");
   owl_function_source(NULL);
 
   /* read the config file */
+  owl_function_debugmsg("startup: processing config file");
   owl_context_set_readconfig(owl_global_get_context(&g));
   perlerr=owl_perlconfig_readconfig(configfile);
@@ -269,7 +285,7 @@
 
   /* execute the startup function in the configfile */
+  owl_function_debugmsg("startup: executing perl startup, if applicable");
   perlout = owl_perlconfig_execute("owl::startup();");
   if (perlout) owl_free(perlout);
-  owl_function_debugmsg("-- Owl Startup --");
   
   /* hold on to the window names for convenience */
@@ -281,4 +297,5 @@
 
   /* welcome message */
+  owl_function_debugmsg("startup: creating splash message");
   strcpy(startupmsg, "-----------------------------------------------------------------------\n");
   sprintf(buff,      "Welcome to Owl version %s.  Press 'h' for on-line help. \n", OWL_VERSION_STRING);
@@ -298,4 +315,5 @@
   /* load zephyr subs */
   if (initialsubs) {
+    owl_function_debugmsg("startup: loading initial zephyr subs");
     /* load normal subscriptions */
     ret=owl_zephyr_loadsubs(NULL);
@@ -312,4 +330,5 @@
     /* load login subscriptions */
     if (owl_global_is_loginsubs(&g)) {
+      owl_function_debugmsg("startup: loading login subs");
       owl_function_loadloginsubs(NULL);
     }
@@ -318,4 +337,5 @@
   /* set the startup and default style, based on userclue and presence of a
    * formatting function */
+  owl_function_debugmsg("startup: setting startup and default style");
   if (0 != strcmp(owl_global_get_default_style(&g), "__unspecified__")) {
     /* the style was set by the user: leave it alone */
@@ -330,10 +350,13 @@
   /* zlog in if we need to */
   if (owl_global_is_startuplogin(&g)) {
+    owl_function_debugmsg("startup: doing zlog in");
     owl_zephyr_zlog_in();
   }
 
+  owl_function_debugmsg("startup: set style for the view");
   owl_view_set_style(owl_global_get_current_view(&g), 
 		     owl_global_get_style_by_name(&g, owl_global_get_default_style(&g)));   
-  
+
+  owl_function_debugmsg("startup: setting context interactive");
   owl_context_set_interactive(owl_global_get_context(&g));
 
@@ -341,4 +364,5 @@
   nexttime=time(NULL);
 
+  owl_function_debugmsg("startup: entering main loop");
   /* main loop */
   while (1) {
