Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!caip!clyde!cuae2!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.bugs.usg Subject: Re: "mailx" screws up "reply" addresses in some cases Message-ID: <1218@ttrdc.UUCP> Date: Tue, 7-Oct-86 13:32:26 EDT Article-I.D.: ttrdc.1218 Posted: Tue Oct 7 13:32:26 1986 Date-Received: Wed, 8-Oct-86 19:30:16 EDT References: <7926@sun.uucp> Distribution: net Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 62 In article <7926@sun.uucp>, guy@sun.UUCP writes: >The fix, to "optim.c", is: > >------- optim.c ------- >*** /tmp/da0248 Sun Oct 5 13:36:02 1986 >--- optim.c Sat Oct 4 02:04:18 1986 >*************** >*** 239,245 **** > char from[]; > { > register char *cp; >! static char rbuf[200]; > > if (debug) fprintf(stderr, "makeremote(%s, %s) returns ", name, from); ^(void) > strcpy(rbuf, name); ^(void) >--- 239,245 ---- > char from[]; > { > register char *cp; >! char rbuf[BUFSIZ]; > > if (debug) fprintf(stderr, "makeremote(%s, %s) returns ", name, from); > strcpy(rbuf, name); >*************** >*** 248,254 **** > cp = rindex(from, '%'); > strcat(rbuf, cp); ^(void) > if (debug) fprintf(stderr, "%s\n", rbuf); ^(void) >! return rbuf; > } > > /* >--- 248,254 ---- > cp = rindex(from, '%'); > strcat(rbuf, cp); > if (debug) fprintf(stderr, "%s\n", rbuf); >! return(savestr(rbuf)); > } > > /* >which allocates a new string buffer for each recipient and returns a point >to it instead of a pointer to the local buffer. Since the local buffer is >now purely temporary, it is made automatic. > Guy Harris Hey, while you're making fixes to the "functionality" (love that non-word...) why not make lint fixes too? -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, go for it! allegra,ulysses,vax135}!ttrdc!levy