Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C container and persistent library ?

2 views
Skip to first unread message

llothar

unread,
Mar 2, 2007, 6:43:04 PM3/2/07
to
Hello,

i have a few program parts that need a downgrade from C++ to C.

I looked at it and while emulating the class system manually is not
that hard, i really miss my templates and container types. Is there
any any library for c that has generic (aka void* pointer)
hashtables, linked lists and maybe btree's ? If there is a way to read/
write such containers to disk it would be perfect.

Google didn't found anything but i can't believe that all you are
rewritting this code all the time.

Pierre Asselin

unread,
Mar 2, 2007, 7:19:02 PM3/2/07
to
llothar <llo...@web.de> wrote:
> [ ... ] Is there

> any any library for c that has generic (aka void* pointer)
> hashtables, linked lists and maybe btree's ? If there is a way to read/
> write such containers to disk it would be perfect.

You might try glib, http://www.gtk.org/api/2.6/glib/index.html .

--
pa at panix dot com

user923005

unread,
Mar 2, 2007, 7:59:44 PM3/2/07
to

bluejack

unread,
Mar 2, 2007, 8:08:22 PM3/2/07
to
On Mar 2, 4:59 pm, "user923005" <dcor...@connx.com> wrote:

> It doesn't take much moxie to find this stuff.

But finding it does take the fun out of writing it
yourself, which is what C is all about. Can you
really call yourself a C programmer if you haven't
implemented a generic self-serializing hashtable?

-bluejack


Yevgen Muntyan

unread,
Mar 2, 2007, 8:56:47 PM3/2/07
to

Rather you can call yourself a *good* programmer if you
have implemented a *good* hash table.

CBFalconer

unread,
Mar 2, 2007, 9:27:11 PM3/2/07
to
llothar wrote:
>
> i have a few program parts that need a downgrade from C++ to C.
>
> I looked at it and while emulating the class system manually is not
> that hard, i really miss my templates and container types. Is there
> any any library for c that has generic (aka void* pointer)
> hashtables, linked lists and maybe btree's ? If there is a way to
> read/write such containers to disk it would be perfect.

>
> Google didn't found anything but i can't believe that all you are
> rewritting this code all the time.

You mean you didn't enter a suitable search. As far as hashtables
are concerned, see hashlib.zip, found at:

<http://cbfalconer.home.att.net/download/>

which puts virtually no restrictions on the type of data stored.
Licensed under GPL, unless you negotiate another license.

For btrees etc. look for Ben Pfaff.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>


Martin Ambuhl

unread,
Mar 2, 2007, 11:26:48 PM3/2/07
to
llothar wrote:
> Hello,
>
> i have a few program parts that need a downgrade from C++ to C.

You misspelled "upgrade". Try trolling elsewhere.

Mark McIntyre

unread,
Mar 3, 2007, 6:25:33 AM3/3/07
to
On 2 Mar 2007 15:43:04 -0800, in comp.lang.c , "llothar"
<llo...@web.de> wrote:

>Hello,
>
>i have a few program parts that need a downgrade from C++ to C.

You mean it needs to be ported to a platform that doesn't support C...
(you wont win friends here by implying that C is an inferior cousin to
C++)

>I looked at it and while emulating the class system manually is not
>that hard, i really miss my templates and container types. Is there
>any any library for c that has generic (aka void* pointer)
>hashtables, linked lists and maybe btree's ? If there is a way to read/
>write such containers to disk it would be perfect.

C++ which relies extemsively on templates and the STL is going to be
hard to port. I would suggest that you determine the algo you need to
implement, and rewrite it.

>Google didn't found anything but i can't believe that all you are
>rewritting this code all the time.

Porting from C++ to C is probably pretty rare.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

llothar

unread,
Mar 3, 2007, 12:18:28 PM3/3/07
to
> You mean it needs to be ported to a platform that doesn't support C...
> (you wont win friends here by implying that C is an inferior cousin to
> C++)

