mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
uucore: add disp_err macro
This commit is contained in:
parent
aac1d40f64
commit
a196bebd1b
1 changed files with 9 additions and 0 deletions
|
@ -43,6 +43,15 @@ macro_rules! show_info(
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! disp_err(
|
||||||
|
($($args:tt)+) => ({
|
||||||
|
pipe_write!(&mut ::std::io::stderr(), "{}: ", executable!());
|
||||||
|
pipe_writeln!(&mut ::std::io::stderr(), $($args)+);
|
||||||
|
pipe_writeln!(&mut ::std::io::stderr(), "Try '{} --help' for more information.", executable!());
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! eprint(
|
macro_rules! eprint(
|
||||||
($($args:tt)+) => (pipe_write!(&mut ::std::io::stderr(), $($args)+))
|
($($args:tt)+) => (pipe_write!(&mut ::std::io::stderr(), $($args)+))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue