initial backport of print_library

fixes #139

current as of e0e36f9788985f20a023ced852a02985a08de1ca with modifications to include statements in header and removal of VIC.5 specific variables.