Exactly i want to port to HPUX but don't want to send the huge cheque
to HP for there C++
compiler. It's not the topic of this posting - but i see it as a
downgrade - yes.

And because it is a system extension for the ruby scripting language
it is more natural to use only C.

> >Google didn't found anything but i can't believe that all you are
> >rewritting this code all the time.
>
> Porting from C++ to C is probably pretty rare.

If you enter "C container library" or something like this you see that
google makes no difference between C++ and C. I only found C++
references, thats why i asked.

Ian Collins

unread,
Mar 3, 2007, 3:02:56 PM3/3/07
to
llothar wrote:
>>You mean it needs to be ported to a platform that doesn't support C...
>>(you wont win friends here by implying that C is an inferior cousin to
>>C++)
>
> Exactly i want to port to HPUX but don't want to send the huge cheque
> to HP for there C++

<OT>then use gcc and its "their"</OT>

--
Ian Collins.

Keith Thompson

unread,
Mar 3, 2007, 3:09:54 PM3/3/07
to

And you can call yourself a *smart* programmer if you can find and use
a good hash table that somebody else has already written.

That's assuming your goal is to get the program working. If your goal
is to learn how to implement a good hash table, then of course
implementing it yourself is the only smart way to go.

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Keith Thompson

unread,
Mar 3, 2007, 3:11:21 PM3/3/07
to
"llothar" <llo...@web.de> writes:
>> You mean it needs to be ported to a platform that doesn't support C...
>> (you wont win friends here by implying that C is an inferior cousin to
>> C++)
>
> Exactly i want to port to HPUX but don't want to send the huge cheque
> to HP for there C++
> compiler. It's not the topic of this posting - but i see it as a
> downgrade - yes.

<OT>
gcc is free, it supports both C and C++, and it should work on HPUX.
</OT>

Flash Gordon

unread,
Mar 3, 2007, 3:01:50 PM3/3/07
to
llothar wrote, On 03/03/07 17:18:

>> You mean it needs to be ported to a platform that doesn't support C...
>> (you wont win friends here by implying that C is an inferior cousin to
>> C++)
>
> Exactly i want to port to HPUX but don't want to send the huge cheque
> to HP for there C++

<OT>
Try gcc then.
</OT>

<snip>

>>> Google didn't found anything but i can't believe that all you are
>>> rewritting this code all the time.
>> Porting from C++ to C is probably pretty rare.
>
> If you enter "C container library" or something like this you see that
> google makes no difference between C++ and C. I only found C++
> references, thats why i asked.

Generally the best way to implement things of significant complexity in
C is not the same as in C++, so if you have to do it in C you are better
off looking at the problem fresh to see what the best way of
implementing it in C is.
--
Flash Gordon

llothar

unread,
Mar 3, 2007, 5:19:33 PM3/3/07
to
> <OT>
> gcc is free, it supports both C and C++, and it should work on HPUX.
> </OT>

The ruby interpreter comes compiled with HP C compiler, don't want to
run into problems linking HP and GCC executables.
And much more important gcc is generating very slow code, that hurts
on this old PA-RISC machines.

Richard Heathfield

unread,
Mar 3, 2007, 5:31:02 PM3/3/07
to
Ian Collins said:

If you're going to flame someone else's grammar, at least get your own
grammar right. It's "it's", not "its". "Its X" means "the X belonging
to it", whereas "it's X" is a contraction of "it is X" or "it has X".
You are also missing a comma.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.

Mark McIntyre

unread,
Mar 3, 2007, 5:52:30 PM3/3/07
to
On 3 Mar 2007 09:18:28 -0800, in comp.lang.c , "llothar"
<llo...@web.de> wrote:

>> You mean it needs to be ported to a platform that doesn't support C...
>> (you wont win friends here by implying that C is an inferior cousin to
>> C++)
>
>Exactly i want to port to HPUX but don't want to send the huge cheque
>to HP for there C++

why not install a free one?

>compiler. It's not the topic of this posting - but i see it as a
>downgrade - yes.

then you're likely to find little sympathy in Comp.lang.c.

