Message-ID: <35B5276B.6447@teleline.es> Date: Wed, 22 Jul 1998 01:42:35 +0200 From: Mariano Alvarez Fernández Reply-To: malfer AT teleline DOT es Organization: teleline.es MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp AT delorie DOT com Subject: Re: About DJGPP v2.02, more results References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > > I think this should be faster: > > int strcopnb( char *dest, char *org, int max ) > { > int i; > > memcpy( dest,org,max ); > dest[max] = '\0'; > /* max = strlen( dest ); redundant: we just put '\0' at dest[max] */ > for( i=max-1; i >= 0 && dest[i] == ' '; i-- ); > dest[i+1] = '\0'; > return 0; > } > Yes, but it's buggy when strlen(org) is less than max. > This thread is quickly degenerating into a C optimization class ;-). I apreciate a lot your advices and I like write about, but I think the very important thing is the big perfomance of DJGPP v2.02 whith lan data-base applications. I encourage any people whit a data-base app to test 2.02. Regards, M.Alvarez