Path: 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 > The following code fragment isn't so hot, either. >> for (i=0; 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