Commit Graph

18 Commits

Author SHA1 Message Date
jtc 89c36052b7 Changed floating point output format to be exactly the same (use same
text and macros) as those in the printf(3) manpage.
This fixes PR #1194, albeit differently.
1995-07-07 23:00:13 +00:00
jtc e9e6fca8b9 The descriptions of the o and u formatting options were reversed (PR #785). 1995-02-15 15:32:27 +00:00
jtc 5d5d116e4a Simplify conversion of "quoted" numeric arguments. 1994-02-03 01:10:49 +00:00
jtc 14f244e88f Code to check if conversion (by strtol(), strtoul(), or strtod()) was
identical, so I moved it into its own function.
1994-02-03 00:35:18 +00:00
jtc 3c10d8e071 Add and use getulong() to handle %u, %o, %x & %X formatting directives.
It was using getlong(), which caused values larger than LONG_MAX to be
truncated to LONG_MAX.
As recommended by 1003.2, print warning messages when argument cannot be
converted to value or is out of range.
1994-02-03 00:16:11 +00:00
jtc e63929d7f5 Handle format strings error correctly. 1993-12-31 01:46:16 +00:00
jtc 0e4b463504 Error in hextobin() macro messed up hex escape constants. 1993-11-25 04:42:11 +00:00
jtc 4c35e0b3ba Oops! get rid of the free(), mklong()'s buffer no longer malloc()'d. 1993-11-19 21:08:17 +00:00
jtc fac5e167cc Return from main() if a \c escape is encountered in a %b string (was an exit()).
Use macro constants for "skip1" and "skip2" instead of assigning them
each loop iteration.
Reformat the multi-case entries in the "big switch" so the lines don't wrap.
1993-11-19 21:05:37 +00:00
jtc 563de0f1c5 Move all the code from do_printf() into do-while loop in main(). I need
to be able to return from main() when a "\c" in a %b string is encountered.
1993-11-19 20:50:27 +00:00
jtc d1a877c5ed Merged in most of the changes from 4.4 necessary to make printf a sh
and csh builtin --- still need to handle the one remaining exit() in
the SysV escape string handling code.
1993-11-19 20:30:57 +00:00
jtc 62f30e8257 Changes required to make printf utility POSIX.2 compliant:
* Escape characters in the string needed to be processed as they were
   encountered, otherwise a "\000" octal constant would prematurely
   terminate the formatting string.
 * Implemented the %b, SysV echo(1) compatibility, formatting directive.
1993-11-05 20:12:38 +00:00
mycroft e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft c3e42d1c64 Add RCS indentifiers. 1993-08-01 07:22:47 +00:00
mycroft 690cae8181 Add RCS indentifiers. 1993-07-31 15:17:49 +00:00
mrg b32571f57a 4.4BSD-Lite2 1993-06-06 22:58:35 +00:00
mycroft 0b3fc2c11f Cleanup for GCC 2. 1993-04-19 07:39:27 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00