Ian Collins

unread,
Mar 3, 2007, 6:00:40 PM3/3/07
to
Richard Heathfield wrote:
> Ian Collins said:
>
>
>>llothar wrote:
>>
>>>>You mean it needs to be ported to a platform that doesn't support
>>>>C... (you wont win friends here by implying that C is an inferior
>>>>cousin to C++)
>>>
>>>Exactly i want to port to HPUX but don't want to send the huge cheque
>>>to HP for there C++
>>
>><OT>then use gcc and its "their"</OT>
>
>
> If you're going to flame someone else's grammar, at least get your own
> grammar right. It's "it's", not "its". "Its X" means "the X belonging
> to it", whereas "it's X" is a contraction of "it is X" or "it has X".
> You are also missing a comma.
>
It wasn't a flame, I was correcting a word, not the grammar. My intent
was to help the OP with a common English mistake, not flame.

When I was at school, we were told never to precede and with a comma.

--
Ian Collins.

Mark McIntyre

unread,
Mar 3, 2007, 6:11:29 PM3/3/07
to
On 3 Mar 2007 14:19:33 -0800, in comp.lang.c , "llothar"
<llo...@web.de> wrote:

>> <OT>
>> gcc is free, it supports both C and C++, and it should work on HPUX.
>> </OT>
>
>The ruby interpreter comes compiled with HP C compiler, don't want to
>run into problems linking HP and GCC executables.

Shouldn't be any. This is still your best bet, and you should probably
ask in a gcc group for more info,

>And much more important gcc is generating very slow code, that hurts
>on this old PA-RISC machines.

Same comment.

CBFalconer

unread,
Mar 3, 2007, 7:46:39 PM3/3/07
to

I suspect llothar is not a native English speaker, and is doing
pretty well with the language. The crying shame is the native
speakers who can't use grammar and can't spell.

GCC is probably better than HPUX anyhow. Just guessing, no
experience with HPUX.

CBFalconer

unread,
Mar 3, 2007, 7:52:43 PM3/3/07
to
Richard Heathfield wrote:
> Ian Collins said:
>
... snip ...

>>
>> <OT>then use gcc and its "their"</OT>
>
> If you're going to flame someone else's grammar, at least get your
> own grammar right. It's "it's", not "its". "Its X" means "the X
> belonging to it", whereas "it's X" is a contraction of "it is X"
> or "it has X". You are also missing a comma.

I think there is a strong correlation (among native English
speakers) between correct grammar/spelling, and programming
ability.

santosh

unread,
Mar 3, 2007, 8:52:37 PM3/3/07
to
CBFalconer wrote:
> Ian Collins wrote:
> > llothar wrote:
> >
> >>> You mean it needs to be ported to a platform that doesn't
> >>> support C... (you wont win friends here by implying that C is
> >>> an inferior cousin to C++)
> >>
> >> Exactly i want to port to HPUX but don't want to send the huge
> >> cheque to HP for there C++
> >
> > <OT>then use gcc and its "their"</OT>
>
> I suspect llothar is not a native English speaker, and is doing
> pretty well with the language. The crying shame is the native
> speakers who can't use grammar and can't spell.
>
> GCC is probably better than HPUX anyhow. Just guessing, no
> experience with HPUX.

I'm surprised that HPUX doesn't come bundled with a C compiler, since
most UNIX systems do.

Ian Collins

unread,
Mar 3, 2007, 8:56:19 PM3/3/07
to
santosh wrote:

> CBFalconer wrote:
>>
>>GCC is probably better than HPUX anyhow. Just guessing, no
>>experience with HPUX.
>
> I'm surprised that HPUX doesn't come bundled with a C compiler, since
> most UNIX systems do.
>
Not any more.

--
Ian Collins.

Beej Jorgensen

unread,
Mar 3, 2007, 9:08:11 PM3/3/07
to
CBFalconer <cbfal...@maineline.net> wrote:
>GCC is probably better than HPUX anyhow. Just guessing, no
>experience with HPUX.

