🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24048

Re: patch for xfig2.0 pl10

#24048
From: der Mouse
Date: Tue, 25 Jun 1991 04:29
18 lines
1062 bytes
> The following code fragment isn't so hot, either.
>> 	for (i=0; i<strlen(fn); i++)
>> 		fn[i]=tolower(fn[i]);
> One needs to check if it is upper case before converting it to lower
> case since some OS's define tolower to just subtract a constant.

And there is absolutely no excuse for calling strlen each time around
the loop, since the body doesn't alter the length.  Try making it

	for (i=strlen(fn)-1;i>=0;i--)

since the body of the loop is such that it will work equally well
either way.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
Technical Details
Message-ID: <9106250429.AA08921@lightning.McRCIM.McGill.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!bloom-beacon!dont-send-mail-to-path-lines
From: mouse@lightning.mcrcim.mcgill.EDU (der Mouse)
Newsgroups: comp.windows.x
Subject: Re:  patch for xfig2.0 pl10
Message-ID: <9106250429.AA08921@lightning.McRCIM.McGill.EDU>
Date: 25 Jun 91 04:29:03 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 18