imap/src/osdep/nt/env_nt.c
/* Environment manipulate parameters
 * Accepts: function code
 *	    function-dependent value
 * Returns: function-dependent return value
 */
Environment manipulate parameters
Accepts: function code
function-dependent value
Returns: function-dependent return value
Environment manipulate parameters Accepts : function code function - dependent value Returns : function - dependent return value
void *env_parameters (long function,void *value)
{
  void *ret = NIL;
  switch ((int) function) {
  case GET_NAMESPACE:
    ret = (void *) nslist;
    break;
  case SET_USERPROMPT :
    mailusername = (userprompt_t) value;
  case GET_USERPROMPT :
    ret = (void *) mailusername;
    break;
  case SET_HOMEDIR:
    if (myHomeDir) fs_give ((void **) &myHomeDir);
    myHomeDir = cpystr ((char *) value);
  case GET_HOMEDIR:
    ret = (void *) myHomeDir;
    break;
  case SET_LOCALHOST:
    myLocalHost = cpystr ((char *) value);
  case GET_LOCALHOST:
    if (myLocalHost) fs_give ((void **) &myLocalHost);
    ret = (void *) myLocalHost;
    break;
  case SET_NEWSRC:
    if (myNewsrc) fs_give ((void **) &myNewsrc);
    myNewsrc = cpystr ((char *) value);
  case GET_NEWSRC:
    if (!myNewsrc) {		
      char tmp[MAILTMPLEN];
      sprintf (tmp,"%s\\NEWSRC",myhomedir ());
      myNewsrc = cpystr (tmp);
    }
    ret = (void *) myNewsrc;
    break;
  case SET_SYSINBOX:
    if (sysInbox) fs_give ((void **) &sysInbox);
    sysInbox = cpystr ((char *) value);
  case GET_SYSINBOX:
    ret = (void *) sysInbox;
    break;
  case SET_LISTMAXLEVEL:
    list_max_level = (long) value;
  case GET_LISTMAXLEVEL:
    ret = (void *) list_max_level;
    break;
  case SET_DISABLE822TZTEXT:
    no822tztext = value ? T : NIL;
  case GET_DISABLE822TZTEXT:
    ret = (void *) (no822tztext ? VOIDT : NIL);
    break;
  case SET_BLOCKENVINIT:
    block_env_init = value ? T : NIL;
  case GET_BLOCKENVINIT:
    ret = (void *) (block_env_init ? VOIDT : NIL);
    break;
  case SET_BLOCKNOTIFY:
    mailblocknotify = (blocknotify_t) value;
  case GET_BLOCKNOTIFY:
    ret = (void *) mailblocknotify;
    break;
  }
  return ret;
}
void * env_parameters ( long function , void * value ) { void * ret = NIL ; switch ( ( int ) function ) { case GET_NAMESPACE : ret = ( void * ) nslist ; break ; case SET_USERPROMPT : mailusername = ( userprompt_t ) value ; case GET_USERPROMPT : ret = ( void * ) mailusername ; break ; case SET_HOMEDIR : if ( myHomeDir ) fs_give ( ( void * * ) & myHomeDir ) ; myHomeDir = cpystr ( ( char * ) value ) ; case GET_HOMEDIR : ret = ( void * ) myHomeDir ; break ; case SET_LOCALHOST : myLocalHost = cpystr ( ( char * ) value ) ; case GET_LOCALHOST : if ( myLocalHost ) fs_give ( ( void * * ) & myLocalHost ) ; ret = ( void * ) myLocalHost ; break ; case SET_NEWSRC : if ( myNewsrc ) fs_give ( ( void * * ) & myNewsrc ) ; myNewsrc = cpystr ( ( char * ) value ) ; case GET_NEWSRC : if ( ! myNewsrc ) { char tmp [ MAILTMPLEN ] ; sprintf ( tmp , " \\ " , myhomedir ( ) ) ; myNewsrc = cpystr ( tmp ) ; } ret = ( void * ) myNewsrc ; break ; case SET_SYSINBOX : if ( sysInbox ) fs_give ( ( void * * ) & sysInbox ) ; sysInbox = cpystr ( ( char * ) value ) ; case GET_SYSINBOX : ret = ( void * ) sysInbox ; break ; case SET_LISTMAXLEVEL : list_max_level = ( long ) value ; case GET_LISTMAXLEVEL : ret = ( void * ) list_max_level ; break ; case SET_DISABLE822TZTEXT : no822tztext = value ? T : NIL ; case GET_DISABLE822TZTEXT : ret = ( void * ) ( no822tztext ? VOIDT : NIL ) ; break ; case SET_BLOCKENVINIT : block_env_init = value ? T : NIL ; case GET_BLOCKENVINIT : ret = ( void * ) ( block_env_init ? VOIDT : NIL ) ; break ; case SET_BLOCKNOTIFY : mailblocknotify = ( blocknotify_t ) value ; case GET_BLOCKNOTIFY : ret = ( void * ) mailblocknotify ; break ; } return ret ; }
Environment manipulate parameters
 Accepts: function code
          function-dependent value
 Returns: function-dependent return value
Environment manipulate parameters Accepts : function code function - dependent value Returns : function - dependent return value
/* set news file name if not defined */