You are correct, or at least were at one time. Once we installed gcc,
no one ever went back. (This is 10 years ago--I don't know the current
HPUX situation. I do remember that barely anyone at HP referred to it
as "H-pucks", though. Odd.)

-Beej

Richard Heathfield

unread,
Mar 3, 2007, 9:25:47 PM3/3/07
to
Ian Collins said:

> Richard Heathfield wrote:
>> Ian Collins said:
>>
>>
>>>llothar wrote:
>>>
>>>>>You mean it needs to be ported to a platform that doesn't support
>>>>>C... (you wont win friends here by implying that C is an inferior
>>>>>cousin to C++)
>>>>
>>>>Exactly i want to port to HPUX but don't want to send the huge
>>>>cheque to HP for there C++
>>>
>>><OT>then use gcc and its "their"</OT>
>>
>>
>> If you're going to flame someone else's grammar, at least get your
>> own grammar right. It's "it's", not "its". "Its X" means "the X
>> belonging to it", whereas "it's X" is a contraction of "it is X" or
>> "it has X". You are also missing a comma.
>>
> It wasn't a flame,

Then I apologise for misinterpreting your intent.

> I was correcting a word, not the grammar.

I think it could be argued either way, actually, but this isn't really
the place to conduct such a debate.

> My
> intent was to help the OP with a common English mistake, not flame.
>
> When I was at school, we were told never to precede and with a comma.

When I was at school, we were told that 1 is prime. That doesn't mean I
have to believe it, and I'm sure you'd be the first to agree.

The omission of a comma after 'and' is to do with lists:

"Chris, the other Chris, Steve and Keith are all highly respected
regular contributors to comp.lang.c."

Even there, the comma is optional. If used, it is known as the "Oxford
comma":

"Chris, the other Chris, Steve, and Keith are all highly respected
regular contributors to comp.lang.c."

When 'and' is being used as a conjunction, it often makes sense (but not
always) to use a comma just before it, and I hope this sentence gives
you a good example of that fact.

CBFalconer

unread,
Mar 3, 2007, 9:42:26 PM3/3/07
to
santosh wrote:
> CBFalconer wrote:
>
... snip ...

>>
>> GCC is probably better than HPUX anyhow. Just guessing, no
>> experience with HPUX.
>
> I'm surprised that HPUX doesn't come bundled with a C compiler,
> since most UNIX systems do.

2 years before the turn of the century (i.e. 1999) I was
occasionally using an HPUX system. The only compiler supplied was
a K&R 1 (note 1) package.

Flash Gordon

unread,
Mar 3, 2007, 11:13:48 PM3/3/07
to
CBFalconer wrote, On 04/03/07 00:52:

> Richard Heathfield wrote:
>> Ian Collins said:
>>
> ... snip ...
>>> <OT>then use gcc and its "their"</OT>
>> If you're going to flame someone else's grammar, at least get your
>> own grammar right. It's "it's", not "its". "Its X" means "the X
>> belonging to it", whereas "it's X" is a contraction of "it is X"
>> or "it has X". You are also missing a comma.
>
> I think there is a strong correlation (among native English
> speakers) between correct grammar/spelling, and programming
> ability.

It is not a simple thing. Dyslexics tend to be worse at spelling than
the average, and as a result are in lower English sets (where it is
streamed) and so are taught less about English grammar. However,
dyslexics in IT (including programming) tend to be good at it. Of
course, I do not have any studies to back this up just what I have seen.
Also I have and use a spilling chicken to make my spooling look butter
than it is.
--
Flash Gordon,
Dyslexic Programmer,
At least the compiler ensures I spell variable names consistently wrong.

Ian Collins

unread,
Mar 4, 2007, 1:31:00 AM3/4/07
to
CBFalconer wrote:
> Richard Heathfield wrote:
>
>>Ian Collins said:
>>
>
> .... snip ...

