B-trees implementation in C