Data structure utilities for C