/[mailutils]/mailutils/mail/file.c
ViewVC logotype

Diff of /mailutils/mail/file.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by gray, Tue Jul 16 10:25:59 2002 UTC revision 1.10 by gray, Wed Aug 7 15:30:30 2002 UTC
# Line 32  static char *prev_name; Line 32  static char *prev_name;
32  char *  char *
33  mail_expand_name (const char *name)  mail_expand_name (const char *name)
34  {  {
   struct mail_env_entry *env;  
   
35    switch (name[0])    switch (name[0])
36      {      {
37      case '#':      case '#':
# Line 52  mail_expand_name (const char *name) Line 50  mail_expand_name (const char *name)
50        break;        break;
51                        
52      case '+':      case '+':
53        env = util_find_env ("folder");        name = util_folder_path (name);
       if (!env->set)  
         {  
           util_error ("No value set for \"folder\"");  
           return NULL;  
         }  
       else  
         {  
           char *tmp;  
             
           if (env->value[0] != '/' && env->value[1] != '~')  
             {  
               char *home = mu_get_homedir ();  
               tmp  = xmalloc (strlen (home) + 1 +  
                               strlen (env->value) + 1 +  
                               strlen (name + 1) + 1);  
               sprintf (tmp, "%s/%s/%s", home, env->value, name + 1);  
             }  
           else  
             {  
               tmp  = xmalloc (strlen (env->value) + 1 +  
                               strlen (name + 1) + 1);  
               sprintf (tmp, "%s/%s", env->value, name + 1);  
             }  
           name = tmp;  
         }  
54        break;        break;
55    
56      default:      default:
# Line 139  mail_file (int argc, char **argv) Line 112  mail_file (int argc, char **argv)
112        mbox = newbox;        mbox = newbox;
113        mailbox_messages_count (mbox, &total);        mailbox_messages_count (mbox, &total);
114        cursor = realcursor = 1;        cursor = realcursor = 1;
115        if ((util_find_env("header"))->set)        if (util_getenv (NULL, "header", Mail_env_boolean, 0) == 0)
116          {          {
117            util_do_command ("summary");            util_do_command ("summary");
118            util_do_command ("z.");            util_do_command ("z.");

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26