From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6ec8df5df532a28f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!atl-c08.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!KNOLOGY.NET-a2kHrUvQQWlmc!not-for-mail Date: Tue, 23 May 2006 09:10:22 -0500 From: "Marc A. Criley" User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What is Delta?? References: <1147335626.779489.9240@j73g2000cwa.googlegroups.com> <2914908.GvrD7n1EFI@linux1.krischik.com> <1147952419.008146.149720@j55g2000cwa.googlegroups.com> <1ffb2$4471d0f7$45491254$22925@KNOLOGY.NET> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <9bebb$447317cb$45491254$1791@KNOLOGY.NET> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 9bebb447317cbe0ecb7f101791 Xref: g2news2.google.com comp.lang.ada:4368 Date: 2006-05-23T09:10:22-05:00 List-Id: Keith Thompson wrote: > "Marc A. Criley" writes: > [...] >> - Handling message buffers by interfacing to the strcpy() function and >> using it to move bytes from memory buffer arrays to and from record >> components. [...] > Most of these sound horrendous, but one of them may not be. > > C's strcpy() function copies a C-style string, terminated by a NUL > character. If a NUL-terminated string format is imposed by some > external interface, then interfacing to strcpy() might be the most > reasonable approach. Hand-written code to do the same thing, either > in C or in Ada, could easily be less efficient and more error-prone; a > C library's implementation of strcpy() is free to use system-specific > performance tricks and is likely to be thoroughly tested. Actually, I realized I misspoke -- it's been a few years since I did this. It wasn't strcpy(), it was memmove() that was used to handle memory buffering, with all the accompanying 'Address and 'Size calculations being explicitly performed in code. -- Marc A. Criley -- McKae Technologies -- DTraq - XPath In Ada - XML EZ Out