>
>>><OT>then use gcc and its "their"</OT>
>>
>>If you're going to flame someone else's grammar, at least get your
>>own grammar right. It's "it's", not "its". "Its X" means "the X
>>belonging to it", whereas "it's X" is a contraction of "it is X"
>>or "it has X". You are also missing a comma.
>
> I think there is a strong correlation (among native English
> speakers) between correct grammar/spelling, and programming
> ability.
>
More likely where and when they went through primary school. I had to
suffer through the English system in the 60s when teaching the basics
was considered too old fashioned to be included in the curriculum.

There might be a strong correlation between grammar/spelling pedantry
and C programming...

--
Ian Collins.

Richard Heathfield

unread,
Mar 4, 2007, 3:21:31 AM3/4/07
to
Flash Gordon said:

> Also I have and use a spilling chicken to make my spooling look
> butter than it is.

I never bother with them. I find them to be a complete waste of time. My
mistpyes are rare and my spelling erers rarererererer, so I don't
really see the point. (That is not to say they are not useful to others
- just not to me.)

Richard Heathfield

unread,
Mar 4, 2007, 3:23:09 AM3/4/07
to
Ian Collins said:

> CBFalconer wrote:

<snip>


>>
>> I think there is a strong correlation (among native English
>> speakers) between correct grammar/spelling, and programming
>> ability.
>>
> More likely where and when they went through primary school. I had to
> suffer through the English system in the 60s

So did I. Er, so what?

matevzb

unread,
Mar 4, 2007, 4:30:32 AM3/4/07
to
It does, and it's called "HP-UX bundled C compiler" (it's needed for
kernel recompilation when kernel's parameters change). It's stripped
of all the extras and I'm not even sure it handles ISO properly. IMO,
one is better off installing gcc. The "real thing", "HP C/aC++
Developer's Bundle" used to be good, but slow. Nowadays it's faster
but seems to be plagued with bugs.
--
WYCIWYG - what you C is what you get

llothar

unread,
Mar 4, 2007, 6:12:08 AM3/4/07
to

> It wasn't a flame, I was correcting a word, not the grammar. My intent
> was to help the OP with a common English mistake, not flame.
>
> When I was at school, we were told never to precede and with a comma.

And my teacher at school told me she never understood where commas
should be set in english. So sometimes im just using the german
rules.

And there/their was a result of posting at 3 o'clock in the morning
after 10 hours of work. But i thought in this newsgroups it's okay if
you speak english and not english++

santosh

unread,
Mar 4, 2007, 6:22:00 AM3/4/07
to

Both english and english++ are unacceptable. However English is.

:-)

llothar

unread,
Mar 4, 2007, 6:25:10 AM3/4/07
to
> It does, and it's called "HP-UX bundled C compiler" (it's needed for
> kernel recompilation when kernel's parameters change). It's stripped
> of all the extras and I'm not even sure it handles ISO properly. IMO,
> one is better off installing gcc. The "real thing", "HP C/aC++
> Developer's Bundle" used to be good, but slow. Nowadays it's faster
> but seems to be plagued with bugs.


Hmmm. The freeware site that offers prebuild depot files just
announced that they are moving away from compiling them with gcc and
are using HP C/aC++ now. They explicitly mention speed reasons. And if
you look at Linux for PA-RISC they say that you can only expect 50% of
the speed that you get from Linux compared to HP-UX.

It's the news from 13th Nov 2006
http://hpux.connect.org.uk/hppd/new.html

gcc code quality was never good in anything else then ix86/amd64 and
maybe PPC code.


Flash Gordon

unread,
Mar 4, 2007, 6:24:37 AM3/4/07
to
Richard Heathfield wrote, On 04/03/07 08:21:

> Flash Gordon said:
>
>> Also I have and use a spilling chicken to make my spooling look
>> butter than it is.
>
> I never bother with them. I find them to be a complete waste of time. My
> mistpyes are rare and my spelling erers rarererererer, so I don't
> really see the point. (That is not to say they are not useful to others
> - just not to me.

I agree completely. For some people they are a waste of time, but for me
and some others a decently implemented unobtrusive spelling checker is,
if not essential, at least incredibly useful.
--
Flash Gordon

Keith Thompson

unread,
Mar 4, 2007, 8:04:13 AM3/4/07
to

Please don't snip attribution lines (lines of the form
"So-and-so writes:").

