When starting out to create a Firebird foreign data wrapper (FDW) for PostgreSQL, I realised that the Firebird native C API is somewhat cumbersome to use, to say the least, and in order to both understand it and create a more usable interface, it would be useful to create something resembling PostgreSQL's libpq, and so libfq was born.
libfq provides a subset of libpq functions (with names beginning with FQ rather than PQ of course), with more-or-less identical function signatures. It also provides a small number of Firebird-specific functions.
Note: While basically functional, libfq is still work-in-progress and the API definitions may change in an incompatible way. USE AT YOUR OWN RISK.