| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r289172:
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)
- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity
r290254:
Remove unused variable (SRCDIR)
Notes:
svn path=/stable/10/; revision=313488
|
| |
|
|
|
|
|
|
|
| |
Various style(9) fixes and typos in printf, grep, sort and patch.
#define should be followed by a tab.
Notes:
svn path=/stable/10/; revision=265160
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- r263220 Migrate tools/regression/sbin/ to the new tests layout.
- r263222 Add Makefile missed in r263220.
- r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
- r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout.
- r263345 Expand tabs that sneaked in into spaces.
- r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout.
- r263348 Add Makefiles missed in r263346.
- r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout.
- r263388 Mark multi_test as requiring /usr/share/dict/words.
- r263814 Fix path to the run.pl script to let these tests run.
- r264742 Prevent building tests when bootstrapping make.
This is 'make tinderbox' clean.
Notes:
svn path=/stable/10/; revision=264996
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
zero argument were supplied.
Add a regression test to catch this case as well.
PR: bin/174521
Submitted by: Daniel Shahaf <danielsh@elego.de> (pr)
Submitted by: Mark Johnston <markjdb@gmail.com> (initial patch)
Reviewed by: jilles
Approved by: cperciva (implicit)
MFC after: 3 weeks
Notes:
svn path=/head/; revision=244407
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reduces code duplication and code size.
/usr/bin/printf is not affected.
Side effect: different error messages when certain builtins are passed
invalid options.
Notes:
svn path=/head/; revision=240541
|
| |
|
|
|
|
|
|
|
|
| |
Disussed with: gavin
No objection from: doc
Approved by: joel
MFC after: 3 days
Notes:
svn path=/head/; revision=233648
|
| |
|
|
|
|
|
|
|
|
| |
PR: bin/152934
Approved by: jhb (mentor)
Obtained from: Illumos
MFC after: 2 weeks
Notes:
svn path=/head/; revision=230027
|
| |
|
|
|
|
|
|
|
|
| |
This means these features do not work as expected with multibyte characters.
This perhaps less than ideal behaviour matches printf(3) and is specified by
POSIX.
Notes:
svn path=/head/; revision=222421
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Examples:
LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244)
LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344)
Both of these should print 228.
Like some other shells, incomplete or invalid multibyte characters yield the
value of the first byte without a warning.
Note that there is no general way to go back from the character code to the
character.
Notes:
svn path=/head/; revision=222418
|
| |
|
|
| |
Notes:
svn path=/head/; revision=221026
|
| |
|
|
| |
Notes:
svn path=/head/; revision=221013
|
| |
|
|
| |
Notes:
svn path=/head/; revision=219153
|
| |
|
|
|
|
|
|
|
| |
These functions throw exceptions if they fail, possibly causing memory
leaks. The normal out-of-memory handling suffices. The INTOFF around almost
all of printf prevents memory leaks due to SIGINT.
Notes:
svn path=/head/; revision=216809
|
| |
|
|
|
|
|
|
|
|
|
| |
The #define for warnx now behaves much like the libc function (except that
it uses sh command name and output).
Also, it now uses C99 __VA_ARGS__ so there is no need for three different
macros for 0, 1 or 2 parameters.
Notes:
svn path=/head/; revision=216606
|
| |
|
|
|
|
|
|
|
|
| |
The new behavior prevents us from being able to bail out explicitly
on unknown options that we have not implemented. BASH for instance
have introduced a '-v' for printf(1) builtin and it seems to be bad
to pretend that we supported it and have a script break silently.
Notes:
svn path=/head/; revision=216447
|
| |
|
|
|
|
|
|
|
|
| |
exit(3) as pointed out by jilles@ so revert to using return(),
also change the return value back to 1 as requested by bde@.
This is logically a revert of revision 216422.
Notes:
svn path=/head/; revision=216439
|
| |
|
|
|
|
|
|
|
|
|
| |
LC_NUMERIC.
PR: bin/152934
Submitted by: Pedro F. Giffuni <giffunip tutopia.com>
Obtained from: Illumos
Notes:
svn path=/head/; revision=216424
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that when the options section is listed as "None", utility shall
recognize "--" as a first argument to be discarded.
This implementation is largely based on OpenBSD implementation but
we do slightly differently:
a) We skip argv[0] as the first step;
b) We test whether the next argument is "--" and ignore it.
With this change one will get:
%printf
usage: printf format [arguments ...]
%printf -v
-v%printf -- -v
-v%
%printf --
usage: printf format [arguments ...]
Which matches the behavior observed on a Debian system but different
from the Illumos change.
Notes:
svn path=/head/; revision=216423
|
| |
|
|
| |
Notes:
svn path=/head/; revision=216422
|
| |
|
|
|
|
|
|
|
|
|
| |
match the definition.
PR: bin/152934
Submitted by: Pedro F. Giffuni <giffunip tutopia.com>
Obtained from: Illumos
Notes:
svn path=/head/; revision=216418
|
| |
|
|
|
|
|
|
|
| |
style(9)
Submitted by: Pedro F. Giffuni <giffunip tutopia.com>
Notes:
svn path=/head/; revision=216417
|
| |
|
|
|
|
|
|
|
|
|
|
| |
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
Also add $FreeBSD$ to a few files to keep svn happy.
Discussed with: imp, rwatson
Notes:
svn path=/head/; revision=216370
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The #define BUILTIN was for building as a csh (not tcsh) builtin.
Given that csh was replaced by tcsh years ago there is no point in keeping
this.
The #define SHELL is for building as an sh builtin and is in active use.
This commit does not change the /bin/sh and /usr/bin/printf binaries.
Notes:
svn path=/head/; revision=216310
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was removed in 2001 but I think it is appropriate to add it back:
* I do not want to encourage people to write fragile and non-portable echo
commands by making printf much slower than echo.
* Recent versions of Autoconf use it a lot.
* Almost no software still wants to support systems that do not have
printf(1) at all.
* In many other shells printf is already a builtin.
Side effect: printf is now always the builtin version (which behaves
identically to /usr/bin/printf) and cannot be overridden via PATH (except
via the undocumented %builtin mechanism).
Code size increases about 5K on i386. Embedded folks might want to replace
/usr/bin/printf with a hard link to /usr/bin/alias.
Notes:
svn path=/head/; revision=215520
|
| |
|
|
| |
Notes:
svn path=/head/; revision=212374
|
| |
|
|
|
|
|
|
|
|
|
| |
Octal escape sequences are expanded to bytes, not characters, and multiple
are required for a multibyte character.
The valid escape sequences in %b strings are slightly different from the
escape sequences in the format string.
Notes:
svn path=/head/; revision=212244
|
| |
|
|
|
|
|
| |
Also add some missing $FreeBSD$ to keep svn happy.
Notes:
svn path=/head/; revision=201386
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=181153
|
| |
|
|
| |
Notes:
svn path=/head/; revision=148721
|
| |
|
|
|
|
|
| |
Approved by: re (blanket)
Notes:
svn path=/head/; revision=147370
|
| |
|
|
| |
Notes:
svn path=/head/; revision=146466
|
| |
|
|
| |
Notes:
svn path=/head/; revision=145084
|
| |
|
|
|
|
|
| |
still results in trucation but this is be much harder to fix.
Notes:
svn path=/head/; revision=145078
|
| |
|
|
| |
Notes:
svn path=/head/; revision=145074
|
| |
|
|
| |
Notes:
svn path=/head/; revision=145063
|
| |
|
|
|
|
|
| |
- Rewrite the loop in main() to be more understandable.
Notes:
svn path=/head/; revision=145061
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=145027
|
| |
|
|
|
|
|
|
|
|
| |
'\0' (eg in the invocation 'printf %'), the for-loop would miss the terminating
null character.
MFC after: 1 week
Notes:
svn path=/head/; revision=144902
|
| |
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=143906
|
| |
|
|
| |
Notes:
svn path=/head/; revision=140368
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=135751
|
| |
|
|
|
|
|
| |
Noticed by: ru
Notes:
svn path=/head/; revision=131519
|
| |
|
|
|
|
|
| |
by POSIX.
Notes:
svn path=/head/; revision=131511
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131507
|
| |
|
|
| |
Notes:
svn path=/head/; revision=131491
|
| |
|
|
| |
Notes:
svn path=/head/; revision=130117
|
| |
|
|
|
|
|
|
| |
- Document the way infinity and NaN are printed.
- Un-document the non-existent %w specifier.
Notes:
svn path=/head/; revision=130116
|
| |
|
|
| |
Notes:
svn path=/head/; revision=130115
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/head/; revision=126729
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=102944
|