[comp.sys.atari.st] One more typo in dLibs

mj@myrias.UUCP (Michal Jaegermann) (06/19/89)

A header file <string.h> for a distributed version of dLibs contains,
among other things, a following macro:

 #define bcopy  memcpy

This should be replaced with

 #define bcopy(source,dest,length)  memcpy((dest),(source),(length))

Note an order of arguments.  This is still not exactly right, since
memcpy returns 'dest' and bcopy returns some unknown integer, but it
should do in most situations when you will need this macro.

The above costed me some head scratching during a port of some code.
  Love y'a all
  ===============================
  Michal Jaegermann
  Myrias Research Corporation
  Edmonton, Alberta, CANADA
  ...{ncc,alberta}!myrias!mj
  ==============================

mj@myrias.UUCP (Michal Jaegermann) (06/20/89)

> 
>  #define bcopy(source,dest,length)  memcpy((dest),(source),(length))
> 
A correction to my posting from yesterday. Use memmove instead of
memcpy.  bcopy is supposed to handle correctly overlapping moves.
Sorry...

   Michal Jaegermann
   Myrias Research Corporation
   Edmonton, Alberta, CANADA
   ...{ncc,alberta}!myrias!mj
   ==============================

to_stdnet@stag.UUCP (06/25/89)

From: dal@syntel.UUCP (Dale Schumacher)

[mj@myrias.UUCP (Michal Jaegermann) writes...]
> A header file <string.h> for a distributed version of dLibs contains,
> among other things, a following macro:
> 
>  #define bcopy  memcpy
> 
> This should be replaced with
> 
>  #define bcopy(source,dest,length)  memcpy((dest),(source),(length))

It should really use memmove(), but that's basically correct.  I fixed
this in my header a while ago, but it got left out when I posted the
last set of fixes.  I got bitten pretty badly by it as well :-)

This and several other bug reports (and FIXES, which is even better)
have recently been posted, many by Michal.  While it is somewhat of an
embarassment to have my mistakes ponited out in gory detail, I can put
my ego aside and simply be glad of two things.  The problems are being
fixed, so others won't have the same trouble, and people must actually
be using dLibs if they are finding bugs.  John Stanley has also privately
sent me a few bug reports, the latest on a problem with fullpath() in
qualifying '.'.  I'm not planning to post fixes myself, although others
can feel free to do so if they wish.  I'll be collecting these suggestion
up and reviewing them for inclusion in the 1.3 release to be posted with
the next release of Sozobon C (no, I don't know when that will be).
Until then, enjoy what does work, fix what doesn't and keep reporting bugs!

PS.  I'll be gone until the 30th of June at the X'hibition '89 conference.

--
      Dale Schumacher                         399 Beacon Ave.
      (alias: Dalnefre')                      St. Paul, MN  55104-3527
      ...bungia!midgard.mn.org!syntel!dal     United States of America
             "I may be competitive, but I'm never ruthless"
 

apratt@atari.UUCP (Allan Pratt) (06/27/89)

> From: dal@syntel.UUCP (Dale Schumacher)
> ... While it is somewhat of an
> embarassment to have my mistakes ponited out in gory detail, I can put
> my ego aside and simply be glad ...

Try being an Atari Systems Programmer for a while. :-)

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt