Article View: comp.sources.d
Article #5152travestyyyyyyyy
From: brnstnd
Date: Thu, 04 Jan 1990 18:16
Date: Thu, 04 Jan 1990 18:16
16 lines
1149 bytes
1149 bytes
Sorry about travesty, everybody. On all the machines I use, bcmp() returns a signed value like strcmp(). This assumption isn't portable. For a quick fix, redefine cmp() in terms of strncmp(), and don't feed travesty any nulls! Remember that strncmp() and strncpy() take arguments in the opposite order to bcmp() and bcopy(). I coded cmp() inline in version 1.1; apparently that fixes the problem. If you're desperate for a copy before Bill reappears, write me. Yes, Peter, you can replace srandom() and random() by srand() and rand(). random() and srandom() are two of those annoying routines that work much better than their predecessors but aren't as widely available; getopt() is another example. ---Dan
Technical Details
Message-ID:
<815@stealth.acf.nyu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!yale!cmcl2!stealth.acf.nyu.edu!brnstndShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!yale!cmcl2!stealth.acf.nyu.edu!brnstnd From: brnstnd@stealth.acf.nyu.edu Newsgroups: comp.sources.d,comp.sources.games.bugs Subject: travestyyyyyyyy Message-ID: <815@stealth.acf.nyu.edu> Date: 4 Jan 90 18:16:10 GMT Sender: brnstnd@stealth.acf.nyu.edu Reply-To: brnstnd@stealth.acf.nyu.edu (Dan Bernstein) Distribution: usa Organization: IR Lines: 16