History log of /freebsd/usr.bin/printf/printf.c (Results 101 – 125 of 146)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/2.2.1_cvs, release/2.2.0, release/2.1.7_cvs, release/2.1.6_cvs, release/2.1.6.1
# 3ec30b79 14-Dec-1996 Steve Price <steve@FreeBSD.org>

-Wall cleaning.


Revision tags: release/2.1.5_cvs
# e6068a34 06-Oct-1996 Steve Price <steve@FreeBSD.org>

Remove annoying -Wall warning.


# d72f654c 01-Oct-1996 Peter Wemm <peter@FreeBSD.org>

When used as a shell builtin, this program decoded a subset of arguments
known to printf(3) and then used printf() to format it... The only
problem what the #define printf out1fmt. The code was beha

When used as a shell builtin, this program decoded a subset of arguments
known to printf(3) and then used printf() to format it... The only
problem what the #define printf out1fmt. The code was behaving differently
when run as a shell builtin since out1fmt() isn't printf(3).

Simple hack. Print to a buffer and fputs (also #defined for sh) the
result. This should fix the printf builtin problem in PR#1673, rather
than leaving the call commented out. (printf.o was being statically linked
in anyway, we might as well use it)

show more ...


Revision tags: release/2.1.0_cvs
# d9f93710 10-Dec-1995 Joerg Wunsch <joerg@FreeBSD.org>

Move out some of the shell builtin bogosity from printf's source to
sh's builtin/bltin.h.


Revision tags: release/2.0.5_cvs
# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# d867cefd 07-May-1995 Joerg Wunsch <joerg@FreeBSD.org>

Make the syntax checks for the format string more strict. The string
"%8*s" is no longer considered to be a valid format description.

This closes PR bin/386.


Revision tags: release/2.0, release/1.1.5.1_cvs
# 9b50d902 27-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources


Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0
# 9d65050e 02-Aug-2008 David Schultz <das@FreeBSD.org>

POSIX says that octal escapes have the format \ddd in the format string,
but \0ddd in a %b argument, with a length restriction of 3 octal digits
in either case. This seems silly, but it needs to be r

POSIX says that octal escapes have the format \ddd in the format string,
but \0ddd in a %b argument, with a length restriction of 3 octal digits
in either case. This seems silly, but it needs to be right so it's possible
to write an octal escape followed by an ordinary digit. Solaris printf(1)
and GNU printf(1) also behave this way.

Example: "printf '\0752'" now produces "=2" instead of garbage.

show more ...


Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0
# d41d23e1 05-Aug-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Prefer {u,}intmax_t over the deprecated {u_,}quad_t.


# f682f10c 21-May-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sync program's usage() with manpage's SYNOPSIS.


Revision tags: release/5.4.0_cvs, release/5.4.0
# 3ec96caf 14-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Handle null characters in the format string. A \0 in the argument passed to %b
still results in trucation but this is be much harder to fix.


# f3f148d2 14-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

No reason to write \a and \v as octal escape sequences.


# fbd08684 14-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

- Move parts of the long main() function into a new function doformat().
- Rewrite the loop in main() to be more understandable.


# 5ec2b8dc 13-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Assign 0.0 to the variable passed to getfloating() if the argument is missing.

MFC after: 1 week


# 0ba01198 11-Apr-2005 Stefan Farfeleder <stefanf@FreeBSD.org>

Replace buggy for-loops to skip certain character with strspn(). If *fmt was
'\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating
null character.

MFC after: 1 week


# fd757c50 21-Mar-2005 David Schultz <das@FreeBSD.org>

Support the L modifier for floating-point values as an extension.
When L is omitted, double precision is used, so printf(1) gives
reproducable results. When L is specified, long double precision is

Support the L modifier for floating-point values as an extension.
When L is omitted, double precision is used, so printf(1) gives
reproducable results. When L is specified, long double precision is
used, which may improve precision, depending on the machine.

show more ...


Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 6ac6319b 24-Sep-2004 Giorgos Keramidas <keramida@FreeBSD.org>

Allow %' to be used as a format flag by printf(1). This makes it
possible to print the thousands separator in the locale setups that
have one, by something like this:

$ env -i LC_NUMERIC=en_US.

Allow %' to be used as a format flag by printf(1). This makes it
possible to print the thousands separator in the locale setups that
have one, by something like this:

$ env -i LC_NUMERIC=en_US.ISO8859-1 ./printf "%'0.2f\n" 12345
12,345.00

Reviewed by: das

show more ...


# 03b2eaac 05-Jun-2004 David Schultz <das@FreeBSD.org>

Enable support for the %a, %A, and %F format specifiers.


Revision tags: release/4.10.0_cvs, release/4.10.0
# 8c423a99 07-Mar-2004 Colin Percival <cperciva@FreeBSD.org>

Make it possible for the %[eEfgG] formats to not result in an error
being reported by /usr/bin/printf.

This bug has been around for 22 months... either nobody uses printf
with floating-point values,

Make it possible for the %[eEfgG] formats to not result in an error
being reported by /usr/bin/printf.

This bug has been around for 22 months... either nobody uses printf
with floating-point values, or people are forgetting to check their
return codes.

Approved by: rwatson (mentor)

show more ...


Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs
# f4ac32de 05-Sep-2002 David Malone <dwmalone@FreeBSD.org>

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

R

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5

show more ...


Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs
# 12e8db40 19-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Fix duplicate % in %b format introduced in rev 1.22.


# 98dd6386 19-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Let printf(1) tell the difference between zero width/precision and
unspecified width/precision.

PR: 39116
Submitted by: Egil Brendsdal <egilb@ife.no>
MFC after: 1 week


# 5f19035b 19-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Allow format strings containing "%%" to be reused.

PR: 39116
Submitted by: Egil Brendsdal <egilb@ife.no>
MFC after: 1 week


# 37fd4590 19-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Allow `%' to be written out with an octal escape (\45 or \045).

PR: 39116
Submitted by: Egil Brendsdal <egilb@ife.no>
MFC after: 1 week


# bacab7d6 25-Apr-2002 Tim J. Robbins <tjr@FreeBSD.org>

Handle numbers larger than QUAD_MAX for unsigned conversions correctly.
Exit with nonzero status if a conversion failed.
Play nice if used as a shell builtin (currently disabled).

Submitted by: bde

Handle numbers larger than QUAD_MAX for unsigned conversions correctly.
Exit with nonzero status if a conversion failed.
Play nice if used as a shell builtin (currently disabled).

Submitted by: bde (partially)
Approved by: mike

show more ...


123456