imap/src/dmail/dmail.c
/* Resolve INBOX from driver prototype into mailbox name and filesystem path
 * Accepts: driver prototype
 * 	    pointer to mailbox name string pointer
 *	    buffer to return mailbox path
 * Returns: T if success, NIL if error
 */
Resolve INBOX from driver prototype into mailbox name and filesystem path
Accepts: driver prototype
pointer to mailbox name string pointer
buffer to return mailbox path
Returns: T if success, NIL if error
Resolve INBOX from driver prototype into mailbox name and filesystem path Accepts : driver prototype pointer to mailbox name string pointer buffer to return mailbox path Returns : T if success NIL if error
long ibxpath (MAILSTREAM *ds,char **mailbox,char *path)
{
  char *s,tmp[MAILTMPLEN];
  long ret = T;
  if (!ds) return NIL;
  else if (!strcmp (ds->dtb->name,"unix") || !strcmp (ds->dtb->name,"mmdf"))
    strcpy (path,sysinbox ());	
  else if (!strcmp (ds->dtb->name,"tenex"))
    ret = (mailboxfile (path,"mail.txt") == path) ? T : NIL;
  else if (!strcmp (ds->dtb->name,"mtx"))
    ret = (mailboxfile (path,"INBOX.MTX") == path) ? T : NIL;
  else if (!strcmp (ds->dtb->name,"mbox"))
    ret = (mailboxfile (path,"mbox") == path) ? T : NIL;
  else if (ds->dtb->flags & DR_NAMESPACE) return NIL;
  else ret = ((mailboxfile (path,"&&&&&") == path) &&
	      (s = strstr (path,"&&&&&")) && strcpy (s,"INBOX")) ? T : NIL;
  if (ret) {			
    sprintf (tmp,"#driver.%s/INBOX",ds->dtb->name);
    *mailbox = cpystr (tmp);	
  }
  return ret;
}
long ibxpath ( MAILSTREAM * ds , char * * mailbox , char * path ) { char * s , tmp [ MAILTMPLEN ] ; long ret = T ; if ( ! ds ) return NIL ; else if ( ! strcmp ( ds -> dtb -> name , " " ) || ! strcmp ( ds -> dtb -> name , " " ) ) strcpy ( path , sysinbox ( ) ) ; else if ( ! strcmp ( ds -> dtb -> name , " " ) ) ret = ( mailboxfile ( path , " " ) == path ) ? T : NIL ; else if ( ! strcmp ( ds -> dtb -> name , " " ) ) ret = ( mailboxfile ( path , " " ) == path ) ? T : NIL ; else if ( ! strcmp ( ds -> dtb -> name , " " ) ) ret = ( mailboxfile ( path , " " ) == path ) ? T : NIL ; else if ( ds -> dtb -> flags & DR_NAMESPACE ) return NIL ; else ret = ( ( mailboxfile ( path , " " ) == path ) && ( s = strstr ( path , " " ) ) && strcpy ( s , " " ) ) ? T : NIL ; if ( ret ) { sprintf ( tmp , " " , ds -> dtb -> name ) ; * mailbox = cpystr ( tmp ) ; } return ret ; }
Resolve INBOX from driver prototype into mailbox name and filesystem path
 Accepts: driver prototype
          pointer to mailbox name string pointer
          buffer to return mailbox path
 Returns: T if success, NIL if error
Resolve INBOX from driver prototype into mailbox name and filesystem path Accepts : driver prototype pointer to mailbox name string pointer buffer to return mailbox path Returns : T if success NIL if error
/* use system INBOX for unix and MMDF */ /* better not be a namespace driver */ /* INBOX in home directory */ /* don't bother if lossage */ /* name of INBOX in this namespace */