/[mailutils]/mailutils/mh/mh_global.c
ViewVC logotype

Diff of /mailutils/mh/mh_global.c

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

revision 1.7 by polak, Sun Feb 9 21:06:49 2003 UTC revision 1.8 by gray, Mon Feb 10 01:03:15 2003 UTC
# Line 25  mh_context_t *context; Line 25  mh_context_t *context;
25  mh_context_t *profile;  mh_context_t *profile;
26  mh_context_t *sequences;  mh_context_t *sequences;
27  int rcpt_mask = RCPT_DEFAULT;  int rcpt_mask = RCPT_DEFAULT;
28    int mh_auto_install = 1;
29    
30  /* Global profile */  /* Global profile */
31    
# Line 56  mh_read_profile () Line 57  mh_read_profile ()
57        asprintf (&p, "%s/%s", home, MH_USER_PROFILE);        asprintf (&p, "%s/%s", home, MH_USER_PROFILE);
58        free (home);        free (home);
59      }      }
60    
61      if (mh_auto_install && access (p, R_OK))
62        mh_install (p, 1);
63      
64    profile = mh_context_create (p, 1);    profile = mh_context_create (p, 1);
65    mh_context_read (profile);    mh_context_read (profile);
66  }  }
# Line 72  _mh_init_global_context () Line 77  _mh_init_global_context ()
77    mu_path_folder_dir = mh_get_dir ();    mu_path_folder_dir = mh_get_dir ();
78    p = getenv ("CONTEXT");    p = getenv ("CONTEXT");
79    if (!p)    if (!p)
80      p = "context";      p = MH_CONTEXT_FILE;
81    ctx_name = mh_expand_name (NULL, p, 0);    ctx_name = mh_expand_name (NULL, p, 0);
82    context = mh_context_create (ctx_name, 1);    context = mh_context_create (ctx_name, 1);
83    mh_context_read (context);    mh_context_read (context);
# Line 97  mh_global_context_set (const char *name, Line 102  mh_global_context_set (const char *name,
102    return mh_context_set_value (context, name, value);    return mh_context_set_value (context, name, value);
103  }  }
104    
105    int
106    mh_global_context_iterate (mh_context_iterator fp, void *data)
107    {
108      _mh_init_global_context ();
109      return mh_context_iterate (context, fp, data);
110    }
111    
112  char *  char *
113  mh_current_folder ()  mh_current_folder ()
114  {  {
# Line 141  mh_global_sequences_set (const char *nam Line 153  mh_global_sequences_set (const char *nam
153    return mh_context_set_value (sequences, name, value);    return mh_context_set_value (sequences, name, value);
154  }  }
155    
156    int
157    mh_global_sequences_iterate (mh_context_iterator fp, void *data)
158    {
159      _mh_init_global_context ();
160      return mh_context_iterate (sequences, fp, data);
161    }
162    
163  /* Global state */  /* Global state */
164    
165  void  void

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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