🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Free reliable wordcount utility available (final version)

#46655
From: Thomas J. Boschloo
Date: Fri, 08 Nov 2002 14:23
124 lines
6746 bytes
Richard Heathfield wrote:

> Hmmm? What, to compile it, you mean? Well, it's hardly even necessary to
> compile the code. The non-standard header sticks out like a sore thumb.

Which I already pointed out in the post you replied to in your own kind
and special way. You were not the first to notice. Besides, I was asking
for comments to the code in order to make it more ANSI, portable, secure
and crash-resistant. All I got was a few flames from e.g. yourselfs. Now
you are shrugging your shoulders in disinterest. Well, you shouldn't
have replied in the first case if you didn't mean it. Be constructive or
be silent.

> > Perhaps it is not safe
> > because it reads characters unbuffered?
> 
> Why would that make it unsafe?

Since I am not sure all the different types of ISO-whatever fit inside a
single char. The array I store them into (static char buffer[64])
assumes octets. Besides, the point I was really trying to make to the
good listener here is how the hell I would know which ISO or whatever
standard to use when reading from a binary newsfile I know practically
nothing about! What if the troll we are trying to wordcount and
correlate here fakes his Content-Type headers? Have you every considered
that when you replied to my post the first time?

ISO is not such a big deal to me. I just want my code to be portable and
be able to compile on a lot of different platforms (Solaris and Windows
2000 at least). I own neither.

> <snip>
> 
> > Besides, Turbo C 2.0 hasn't got a locale function according to the
> > online help file
> 
> ANSI C has a setlocale() function, which is probably what Phil was
> talking about.

Well, I guess Turbo C 2.0 doesn't conform to ANSI-C then, so why
complain about the values.h in the first place? I only added it for
people who set the #define MAXWORDSIZE to an incorrect value. It was a
last minute modification and I got it wrong. So what? Do we need to go
over this oven and over again until one of use apologizes for flaming
the other? I know I won't apologize, how about you?

> > and to Rich, isalpha is just a macro in Turbo C 2.0:
> >
> > #ctype.h
> > # define isalpha(c) (_ctype[(c) + 1] & (_IS_UPP | _IS_LOW))
> 
> No, isalpha() is not *just* a macro in Turbo C 2.0. It is a portable way
> to determine whether a character is alphabetic. rc = isalpha((unsigned
> char)ch) is portable at a source code level, whereas rc = (ch >= 'A' &&
> ch <= 'Z') is not.

Have you notices _ctype[] is an array of ints? Do you think it is wise
to waste at least (256+1)*2 bytes of valuable 64kb segmented memory on?
Besides, I don't think Turbo C libraries have the ultimate knowledge on
what is a character for ISO-xxxx-1. I just might have that info for
myself and I can do it in less code (0 bytes in the data segment of my
program).

> > So why aren't you flaming Phil here to learn the simple stuff before
> > moving to the ISO stuff?
> 
> I'm not aware that you've shown him to be in error.

That is my whole point. This is getting tiresome..

> > Besides, I am thinking about a preprocessor
> > that will turn =%2x strings into EBCDIC characters.
> 
> I'm surprised that you are so concerned about EBCDIC (not that there's
> anything wrong with that), but I can't help feeling that you may have
> misunderstood what EBCDIC is. (I might be wrong about that, of course.)

I understood that it is the character set that is in my BIOS and in the
BIOS of most desktop computers around the world. What is your
understanding of EBCDIC?? (don't reply if you don't want to look stupid)

> > Would that be nice
> > or is it better to put the whole code into one lump of program? After
> > all, l33t coders don't make programming mistakes, do they?!
> 
> All programmers make mistakes.

That is why strong typing was invented. That is why Dijkstra spend most
of his life writting EWD's. That's why we have compiler warnings.

> > If anyone still has any more constructive criticism, fire away but be
> > aware that my clothing is asbestos coated as you might have figured by
> > now. Also, my flamethrower is a lot better I think you
> > math/crypto-sissies!
> 
> If you want to bandy words, please find someone else to do it with.

You seem like an easy target. Please educate me if I am underestimating
your skills on the points you tried to flame me on when this all
started.

> > Learn to code!!
> 
> Thanks for the tip. I'll get right on it.

In your dreams..

> > Knowledge about cryptodesign alone
> > gets you nowhere in this world, you should learn a tiny bit about
> > security also (like I do).
> 
> A tiny bit of knowledge about security (such as you possess) gets you
> nowhere in this world; you should also learn not to make claims you
> can't back up. I suggest that you might find it easier not to claim ANSI
> conformance for your C programs until you know what ANSI C is and what
> it is for.

bla bla bla, you are beginning to sound like my psychiatrist.

Thomas
-- 
There are two types of people with Borderline disorder. The ones I like
and the ones I don't like.   - T.J. Boschloo
<home.hccnet.nl/t.j.boschloo>
Technical Details
Message-ID: <3DCBC8E4.3933993A@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!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed.online.be!bnewspeer00.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> <3DC98ABC.27E67263@eton.powernet.co.uk>

Show Full Headers
Complete Article Headers
Message-ID: <3DCBC8E4.3933993A@hccnet.nl.invalid>
Subject: Re: Free reliable wordcount utility available (final version)
Date: Fri, 08 Nov 2002 15:23:32 +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> <3DC98ABC.27E67263@eton.powernet.co.uk>
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!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed.online.be!bnewspeer00.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: 126
NNTP-Posting-Host: uds15-35.dial.hccnet.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.hccnet.nl 1036766014 20066 62.251.35.15 (8 Nov 2002 14:33:34 GMT)
X-Complaints-To: abuse@hccnet.nl
NNTP-Posting-Date: Fri, 8 Nov 2002 14:33:34 +0000 (UTC)
Cancel-Lock: sha1:UtE95bYYTzTV/0vyPlLCBJASRSU=
X-Mailer: Mozilla 4.8 [en] (Win98; U)
X-Accept-Language: en,nl,de
X-NFilter: 1.2.1-b1