aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2017-01-10 21:21:19 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-01-11 09:07:31 -0800
commitdfb1b3bb5c5e9d9d9ee23f3f5bcc84fe6602392d (patch)
treefd1cbff66bbc40993ddcb89a6b62e53f06652e79 /src/macros.rs
parent4fb7801ba3515922e3dbb8b27c1c28ec2efaf22b (diff)
downloadalacritty-dfb1b3bb5c5e9d9d9ee23f3f5bcc84fe6602392d.tar.gz
alacritty-dfb1b3bb5c5e9d9d9ee23f3f5bcc84fe6602392d.zip
Add support for setting title from OSC
Resolves #23 Resolves #144
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs
index a6e30104..c96e6d64 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -31,6 +31,16 @@ macro_rules! err_println {
}
#[macro_export]
+macro_rules! err_print {
+ ($($arg:tt)*) => {{
+ if cfg!(feature = "err-println") {
+ use std::io::Write;
+ (write!(&mut ::std::io::stderr(), $($arg)*)).expect("stderr");
+ }
+ }}
+}
+
+#[macro_export]
macro_rules! debug_println {
($($t:tt)*) => {
if cfg!(debug_assertions) {