Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!deimos.cis.ksu.edu!cveg!cseg!dws From: dws@cseg.uucp (David W. Summers) Newsgroups: comp.mail.sendmail Subject: Re: 5.61 wierdness on our machines Summary: I had the same problem converting 5.61 to Xenix. Look in the 'capitalize' function. Moving pointer inside Macro. Message-ID: <2736@cveg.uucp> Date: 7 Jul 89 16:04:10 GMT References: <2336@tahoe.unr.edu> Sender: netnews@cveg.uucp Organization: College of Engineering, University of Arkansas, Fayetteville Lines: 43 In article <2336@tahoe.unr.edu>, malc@tahoe.unr.edu (Malcolm L. Carlock) writes: [...] > > - mail to local users (on the same machine), arrives with the headers > looking like this: > (I have indented the following text by a single tabstop) > > From malc Fri Jul 7 02:47:23 1989 > Ceived: by unrvax.unr.edu (5.61/smail2.5/10-13-87) > id AA17962; Fri, 7 Jul 89 02:47:20 -0700 > Te: Fri, 7 Jul 89 02:47:20 -0700 > Om: > Ssage-`: <8907070947.AA17962@unrvax.unr.edu> > `: > Bject: test > Status: RO > Malcom, I had the exact same problem with the headers when I tried converting over to Xenix the other night. I found the bug in the 'capitalize' function in the 'util.c' file. There is a reference to something like: *p++ = toupper(*s++); This doesn't work as the 'toupper' macro is implemented so as to use the item inside the parenthesis twice, which produces the results you and I obtained. The change I made (that seems to work correctly) is: *p++ = toupper(*s); s++; I think that the 'toupper' macro may be implemented differently on different machines. Maybe it is a function on the original machine instead of a macro. Otherwise, I would suggest to implementors to never assume that macros would correctly work on references with moving pointers. (But you all probably already knew that, didn't you!??? :-) :-) - David Summers David Summers "Be Original! Drink Dr. Pepper like everyone else!" (dws@cseg.uucp)