Richard Heathfield

unread,
Mar 4, 2007, 8:32:31 AM3/4/07
to
santosh said:

<snip>



> Both english and english++ are unacceptable. However English is.
>
> :-)

It's just as well this group discusses C rather than English, santosh,
or I'd have to take issue with your second sentence. As it is, I'm
going to shut up (at least insofar as I find that possible and
convenient).

matevzb

unread,
Mar 4, 2007, 8:33:25 AM3/4/07
to
On Mar 4, 12:25 pm, "llothar" <llot...@web.de> wrote:
> > It does, and it's called "HP-UX bundled C compiler" (it's needed for
> > kernel recompilation when kernel's parameters change). It's stripped
> > of all the extras and I'm not even sure it handles ISO properly. IMO,
> > one is better off installing gcc. The "real thing", "HP C/aC++
> > Developer's Bundle" used to be good, but slow. Nowadays it's faster
> > but seems to be plagued with bugs.
>
> Hmmm. The freeware site that offers prebuild depot files just
> announced that they are moving away from compiling them with gcc and
> are using HP C/aC++ now. They explicitly mention speed reasons. And if
> you look at Linux for PA-RISC they say that you can only expect 50% of
> the speed that you get from Linux compared to HP-UX.
No wonder I'd say, especially after having read the PA-RISC (1.1)
manuals. Anyhow, they seem to be moving away from PA-RISCs, focusing
on IA64.
> It's the news from 13th Nov 2006http://hpux.connect.org.uk/hppd/new.html

>
> gcc code quality was never good in anything else then ix86/amd64 and
> maybe PPC code.
True, but then it costs nothing. In contrast, paying thousands of
dollars for an entry-class machine and not getting a decent compiler
is, mildly put, extortion.

santosh

unread,
Mar 4, 2007, 8:37:52 AM3/4/07
to

Richard Heathfield wrote:
> santosh said:
>
> <snip>
>
> > Both english and english++ are unacceptable. However English is.
> >
> > :-)
>
> It's just as well this group discusses C rather than English, santosh,
> or I'd have to take issue with your second sentence. As it is, I'm
> going to shut up (at least insofar as I find that possible and
> convenient).

Whoops, you're right! In future, I too will shut up with regard to OT
stuff.

Richard Heathfield

unread,
Mar 4, 2007, 8:45:29 AM3/4/07
to
santosh said:

<snip>

> In future, I too will shut up with regard to OT stuff.

Don't make promises you can't keep. :-)

llothar

unread,
Mar 4, 2007, 10:01:18 AM3/4/07
to
> No wonder I'd say, especially after having read the PA-RISC (1.1)
> manuals. Anyhow, they seem to be moving away from PA-RISCs, focusing
> on IA64.

Yes. But i got my Machine 750 MHz C3700 with 2 GB for only 100 Euro on
EBay.
I like it and it was the first Unix machine where i had no problems
with
my triple head display. Itaniums are still too expensive for me. But i
guess
that gcc is much better on this hardware. Can't believe that SGI is
using
anything else then gcc to compile the linux kernel for there super
computers.
And there speed is important.

> True, but then it costs nothing. In contrast, paying thousands of
> dollars for an entry-class machine and not getting a decent compiler
> is, mildly put, extortion.

Correct. And i forgot that the compiler the provide is K&R.
And i'm not going back to this level, very sure. C90 is the minimum.
So i think i will stay with gcc. Maybe some day i get a second hand
license
to the full HP C compiler - or win in a lottery.

Old Wolf

unread,
Mar 4, 2007, 6:10:05 PM3/4/07
to
On Mar 4, 2:56 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> santosh wrote:
> > CBFalconer wrote:
>
> >>GCC is probably better than HPUX anyhow. Just guessing, no
> >>experience with HPUX.
>
> > I'm surprised that HPUX doesn't come bundled with a C compiler, since
> > most UNIX systems do.

