Comprehensive open-source test suite for the C Standard Library [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a testsuite for the C Standard Library (mainly for the algorithms not contacting the "outer world", so strcpy(), memcmp(), itoa() & likes).
I tried downloading the GCC sources, but they're very large and I have trouble finding anything I could reuse in there...
(To be clear, the question is meant about the ANSI C Standard Library, not POSIX or else. Also, I'd like for the tests to be rather portable.)

The public domain C library has quite simple test cases, which are embedded in each source code file. For example: memcpy, strtol
Newlib has test cases organized as a test suite. They are more complex, but not nearly all functions are covered: memcpy

Related

Is there a C hashing function with no dependencies? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm developing some experimental program that requires hashing strings.
I tried all the source code I could find on the internet but none of it seemed to work without any dependencies, can you please link the source to a cryptographic hashing function that has no dependencies, i.e. something that I can just copy/paste into my code and it would work?
PS I prefer a secure hashing function, but MD5 would be fine for now.
You may want to check Simple MD5 implementation with no dependences.
Also check these proposals: hash function for string.
It is worth to mention that there are other open source implementations like:
Basic implementations of standard cryptography algorithms, like AES and SHA-1 and sphlib an open source library which provides optimized and portable implementations of many hash functions.

Looking for a light-weight cross-platform C threading library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I wanted to use OpenMP for this, but it is not appropriate for my purposes: creating my own thread pool.
So, this needs to be C89 code with, of course, platform specific code for windows and unices.
I need this for a C only library, so no C++, boost C++11, etc.
Thanks!
Use POSIX Threads - pthread. There is Windows implementation.
Also take a look on GThread - part of Glib.

C, malloc, free, and automated checking [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a very long convoluted piece of undocumented nightmare code that I have to use, full of mallocs and frees. I have already found a couple that are not matched correctly. Is there any automated source code examination tool that would help me analyse it?
There is a GNU tool for this: It is called GDB, stands for the Gnu DeBugger. You can use it to load a piece of code compiled with the appropriate debug symbols. Then you can use it to put in a temporary break and step through it manually to see exactly what is going on, and you can examine individual functions/subroutines.
For C language, following open-source STATIC CODE ANALYSER tool should be good start.
Cppcheck – Open-source tool that checks for several types of errors, including use of STL.
cpplint – An open-source tool that checks for compliance with Google's style guide for C++ coding.
Clang – An open-source compiler that includes a static analyzer.

Is there a simple and yet nice looking GUI library for a C program? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I program mostly in C while studying at university. I was wondering if there is some simple open-source library that would let me make a GUI for a program in C.
Things to concider by priority:
Simple
Nice-looking
Features
I don't know how to program in C++ and would prefer to stay in pure C.
i would highly recommend Glade + GTK.
i use it in combination with python, and it works quite well.
it's also very simple to use.
here is an example:
http://people.gnome.org/~newren/tutorials/developing-with-gnome/html/apc.html#libglade-example-1
hope that helps!
EDIT:
here is a more extensive tutorial:
http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html
However, notice that it might be difficult to write GUI code in C which runs on many different systems (e.g. on Linux, MacOSX, Android, and Windows). Gtk claim to have such a goal, but I don't know if it fully reached.

Parsing JSON using C? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
There are several C libraries available for parsing JSON, that will compile on Linux. Which library would you recommend?
Just to close the loop:
For the project in question, we ended up going with cJSON. We chose this one from the list of C libraries linked from json.org. Per the homepage, cJSON is:
An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C compliant JSON parser, under MIT license.
This happened to be a good fit for the particular project at hand, and the library worked out fine.
I've seen YAJL used with MGTwitterEngine (Mac/Cocoa), so I assume it is ok.
I haven't done much with it apart from compiling it and pointing MGTwitterEngine on Mac to its library/header files.
Check out the list at json.org. There are several C libraries for JSON.

Resources