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

Diff of /mailutils/mh/mh_init.c

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

revision 1.30 by gray, Thu Feb 13 16:36:14 2003 UTC revision 1.31 by gray, Fri Feb 14 16:11:02 2003 UTC
# Line 662  _env_msg_date (envelope_t envelope, char Line 662  _env_msg_date (envelope_t envelope, char
662    
663  static int  static int
664  _env_msg_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite)  _env_msg_sender (envelope_t envelope, char *buf, size_t len, size_t *pnwrite)
665      {  {
666    message_t msg = envelope_get_owner (envelope);    message_t msg = envelope_get_owner (envelope);
667    struct msg_envelope *env = message_get_owner (msg);    struct msg_envelope *env = message_get_owner (msg);
668      
669    if (!env || !env->from)    if (!env || !env->from)
670      return EINVAL;      return EINVAL;
671    strncpy (buf, env->from, len);    strncpy (buf, env->from, len);
672    buf[len-1] = 0;    buf[len-1] = 0;
673    return 0;    return 0;
674      }  }
675        
676  message_t  message_t
677  mh_stream_to_message (stream_t instream)  mh_stream_to_message (stream_t instream)
# Line 683  mh_stream_to_message (stream_t instream) Line 683  mh_stream_to_message (stream_t instream)
683    restore_envelope (instream, &mp);    restore_envelope (instream, &mp);
684    if (message_create (&msg, mp))    if (message_create (&msg, mp))
685      return NULL;      return NULL;
686      
687    message_set_stream (msg, instream, mp);    message_set_stream (msg, instream, mp);
688        
689    if (envelope_create (&env, msg))    if (envelope_create (&env, msg))
# Line 811  mh_real_install (char *name, int automod Line 811  mh_real_install (char *name, int automod
811        fclose (fp);        fclose (fp);
812      }      }
813    free (ctx);    free (ctx);
814      asprintf (&ctx, "%s/inbox", mhdir);
815      if (mh_check_folder (ctx, !automode))
816        exit (1);
817      free (ctx);
818    free (mhdir);    free (mhdir);
   /* FIXME: create inbox? */  
819  }    }  
820    
821  void  void

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

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