c implementation in the key value language tour