Questions tagged [c89]
This tag is for code written for the first standard version of C, also known as "C89", "C90" or "ANSI C", with amendments and technical corrigenda (as opposed to K&R C, C99, C11 or later C standard revisions).
17 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
2
answers
246
views
Byte Pair Encoding Compression in C89
This is a small project to implement Philip Gage's Byte Pair Encoding compression for the purpose of learning C. In particular, it's written in C89 for fun as that's what would've been contemporary (...
13
votes
5
answers
3k
views
Portable old-school filesystem tool
I recently made a tool called mkfh to create a FHS compliant filesystem structure.
I aimed to make it as portable as possible, so I wrote it in C89 and also tried ...
6
votes
2
answers
6k
views
128-bit integer type in GCC/Clang
When working on my projects, I often need a 128-bit integer type. For this purpose, I use the __int128 compiler extension. Here is the implementation I am currently ...
3
votes
2
answers
143
views
Fast portable, parallel MSD radix sort for unsigned keys in C89
Now I have this portable, parallel MSD radix sort for unsigned keys. It exhibits linear speedup on small values of \$P\$ and has a running time of
$$
\Theta(N/P + P)...
7
votes
2
answers
1k
views
Assign determisitic Orcish names for debugging
Orcish
Large volumes of unlabelled data are hard to visualize when debugging; I find it difficult to keep track of the pointers in memory. I have used this code to assign Orcish names, (it's a name ...
3
votes
1
answer
690
views
Robin Hood hashing
This is an implementation of a "string to int" hash table with Robin Hood hashing. I have tested it as thoroughly as I could. It appears to have no bugs/leaks. I would appreciate any ...
4
votes
2
answers
121
views
Trigraph translator
Recently I thought about what a program would look like if all its characters that could become trigraphs became trigraphs. For example
...
11
votes
1
answer
321
views
Portable BrainFuck Interpreter in ANSI C89
I wrote this BrainFuck interpreter in ANSI C89:
...
7
votes
3
answers
1k
views
Cracking the Coding Interview — 1.5 One Away
I would like to know any suggestions about to improve my code solution and your rating of my approach to the problem, I based my code on the fact that if the strings have different length removing one ...
0
votes
2
answers
554
views
Cracking the code interview: Problem 1 .6 basic string compression
I created a GitHub repository containing my code solutions for some of the exercises proposed in the book. I updated my solution for the problem 1.6 here.
Description
A function that compress the ...
9
votes
2
answers
394
views
Generic data structures in C
I'm new to C, and I thought a great way to learn would be to implement some generic data structures and algorithms. So far I've implemented a linked list and a dynamic array. Both are generic, the ...
3
votes
1
answer
79
views
Stern's diatomic series fusc: replacing #define functions with two return values
I have a function to review which implements Stern's diatomic series fusc for a single word (ulong = unsigned long) in place, as ...
4
votes
4
answers
1k
views
Reading a text file that may have embedded nulls
I've always used fgets to read a file. However, I want to read a file that may have embedded 0円. I thought of using ...
10
votes
1
answer
497
views
Engineering an even faster qsort
I understand that C++ STL template sort runs faster than qsort in C because ...
Neil's user avatar
- 1,112
3
votes
1
answer
124
views
unordered_set: a hash table -based set data structure in C89
In this post, I present a hash table -based set data structure written in C89:
unordered_set.h
...