Code Snippets
Free Software
Code Snippets
C Code
The C code is licensed under the GNU General Public License.
- memmem.c implements memmem, a function to find the first occurrence of the contents of a memory area in another memory area. It is similar to the standard strstr function, but it is not limited to '\0' terminated strings. The implementation assumes that objects of type char have 8 bits.
- A red-black tree implementation is contained in rbtree.c and rbtree.h. The macro ALIGNMENT in rbtree.c should be set to the memory alignment requirements for the objects to be stored in the tree.
- hash.c and hash.h implement an open-address hash table. Similar to the red-black tree, the macro ALIGNMENT in hash.c should be set to the memory alignment requirements for the objects associated with the keys.
[ Top of Page ]
Unix Manual Pages
The Unix manual pages may be freely copied, distributed and/or modified, as long as the copyright and license notices are preserved.
- cop.7 documents the precedence and associativity of the operators in the C language.
- c++op.7 does the same for the operators in the C++ language.
A Debian package containing these manual pages is also available.
[ Top of Page ]