]> Kevux Git Server - fll/commit
Bugfix: Problems exposed by unit tests in f_conversion.
authorKevin Day <thekevinday@gmail.com>
Tue, 7 Jun 2022 03:39:30 +0000 (22:39 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 7 Jun 2022 04:01:24 +0000 (23:01 -0500)
commitf3eb5dd5aba807229777740938ffab0ce9a06107
tree4a56722ce4eba8c1f11f975cec6b367ae37130b2
parentd0bffd5e157778fa882975e2be182c424257f424
Bugfix: Problems exposed by unit tests in f_conversion.

The unit tests were disabled due to previous problems that are not no longer a problem.
This exposed a few areas that could be improved.

Rename "output" to "stream".
Make sure to call ferror_unlocked() to test for error.
Add loops to handle when fwrite_unlocked() doesn't write all the data but also doesn't throw an error.

Use "negative_or_zero" instead of "negative" to be more verbose and less confusing.
level_0/f_conversion/c/conversion.c
level_0/f_conversion/c/conversion.h
level_0/f_conversion/c/private-conversion.c
level_0/f_conversion/c/private-conversion.h