www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/30/16:34:13

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Please add strrev proposal
Date: Sun, 30 Sep 2001 20:48:59 +0100
Lines: 36
Message-ID: <3BB7772B.D9FD1EF8@phekda.freeserve.co.uk>
References: <lcq8rtk1nqua2hc6rqfhmqisbd587n8t2n AT 4ax DOT com> <Xns912A8823C1399ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <m1g9rtociqgunetpgm7qb5106m3sqvhpor AT 4ax DOT com>
NNTP-Posting-Host: modem-186.phosphorus.dialup.pol.co.uk
Mime-Version: 1.0
X-Trace: newsg1.svr.pol.co.uk 1001881626 32132 62.136.14.186 (30 Sep 2001 20:27:06 GMT)
NNTP-Posting-Date: 30 Sep 2001 20:27:06 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Radical, NetSurfer wrote:
> in my humble opinion, its NONstandard that Libc doesn't already have
> this.  Please name one other C/C++ compiler that also omits it?

libc is not necessarily distributed with the C compiler. DJGPP's libc is
not distributed with the DJGPP port of libc. You need to install djdev to
get DJGPP's libc and then gcc to get the C compiler.

'strrev' does not appear to be present on my RedHat Linux 6.2 box:

iolanthe:~ =] grep strrev `find /usr/include -name '*.h'`
/usr/include/glib.h:void         g_strreverse           (gchar      
*string);

glib.h is from glib.

iolanthe:~ =] rpm -q glibc
glibc-2.1.3-22

glibc is GNU libc, the standard libc on Linuces.

If you're that bothered, you may want to use the g_strreverse() function
from glib - get v2tk/glb1210b.zip from the DJGPP archive on Simtel.NET.

I don't see why 'strrev' function should be in DJGPP's libc. It's
non-standard (neither ANSI nor POSIX). You can get an equivalent function
from glib, which is a pretty popular add-on library. If you're that
bothered, why not just include your own implementation in your programs?

Bye,

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019