From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3F657661.1090902@ameritech.net> From: northern snowfall User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020518 Netscape6/6.2.3 MIME-Version: 1.0 To: 9fans@cse.psu.edu Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] bcopy in APE Date: Mon, 15 Sep 2003 03:20:49 -0500 Topicbox-Message-UUID: 363610b8-eacc-11e9-9e20-41e7f4b1d025 Finishing out my network stack redesign in netbsd, I glanced at the source of the bcopy function. The BSD implementation, found at /sys/lib/libsa/bcopy.c, increments while copying octets if arg1 is greater than arg2. However, the plan9 APE implementation of bcopy (found at /sys/src/ape/lib/ap/gen/memmove.c) decrements. My question is, why does the function need to increment or decrement at all? And if there is a specific reason, why does plan9's implementation do it opposite of the netbsd? I really have no idea why the if(x < y) clause is needed. Comments? Don http://www.7f.no-ip.com/~north_ Yes, soon. Just email me if you need something off the site.