
RMAIL                                                           12-NOV-1988 17:16:56    VAX C      V2.3-024                 Page 1
V1.0                                                            12-NOV-1988 17:16:17    DUA1:[VMSNET.DEVEL.GNUUCP.SRC]RMAIL.C;10 (1)



    1        	/*
    2        	 *  Called by uuxqt to fix up "to" addresses on incoming mail.  
    3        	 *
    4        	 *  For now, the only special handling necessary for messages routing through
    5        	 *  us is to make sure that "vn%" is prefixed to the address so
    6        	 *  that MAIL will resubmit it to the VMSnet system.  It would be a little
    7        	 *  less overhead to handle such messages directly (ie create the files in
    8        	 *  VMSNET_SPOOL:), but this approach avoids duplicating functionality
    9        	 *  and should be easier to maintain.
   10        	 */
   11        	
   12        	#include stdio
  153        	#include ssdef
  562        	#include "includes.h"
 3481        	#include "uucp.h"
 3567        	
 3568        	int
 3569        	rmail_addrfix(addressee)
 3570        	char *addressee;
 3571        	{
 3572    1   		char *name, *cp, temp[255];
 3573    1   		int local = 0, i;
 3574    1   	
 3575    1   		cp = name = addressee;
 3576    1   	
 3577    1   		while (cp = strchr(cp,'\\')) *cp = '!';	/* convert each \ to a bang */
 3578    1   	
 3579    1   		while (*name == '!') name++;	/* skip over leading bangs (??? -- JEH) */
 3580    1   	
 3581    1   		for (; *name != '!'; name++)	/* look for the first remaining bang */
 3582    1   			if (*name == '\0') {	/* if we find the null first, */
 3583    2   				local++;	/* it's local */
 3584    2   				break;
 3585    2   			}
 3586    1   	
 3587    1   		name++;				/* look at next char after we stopped */
 3588    1   		if (!local && *name == '\0') {	/* if the bang is just before the null */
 3589    2   	    		logit("RMAIL", "Illegal uucp address");
 3590    2   			return(0);
 3591    2   		}
 3592    1   	/*
 3593    1   	 * If the message is not local, make its address into the [uucp%"path"] form,
 3594    1   	 * with quoting suitable for use on a DCL command line.  
 3595    1   	 */
 3596    1   		if (local) {
 3597    2   	    		logit("RMAIL", "Does NOT need uucp routing.");
 3598    2   		} else {
 3599    2   	    		logit("RMAIL", "Needs UUCP routing");
 3600    2   			sprintf (temp, "\"vn%%\"\"%s\"\"\"", addressee);
 3601    2   			strcpy(addressee, temp);
 3602    2   		}
 3603    1   	
 3604    1   	    	logit("RMAIL", addressee);
 3605    1   	
 3606    1   	    	return(1);

RMAIL                                                           12-NOV-1988 17:16:56    VAX C      V2.3-024                 Page 2
V1.0                                                            12-NOV-1988 17:16:17    DUA1:[VMSNET.DEVEL.GNUUCP.SRC]RMAIL.C;10 (1)

 3607    1   	}


RMAIL                                                           12-NOV-1988 17:16:56    VAX C      V2.3-024                 Page 3
V1.0                                                            12-NOV-1988 17:16:17    DUA1:[VMSNET.DEVEL.GNUUCP.SRC]RMAIL.C;10 (1)

                                       +-------------+
                                       | Storage Map |
                                       +-------------+
 
 

External Declarations
---------------------

 Identifier Name                 Line    Size            Class        Type
 ---------------                 ----    ----            -----        ----

CABS_T                           2040    16 bytes                     Structure tag
 x                               2040    1 quadword                    Member (offset = 0), double
 y                               2040    1 quadword                    Member (offset = 8 bytes), double
clock_t                          3062    1 longword                   Typedef:  long int
dev_t                            2812    1 longword                   Typedef:  pointer to char
FILE                             56      1 longword                   Typedef:  pointer to struct _iobuf
ino_t                            2811    1 word                       Typedef:  unsigned short int
jmp_buf                          2290    15 longwords                 Typedef:  array [15] of long int
off_t                            2810    1 longword                   Typedef:  unsigned long int
port                             3546    68 bytes                     Structure tag
 portname                        3547    20 bytes                      Member (offset = 0), array [20] of char
 modemname                       3548    20 bytes                      Member (offset = 20 bytes), array [20] of char
 devname                         3549    20 bytes                      Member (offset = 40 bytes), array [20] of char
 baud                            3550    1 longword                    Member (offset = 60 bytes), long int
 chain                           3551    1 longword                    Member (offset = 64 bytes), pointer to struct port
sigstack                         2356    8 bytes                      Structure tag
 ss_sp                           2358    1 longword                    Member (offset = 0), pointer to char
 ss_onstack                      2359    1 longword                    Member (offset = 4 bytes), long int
sigvec                           2340    12 bytes                     Structure tag
 sv_handler                      2342    1 longword                    Member (offset = 0), pointer to function returning long int
 sv_mask                         2343    1 longword                    Member (offset = 4 bytes), long int
 sv_onstack                      2344    1 longword                    Member (offset = 8 bytes), long int
