Article View: comp.sys.atari.st
Article #2255Re: string comparisons in C
From: Steve Summit
Date: Sat, 15 Jul 1989 02:26
Date: Sat, 15 Jul 1989 02:26
21 lines
1650 bytes
1650 bytes
In article <44672745.14a1f@gtephx.UUCP> covertr@gtephx.UUCP (Richard E. Covert) writes:
>P.S. Does anyone know if pnmatch() is implemented on other C compilers??
No vendor should provide a routine named "pnmatch." Vendors are
not supposed to pollute the namespace with "convenient" (but
invariably unportable and system-specific) routines. ("Then why
do so may vendors do so?" you ask.) Vendor-supplied routines not
mentioned in the standard are supposed to have names beginning
with at least one underscore (e.g. "_pnmatch").
Similarly, portable programs cannot really use these extensions,
no matter how convenient they may be. When extensions are used,
they should be hidden behind at least one function call; that is,
don't call pnmatch directly, but rather invent your own routine --
"match_filenames" or something, which calls pnmatch. Then, when
you port your code to a different system that doesn't have
pnmatch or uses some wildly different wildcard mechanism, you
only have to rewrite match_filenames().
Steve Summit
scs@adam.pika.mit.edu
Technical Details
Message-ID:
<12689@bloom-beacon.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scsReferences:
<44672745.14a1f@gtephx.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bloom-beacon!adam.pika.mit.edu!scs From: scs@adam.pika.mit.edu (Steve Summit) Newsgroups: comp.sys.atari.st,comp.lang.c Subject: Re: string comparisons in C Keywords: C, atari st, mark williams Message-ID: <12689@bloom-beacon.MIT.EDU> Date: 15 Jul 89 02:26:12 GMT References: <44672745.14a1f@gtephx.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: scs@adam.pika.mit.edu (Steve Summit) Lines: 21