diff options
author | jilles <jilles@FreeBSD.org> | 2010-12-21 20:47:06 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-12-21 20:47:06 +0000 |
commit | eb00352e45c46febb8e2b0df1a048451d79de792 (patch) | |
tree | 9100639c6e991583a424211610f1fda83edfd6a2 /bin/sh/bltin | |
parent | da7284d25303e2c3a5c54e86ebdd14fd514eb5f9 (diff) | |
download | FreeBSD-src-eb00352e45c46febb8e2b0df1a048451d79de792.zip FreeBSD-src-eb00352e45c46febb8e2b0df1a048451d79de792.tar.gz |
sh: Add a function to print warnings (with command name and newline).
This is like error() but without raising an exception.
It is particularly useful as a replacement for the warnx macro in
bltin/bltin.h.
Diffstat (limited to 'bin/sh/bltin')
-rw-r--r-- | bin/sh/bltin/bltin.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/sh/bltin/bltin.h b/bin/sh/bltin/bltin.h index 6618108..f6e7883 100644 --- a/bin/sh/bltin/bltin.h +++ b/bin/sh/bltin/bltin.h @@ -57,11 +57,7 @@ #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file) #define fflush flushout #define INITARGS(argv) -#define warnx(...) do { \ - out2fmt_flush("%s: ", commandname); \ - out2fmt_flush(__VA_ARGS__); \ - out2fmt_flush("\n"); \ - } while (0) +#define warnx warning #define errx(exitstatus, ...) error(__VA_ARGS__) #else |