Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ucbvax!ICS.UCI.EDU!joes%mitre-bedford.arpa From: joes%mitre-bedford.arpa@ICS.UCI.EDU (Joe Salerno) Newsgroups: comp.mail.mh Subject: Re: Need help: MH6.5 commands drop core on Multimax (related to sequences?) Message-ID: <8802252149.AA00900@mitre-bedford.ARPA> Date: 25 Feb 88 21:49:02 GMT References: <8802242037.AA07804@amax.NPAC.SYR.EDU> Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 207 On 11 January 1988, we completed porting MHmail, Ver- sion 6.5 #221[UCI], to an ENCORE, running UMAX4.2. The source we used had been running on a VAX 8600 running ULTRIX-32. Most of the changes were required because the ENCORE's C compiler treated initialization differently from the VAX's C compiler. In this regard, the following two quotations are relevant: "Static and external variables which are not initialized are guaranteed to start off as 0; automatic or register variables which are not initialized are guaranteed to start off as garbage." "The C Programming Language" --- B. W. Kernighan and D. M. Ritchie, p. 198 "To remain compatible with the largest number of compilers, we recommend (you)...include an explicit initializer..." "C---A Reference Manual"---S. P. Harbison and G. L. Steele, Jr, p. 80. Two of the changes corrected coding errors (see sbr/m_getfld.c and the invocation of m_scratch() in uip/post.c). The conf/MH file we used is attached. The most impor- tant change in this file was the use of sendmail instead of sendmail/smtp we use on the VAX 8600. ----------------------------- Code diffs ----------------------------- OUTPUT for diff mh-6.5/sbr/addrsbr.c.orig mh-6.5/sbr/addrsbr.c 373a374,375 > mp->m_next = ((char * ) (0)); /* added for ENCORE */ > 661c663,664 < static struct mailname mq; --- > /*static struct mailname mq;*/ /* ORIGINAL */ > static struct mailname mq = {((char *) (0))};/* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/sbr/m_getfld.c.orig mh-6.5/sbr/m_getfld.c 609c609,610 < if (strln > es) --- > /*if (strln > es)*/ /* ORIGINAL */ > if (str > es) /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/sbr/m_gmsg.c.orig mh-6.5/sbr/m_gmsg.c 25c25,26 < static int len; --- > /*static int len;*/ /* ORIGINAL */ > static int len = 0; /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/bbc.c.orig mh-6.5/uip/bbc.c 131c131,132 < static char *rcfile; --- > static char *rcfile; /* ORIGINAL */ > static char *rcfile = NULL; /* mod for ENCORE */ 151c152,153 < *rc, --- > /**rc,*/ /* ORIGINAL */ > *rc = NULL, /* mod for ENCORE */ ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/post.c.orig mh-6.5/uip/post.c 211,212c211,212 < static int myuid; /* my user id */ < static int mygid; /* my group id */ --- > static int myuid = 0; /* my user id */ > static int mygid = 0; /* my group id */ 224,225d223 < static int linepos; /* putadr()'s position on the line */ < static int nameoutput; /* putadr() has output header name */ 226a225,233 > /* > Following 2 statements are the original ones; the next 2 were > initialized as a mod for ENCORE > */ > /*static int linepos;*/ /* putadr()'s position on the line */ > /*static int nameoutput;*/ /* putadr() has output header name */ > static int linepos = 0; /* putadr()'s position on the line */ > static int nameoutput = 0; /* putadr() has output header name */ > 248,251c255,262 < static struct mailname localaddrs; /* local addrs */ < static struct mailname netaddrs; /* network addrs */ < static struct mailname uuaddrs; /* uucp addrs */ < static struct mailname tmpaddrs; /* temporary queue */ --- > /* > Following 4 statements are the original ones; the next 4 were > initialized as mod for ENCORE > */ > /*static struct mailname localaddrs;*/ /* local addrs */ > /*static struct mailname netaddrs;*/ /* network addrs */ > /*static struct mailname uuaddrs;*/ /* uucp addrs */ > /*static struct mailname tmpaddrs;*/ /* temporary queue */ 252a264,267 > static struct mailname localaddrs = {NULL}; /* local addrs */ > static struct mailname netaddrs = {NULL}; /* network addrs */ > static struct mailname uuaddrs = {NULL}; /* uucp addrs */ > static struct mailname tmpaddrs = {NULL}; /* temporary queue */ 549c564,570 < (void) strcpy (tmpfil, m_scratch (m_maildir (invo_name))); --- > /* > mod for ENCORE: orig produces segmentation fault although it did not > always do this. case 1 and case 2 seem to work the same. > */ > /* orig */ /*(void) strcpy (tmpfil, m_scratch (m_maildir (invo_name)));*/ > /* case 1 *//*(void) strcpy (tmpfil, m_scratch ("",m_maildir (invo_name)));*/ > /* case 2 */(void) strcpy (tmpfil, m_scratch (m_maildir (invo_name),"")); 656c677 < else --- > else{ 657a679 > } 740c762 < for (count = 0; cp = getname (str); count++) --- > for (count = 0; cp = getname (str); count++){ 752a775 > } 1617c1640 < } --- > }/*UUCP recipients if for is OK */ 1977a2001 > ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/replsbr.c.orig mh-6.5/uip/replsbr.c 20c20,21 < static int dftype; --- > /*static int dftype;*/ /* ORIGINAL */ > static int dftype = 0; /* mod for ENCORE */ 21a23 > 23c25,26 < static char *dfhost; --- > /*static char *dfhost;*/ /* ORIGINAL */ > static char *dfhost = NULL; /* mod for ENCORE */ 25c28,29 < static struct mailname mq; --- > /*static struct mailname mq;*/ /* ORIGINAL */ > static struct mailname mq = {NULL}; /* mod for ENCORE */ 218c222,223 < static unsigned int bufsiz; /* current size of buf */ --- > /*static unsigned int bufsiz;*/ /* current size of buf *//* ORIGINAL */ > static unsigned int bufsiz = 0; /* current size of buf *//* mod for ENCORE */ 270c275 < if (orig == buf) --- > if (orig == buf){ 271a277 > } 332c338 < && uleq (np -> m_mbox, mp -> m_next -> m_mbox)) --- > && uleq (np -> m_mbox, mp -> m_next -> m_mbox)){ 333a340 > } ------------------------------------------------------------------------- OUTPUT for diff mh-6.5/uip/send.c.orig mh-6.5/uip/send.c 147c147 < *maildir, --- > *maildir = NULL, /* initialization mod for ENCORE */ 266d265 < ----------------------------------------------------------------- OUTPUT from diff mh-6.5/conf/MH.orig mh-6.5/conf/MH 3c3 < editor /usr/local/lib/mred.for.mh --- > editor /usr/ucb/vi 8c8 < mts sendmail/smtp --- > mts sendmail 12,13c12,13 < pop on < popbboards on --- > pop off > popbboards off