sprintf                          128                     Extern       Function returning long int
strchr                           3370                    Extern       Function returning pointer to char
strcpy                           3358                    Extern       Function returning pointer to char
tbuffer                          3073    16 bytes                     Structure tag
 proc_user_time                  3075    1 longword                    Member (offset = 0), long int
 proc_system_time                3075    1 longword                    Member (offset = 4 bytes), long int
 child_user_time                 3076    1 longword                    Member (offset = 8 bytes), long int
 child_system_time               3076    1 longword                    Member (offset = 12 bytes), long int
tbuffer_t                        3079    16 bytes                     Typedef:  struct tbuffer
timeb                            3095    10 bytes                     Structure tag
 time                            3097    1 longword                    Member (offset = 0), long int
 millitm                         3098    1 word                        Member (offset = 4 bytes), unsigned short int
 timezone                        3099    1 word                        Member (offset = 6 bytes), short int
 dstflag                         3100    1 word                        Member (offset = 8 bytes), short int
timeb_t                          3103    10 bytes                     Typedef:  struct timeb
time_t                           3068    1 longword                   Typedef:  long int
tm                               3107    36 bytes                     Structure tag
 tm_sec                          3109    1 longword                    Member (offset = 0), long int
 tm_min                          3109    1 longword                    Member (offset = 4 bytes), long int
 tm_hour                         3109    1 longword                    Member (offset = 8 bytes), long int
 tm_mday                         3110    1 longword                    Member (offset = 12 bytes), long int
 tm_mon                          3110    1 longword                    Member (offset = 16 bytes), long int
 tm_year                         3110    1 longword                    Member (offset = 20 bytes), long int

RMAIL                                                           12-NOV-1988 17:16:56    VAX C      V2.3-024                 Page 4
V1.0                                                            12-NOV-1988 17:16:17    DUA1:[VMSNET.DEVEL.GNUUCP.SRC]RMAIL.C;10 (1)

 Identifier Name                 Line    Size            Class        Type
 ---------------                 ----    ----            -----        ----

 tm_wday                         3111    1 longword                    Member (offset = 24 bytes), long int
 tm_yday                         3111    1 longword                    Member (offset = 28 bytes), long int
 tm_isdst                        3111    1 longword                    Member (offset = 32 bytes), long int
tm_t                             3114    36 bytes                     Typedef:  struct tm
_iobuf                           36      14 bytes                     Structure tag
 _cnt                            38      1 longword                    Member (offset = 0), long int
 _ptr                            39      1 longword                    Member (offset = 4 bytes), pointer to char
 _base                           40      1 longword                    Member (offset = 8 bytes), pointer to char
 _flag                           41      1 byte                        Member (offset = 12 bytes), char
 _file                           52      1 byte                        Member (offset = 13 bytes), char
 
 

Function "rmail_addrfix" defined at line 3569
---------------------------------------------

 Identifier Name                 Line    Size            Class        Type
 ---------------                 ----    ----            -----        ----

addressee                        3570    1 longword                   Parameter # 1, pointer to char
cp                               3572    1 longword      Register     Pointer to char
local                            3573    1 longword      Register     Initialized long int
logit                            3589                    Extern       Function returning long int
name                             3572    1 longword      Register     Pointer to char
temp                             3572    255 bytes       Auto         Array [255] of char
 
 

Psect Synopsis
--------------

 Psect Name                     Allocation  Attributes
 ----------                     ----------  ----------

$CODE                           205 bytes   Position-independent, relocatable, shareable, executable, readable
ERRNO                           4 bytes     Position-independent, overlay, relocatable, global, readable, writeable
STDIN                           4 bytes     Position-independent, overlay, relocatable, global, readable, writeable
STDOUT                          4 bytes     Position-independent, overlay, relocatable, global, readable, writeable
STDERR                          4 bytes     Position-independent, overlay, relocatable, global, readable, writeable
_CTYPE_                         0           Position-independent, overlay, relocatable, global, shareable, readable
VAXC$ERRNO                      4 bytes     Position-independent, overlay, relocatable, global, readable, writeable
DEBUG                           4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
PROGNAME                        20 bytes    Position-independent, overlay, relocatable, global, shareable, readable, writeable
SPOOL                           4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
CONTROL                         4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
MYNAME                          20 bytes    Position-independent, overlay, relocatable, global, shareable, readable, writeable
HOST_NAME                       20 bytes    Position-independent, overlay, relocatable, global, shareable, readable, writeable
OURPID                          4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
SYSFILE                         4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
USERFILE                        4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
PUBDIR                          4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
PORTS                           4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable
WHO                             255 bytes   Position-independent, overlay, relocatable, global, shareable, readable, writeable
LOGFD                           4 bytes     Position-independent, overlay, relocatable, global, shareable, readable, writeable

RMAIL                                                           12-NOV-1988 17:16:56    VAX C      V2.3-024                 Page 5
V1.0                                                            12-NOV-1988 17:16:17    DUA1:[VMSNET.DEVEL.GNUUCP.SRC]RMAIL.C;10 (1)

 Psect Name                     Allocation  Attributes
 ----------                     ----------  ----------

$CHAR_STRING_CONSTANTS          105 bytes   Position-independent, relocatable, readable, writeable
 
 

Function Definition Map
-----------------------

 Line   Name
 ----   ----

3569    rmail_addrfix
 
 
Command Line
------------
 
CC/LIST=[-.BLD]/OBJE=[-.BLD]/SHOW=(BRIEF,SOURCE,SYMBOLS)/DEFINE=LOG RMAIL

