*BSD News Article 40060


Return to BSD News archive

Xref: sserve comp.unix.bsd:15779 comp.lang.c:89178 comp.unix.sys5.r3:2357
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!agate!spool.mu.edu!bloom-beacon.mit.edu!newsserver.pixel.kodak.com!elmgate!usenet
From: "W. James Colosky" <wjc@raster.kodak.com>
Newsgroups: comp.unix.bsd,comp.lang.c,comp.unix.sys5.r3
Subject: Re: how to completely get rid of bcopy, bzero, bcmp?
Date: 30 Dec 1994 14:59:19 GMT
Organization: Eastman Kodak Company - DPSC
Lines: 40
Message-ID: <3e1787$7f7@elmgate.raster.Kodak.Com>
References: <3bksus$fg4@spruce.cic.net> <mrg.788060915@fulcrum.com.au> <D190Do.16x@druid.com> <mrg.788659869@fulcrum.com.au> <3dtln1$rv8@spruce.cic.net>
NNTP-Posting-Host: lightning.raster.kodak.com

pauls@locust.cic.net (Paul Southworth) wrote:
>
> In article <mrg.788659869@fulcrum.com.au>,
> matthew green <mrg@fulcrum.com.au> wrote:
> >darcy@druid.com (D'Arcy J.M. Cain) writes:
> >   Seems like the wrong way around to me.  There is a standard and it
> >   specifies mem* so why not define them the other way round and use
> >   the standard functions in your code?
> ....
> >the original post asked how to "get rid of" the b* functions,
> >not how to write portable code, etc.  i assume that they were
> >trying to port some (old) code to some system v like system
> >that didn't have the b* functions.
> 
> Yep, that was me.  The "old" code was telnetd from NetBSD current
> actually ;)
> 
> I was trying to build it under Dynix/ptx 2.1.0 (SVR3.2 based)
> 
Here's a small perl script I used.
------cut here-----
#!/usr/local/bin/perl
#                                       -*-perl-*-
while (<>) {
        s/bcopy/memcpy/g; 
        s/bzero(.*),(.*)/memset$1, 0, $2/g; 
        s/bcmp/memcmp/g; 
}
------cut here-----
 ________________________________________________________________________
|                                                                        |_
| W. James Colosky                                                       | |
| Printer Products Division      EKPROFS :                   eksmtp(wjc) | |
| Eastman Kodak Company          Internet:          wjc@raster.kodak.com | |
| 901 Elmgrove Road              UUCP    :      ..!rit!kodak!tornado!wjc | |
| Rochester NY, 14653-6001                                (716) 726-3571 | |
|________________________________________________________________________| |
  |________________________________________________________________________|