christos
76f0fa8f60
brace pollution, and char -> unsigned char
1998-12-19 20:21:44 +00:00
wsanchez
af4e69540c
include unistd
1998-10-14 00:56:00 +00:00
perry
c10fb822b5
add <unistd.h> to fix compiler warning
1998-02-03 03:10:15 +00:00
lukem
2f07741322
s/index/strchr
1997-10-19 22:57:05 +00:00
mrg
09366313d3
"merge" lite-2. our printf is already kinda different...minor changes only.
1997-10-18 15:38:01 +00:00
christos
abc99479ba
Fix compiler warnings.
1997-07-04 21:25:16 +00:00
cgd
8d3057754a
lint and KNF changes. (mostly casting returns to void to quiet lint.)
1997-01-14 19:20:09 +00:00
tls
9d225a1783
RCS ID police
1997-01-09 20:18:21 +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
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