3 ms·
In the README in the GNU units source code (2.21): 203: Ideas the future (may or may not happen): 204: 205: * Bundle up the units conversion stuff into
by devenblake 6y ago
In the README in the GNU units source code (2.21):
203: Ideas the future (may or may not happen):
204:
205: * Bundle up the units conversion stuff into a library.
At the end of units.c, too:
6280: /* NOTES:
6281:
6282: mymalloc, growbuffer and tryallunits are the only places with print
6283: statements that should (?) be removed to make a library. How can
6284: error reporting in these functions (memory allocation errors) be
6285: handled cleanly for a library implementation?
6286:
6287: Way to report the reduced form of the two operands of a sum when
6288: they are not conformable.
6289:
6290: Way to report the required domain when getting an domain error.
6291:
6292: */
My prowling of the source code is probably uninformed because I'm not a C expert by any means but it seems like you could include units.h and use many of the useful functions in another program.