Improvements to %g pull request

This code %g is preliminary.

Fixed some code style issues to match the current code style.

Added regression tests and help file updates to printf and strprintf.

Fixed use of magic number -4: using -P instead.

Noted two problem areas with XXX comments in qio.c:

    1) need a qprintfg function
    2) re-write to not modify conf->outdigits
This commit is contained in:
Landon Curt Noll
2018-09-30 16:06:28 -07:00
parent fcfe237375
commit da6ccc146f
6 changed files with 82 additions and 39 deletions

View File

@@ -27,6 +27,13 @@ EXAMPLE
"1.732051, 1.732051,1.732051 , ~1.7320,~1.7320,~1.
"
; c = config("display", 50);
; fmt2 = "%g %g\n%g %g\n"
; strprintf(fmt2, 1e5, 1e49, 1e50, 1e500);
"100000 100000000000000000000000000000000000000000000000000
1e50 1e500
"
LIMITS
The number of arguments of strprintf() is not to exceed 1024.
@@ -39,7 +46,7 @@ SEE ALSO
printf, fprintf, print
## Copyright (C) 1999-2006 Landon Curt Noll
## Copyright (C) 1999-2006,2018 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License