🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #46444

Re: Free reliable wordcount utility available (final version)

#46444
From: Thomas J. Boschloo
Date: Wed, 06 Nov 2002 17:45
69 lines
4606 bytes
Benjamin Goldberg wrote:
> 
> Thomas J. Boschloo wrote:
> [snip]
> > > >> Anyways there will be a port to ANSI-C because I used
> > > >> the wrong library for the maximum value of an integer and my
> > > >> Turbo C 2.0 compiler didn't warn me at all about this (I should
> > > >> have used INT_MAX from limits.h instead of MAXINT from values.h).
> > > >
> > > > Headers are headers. Libraries are libraries. Please learn the
> > > > simple stuff before you move onto the complicated stuff. Thank
> > > > you.
> >
> > So what does this compiler option tell you?
> > -A      disable non-ANSI extensions
> 
> Headers are headers, libraries are libraries, and gcc extentions to the
> language's syntax are, well, non-ANSI extentions.  The -A option only
> disables the last, it does not disable non-ANSI headers or libraries.

So suppose you are right.. Why is this option in the compiler and not in
the linker? Turbo C 2.01 has a special parameter to pass options to the
linker (-l). I know some unix compilers are total trash, but I just
didn't expect Turbo C to behave like this. Turbo C has a lot of
extensions that are only valid for MS-Dos. Like a really good graphics
library (a lot of games of those days used them for EGA graphics). These
are also non-ANSI extensions. values.h is also non-ANSI, so the compiler
should have complained about me including it.

Forgive me, but I am just a very messy and dyslectic coder. I do *need*
a compiler that gives many, many warnings and errors. Turbo C does this
a lot better than the compiler we used at the VU for coding modules for
Minix.

> Before you ask what extentions to C that gcc supports, and example would
> be using blocks as rvalues... for example, consider code like the
> following:

I don't care about them. I just want lots of warnings if I do use them
by accident. (I learned Turbo C before I even learned about even the
existance of ANSI-C, also, I hadn't been coding in it for some years.
Last thing I coded was a savegame editor for UFO Enemy Unknown by
Microprose, 1998 I think).

> extern void func( int * x );
> #define FUNC() (int)({ int t; func(&t); t; })
> 
> ....
>    int z = FUNC();
>    other_function( FUNC() );

This looks flawed to me, but probably you are doing something clever.
What is 't'? Some variable? You can't define variables at any position
you like in ANSI-C AFAIK, that is C++.

> Also, the use of '//' comments in C code is a non-ansi extention which
> gcc allows, if you don't use the '-A' flag.

I think Turbo C allows them too. But I have no real use for them. They
only allow my comments to be three characters longer and I'll just wrap
my comments (I think comments are more important than good efficient
code at times).

Thanks for the friendly attitude, I hate being flamed by lamers,
Thomas
-- 
"Somehow you do not think the rules apply to you mister Anderson" -
Agent Smith, The Matrix
<home.hccnet.nl/t.j.boschloo>
Technical Details
Message-ID: <3DC95533.512AB0A3@hccnet.nl.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!lnewspeer00.lnd.ops.eu.uu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC85EA2.2C8E26DA@earthlink.net>

Show Full Headers
Complete Article Headers
Message-ID: <3DC95533.512AB0A3@hccnet.nl.invalid>
Subject: Re: Free reliable wordcount utility available (final version)
Date: Wed, 06 Nov 2002 18:45:23 +0100
From: "Thomas J. Boschloo" <nospam@hccnet.nl.invalid>
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid> <3DC526FC.CBCFE9B6@hccnet.nl.invalid> <3DC5451F.DBF3CDDA@eton.powernet.co.uk> <pan.2002.11.03.17.05.02.482162@yahoo.co.uk> <3DC81975.45915377@hccnet.nl.invalid> <3DC85EA2.2C8E26DA@earthlink.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.arcor-online.net!newsfeed01.sul.t-online.de!t-online.de!lnewspeer00.lnd.ops.eu.uu.net!bnewspeer01.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
Newsgroups: alt.privacy.anon-server,sci.crypt,alt.fan.cult-dead-cow,alt.security.pgp
Organization: Hobby Computer Club News Network
Lines: 71
NNTP-Posting-Host: uds222-35.dial.hccnet.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.hccnet.nl 1036605779 12682 62.251.35.222 (6 Nov 2002 18:02:59 GMT)
X-Complaints-To: abuse@hccnet.nl
NNTP-Posting-Date: Wed, 6 Nov 2002 18:02:59 +0000 (UTC)
Cancel-Lock: sha1:D+qEj+AQTbk5vD7IENJDJ7pg7tM=
X-Mailer: Mozilla 4.8 [en] (Win98; U)
X-Accept-Language: en,nl,de
X-NFilter: 1.2.1-b1