Useful libraries in ISO C

S

Sensei

Hi!

I'm looking for useful libraries that are strictly ISO C. Any kind of
library, from lists, stacks, to trees, searching tools, sorting
tools... really *any* kind.

Do you have any idea? :)
 
A

Alexei A. Frounze

Sensei said:
I'm looking for useful libraries that are strictly ISO C.

If you mean standard libraries, there're no such thing in the standard C
library.
If you mean the code itself being OK in terms of the ISO/ANSI C standard,
then it's a different thing, there may be such libraries.
Any kind of
library, from lists, stacks, to trees, searching tools, sorting
tools... really *any* kind.

Do you have any idea? :)

Google or write them yourself. If you want to write them, then get books by
Knuth or Sedgewick to get some ideas on how the various data structures can
be made and for what purposes they should be used.

Alex
 
S

Sensei

If you mean standard libraries, there're no such thing in the standard
C library.
If you mean the code itself being OK in terms of the ISO/ANSI C
standard, then it's a different thing, there may be such libraries.


I was thinking about something like boost for C...
Google or write them yourself. If you want to write them, then get
books by Knuth or Sedgewick to get some ideas on how the various data
structures can be made and for what purposes they should be used.


My question is about ISO C, many libraries exist, even GNU libs but
it's not guaranteed that they are ISO C.
 
A

Alexei A. Frounze

....
My question is about ISO C, many libraries exist, even GNU libs but
it's not guaranteed that they are ISO C.

Then just check them and fix if/where appropriate.
Alex
 
B

Ben Pfaff

Sensei said:
I'm looking for useful libraries that are strictly ISO C. Any kind of
library, from lists, stacks, to trees, searching tools, sorting
tools... really *any* kind.

I think that GNU libavl may be strict ISO C.
I am not sure of it, however; there are likely to be lapses,
especially in the test programs.
 
C

Chris Hills

Sensei <[email protected]> said:
I was thinking about something like boost for C...



My question is about ISO C, many libraries exist, even GNU libs but
it's not guaranteed that they are ISO C.

Why do you want ISO C libraries. Just because libraries are written to
ISO C it does not mean they are any good or even work as specified.
 
?

=?ISO-8859-1?Q?=22Nils_O=2E_Sel=E5sdal=22?=

Chris said:
Why do you want ISO C libraries. Just because libraries are written to
ISO C it does not mean they are any good or even work as specified.

It is also irrelevant, as he did not ask for good/bad - just code
conforming to ISO C.
A search on www.freshmeat.net for "ANSI C" or "ISO C" - including the
quotes - might be helpful
 
S

Sensei

It is also irrelevant, as he did not ask for good/bad - just code
conforming to ISO C.
A search on www.freshmeat.net for "ANSI C" or "ISO C" - including the
quotes - might be helpful


Reinventing the wheel is not a good idea. There are out there libraries
that you find useful, ISO C compliant.

Any kind would be nice: lists, trees, sorting, garbage collectors...
whatever. It's not a problem if my code is ISO C, but my question
relates directly with the standard.

If you feel this is not the right place, you can point me a better newsgroup.
 
M

Malcolm

Sensei said:
I'm looking for useful libraries that are strictly ISO C. Any kind of
library, from lists, stacks, to trees, searching tools, sorting tools...
really *any* kind.
I've got quite a collection, of everything from hash tables to red black
trees, JPEG codecs, 3d graphics algorithms, statistical functions.
Can you be a bit more specific about what you want to do?
 
S

Sensei

I've got quite a collection, of everything from hash tables to red
black trees, JPEG codecs, 3d graphics algorithms, statistical functions.
Can you be a bit more specific about what you want to do?

A survey for students. I'd like them to focus on their tasks and not on
something complementary like lists or trees, or hashes, or anything.
 
M

Malcolm

Sensei said:
A survey for students. I'd like them to focus on their tasks and not on
something complementary like lists or trees, or hashes, or anything.
The problem with C is that the simpler data structures (linked lists,
queues, basic trees, stacks etc) are easier to code from scratch than to use
from a library.

I've got a hash table and red-black tree I can send you, however.
 
S

Sensei

The problem with C is that the simpler data structures (linked lists,
queues, basic trees, stacks etc) are easier to code from scratch than
to use from a library.

I've got a hash table and red-black tree I can send you, however.

Thank you anyway. I really like the spirit of STL, that's useful for
small projects when you have to use something without wasting time on
things you do already know.

Think about numerical recipes. Students can concentrate on other
aspects rather than reimplement another gaussian elimination...

Some kind of wiki... probably would help... I will think about it.
 
J

Joe Wright

Sensei said:
I was thinking about something like boost for C...




My question is about ISO C, many libraries exist, even GNU libs but it's
not guaranteed that they are ISO C.
That's the beauty of GNU, you don't need the guarantee.
 
R

Rob Thorpe

Sensei said:
Thank you anyway. I really like the spirit of STL, that's useful for
small projects when you have to use something without wasting time on
things you do already know.

Think about numerical recipes. Students can concentrate on other
aspects rather than reimplement another gaussian elimination...

Some kind of wiki... probably would help... I will think about it.

Check out GTK+ glib - I think this is ANSI C, not completely sure. Not
sure how good it is either.

Also look at CBFalconer's hash library, and Paul Hsieh's hash library
(not sure if that one is completely ANSI C).
 
J

Joe Wright

Chris said:
why not ?
Because you have the sources. If the GNU code is not sufficiently ISO
for you, you can modify it to taste. That's the whole point.

A guarantee promises your money back or something if not satisfied.
You'd have to pay RMS and the FSF for emacs or something. Can't do it.
They can point you to it but they won't sell it to you. It's free.
Guarantees do not apply.
 
C

Chris Hills

Joe Wright said:
Because you have the sources. If the GNU code is not sufficiently ISO
for you, you can modify it to taste. That's the whole point.

and you are completely liable for all of it....

I have done support for a compiler and 19 times out of 20 when a
"compiler bug" was found it turned out the compiler was correct and the
person who found the bug was wrong. SO 19 out of 20 "fixes" will in fact
make things worse.
A guarantee promises your money back or something if not satisfied.

IANAL
It also has fitness for purpose. It means that the tool producer is
taking some of the liability. When you use open source YOU are taking
the responsibility (and the liability). I f you ship something that has
a bug that causes an accident they will send the lawyer to you....

If you "saved money" by using open source YOU will have to prove how
you tested it was fit for purpose etc.

With a commercial tool you buy where you can't edit the source you have
reasonable grounds to expect it will work as advertised.

Like it or not you are in the software business and it is a business
like any other. Liability and responsibility for things still applies

IF a surgeon used "open source" and home made equipment in the OR and
it went wrong you would scream blue murder. If he used commercial
equipment from a medical equipment company and it went wrong you would
go after that company.

Commercial tools are (usually) well tested and checked. Often certified
etc. SO unless you are going to test and certify the actual Open source
system you are using you are asking for trouble.
 
M

Marian Vittek

Sensei said:
Thank you anyway. I really like the spirit of STL, that's useful for
small projects when you have to use something without wasting time on
things you do already know.

Check our generic sglib at http://sourceforge.net/projects/sglib
freely inspired by STL. It is still very simple, yet providing lists,
double linked lists, sorted lists, implements generic sorting
algorithms on arrays, red-black trees, etc. You may like it.

Marian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top