Often, commercial UNIX systems come with no C compiler, so that you
have to pay extra for the compiler licence.


Ian Collins

unread,
Mar 4, 2007, 6:17:03 PM3/4/07
to
Or in case of the more friendly ones, download it for free.

The bundled compiler was a hangover from the days when the kernel had to
be rebuilt by the user.

--
Ian Collins.

Default User

unread,
Mar 4, 2007, 6:52:53 PM3/4/07
to
matevzb wrote:

> On Mar 4, 2:52 am, "santosh" <santosh....@gmail.com> wrote:

> > I'm surprised that HPUX doesn't come bundled with a C compiler,
> > since most UNIX systems do.
> It does, and it's called "HP-UX bundled C compiler" (it's needed for
> kernel recompilation when kernel's parameters change). It's stripped
> of all the extras and I'm not even sure it handles ISO properly.

When I was working on HPUX, the compiler not only didn't support ANSI
or ISO C, it would taunt you with that fact.

"Automatic initialization of aggregates is an ANSI feature"

Brian

Beej Jorgensen

unread,
Mar 5, 2007, 2:44:46 AM3/5/07
to
Default User <defaul...@yahoo.com> wrote:
>When I was working on HPUX, the compiler not only didn't support ANSI
>or ISO C, it would taunt you with that fact.
>
>"Automatic initialization of aggregates is an ANSI feature"

Ha! I remember this!

<OT>
The version we used (and I can't remember which HPUX this was... 8?) had
a "-Ae" switch to go to ANSI mode. And then it was too strict, so you
had to define stuff like _XOPEN_SOURCE and _HPUX_SOURCE to get some
unixy functionality back. gcc just made everything better.
</OT>

-Beej

Richard Tobin

unread,
Mar 5, 2007, 10:31:15 AM3/5/07
to
In article <5512bfF2...@mid.individual.net>,

Ian Collins <ian-...@hotmail.com> wrote:
>The bundled compiler was a hangover from the days when the kernel had to
>be rebuilt by the user.

Or the days when the majority of people bought computers with the
intention of writing software for them.

-- Richard

--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.

Dave Vandervies

unread,
Mar 5, 2007, 8:33:00 PM3/5/07
to
In article <45EA185B...@yahoo.com>,

CBFalconer <cbfal...@maineline.net> wrote:
>Richard Heathfield wrote:
>> Ian Collins said:
>>
>... snip ...

>>>
>>> <OT>then use gcc and its "their"</OT>
>>
>> If you're going to flame someone else's grammar, at least get your
>> own grammar right. It's "it's", not "its". "Its X" means "the X
>> belonging to it", whereas "it's X" is a contraction of "it is X"
>> or "it has X". You are also missing a comma.
>
>I think there is a strong correlation (among native English
>speakers) between correct grammar/spelling, and programming
>ability.

I suspect that they're not directly causally linked, though; it seems
more likely that they're both caused by an ability and willingness to
pay attention to little things like correctness, precision, and accuracy.
I suspect that this generalizes quite nicely to "correct grammar/spelling
in one's native language" when you look beyond native English speakers.

Dyslexics, as noted downthread, seem to be an exception to this
correlation, most likely because their poor grammar/spelling is caused by
factors other than carelessness.
I'd also be quite willing to believe that the skills they've developed to
deal with dyslexia would be readily transferrable to computer programming
and similar fields. (The people I've known who I knew were dyslexic have
been universally above average intelligence, though that is a vanishingly
small proportion of the people I've known and probably doesn't include
all the people I've known who were dyslexic.)


dave

--
Dave Vandervies dj3v...@csclub.uwaterloo.ca
>Void pointers will automatically be converted to the right type when the
>assignment is made. --Simon Biber and
Or to the wrong type, as the case may be. Kaz Kylheku in CLC

0 new messages