1
0
This commit is contained in:
Mark 2025-02-17 17:48:28 -08:00
parent 9cebf49862
commit fc93078d3f
Signed by: Mark
GPG Key ID: C6D63995FE72FD80

View File

@ -1,16 +1,16 @@
/// Print to console
#[macro_export]
macro_rules! print {
($($arg:tt)*) => ({
use core::fmt::Write;
let _ = write!($crate::os::VGA.lock(), $($arg)*);
});
($($arg:tt)*) => ({
use core::fmt::Write;
let _ = write!($crate::os::VGA.lock(), $($arg)*);
});
}
/// Print with new line to console
#[macro_export]
macro_rules! println {
() => (print!("\n"));
($fmt:expr) => (print!(concat!($fmt, "\n")));
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
() => (print!("\n"));
($fmt:expr) => (print!(concat!($fmt, "\n")));
($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\n"), $($arg)*));
}