summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index ffcdb98..f124dda 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -15,6 +15,7 @@
//! # extern crate icalendar;
//! # use chrono::*;
//! # use icalendar::*;
+//! # fn main() {
//! let event = Event::new()
//! .summary("test event")
//! .description("here I have something really important to do")
@@ -44,7 +45,7 @@
//! calendar.add(event);
//! calendar.add(todo);
//! calendar.add(bday);
-//!
+//! # }
//! ```
#![warn(missing_docs,
@@ -60,6 +61,24 @@ extern crate chrono;
extern crate uuid;
//extern crate vobject;
+macro_rules! print_crlf {
+ () => (print!("\r\n"));
+ ($fmt:expr) => (print!(concat!($fmt, "\r\n")));
+ ($fmt:expr, $($arg:tt)*) => (print!(concat!($fmt, "\r\n"), $($arg)*));
+}
+
+macro_rules! write_crlf {
+ ($dst:expr) => (
+ write!($dst, "\r\n")
+ );
+ ($dst:expr, $fmt:expr) => (
+ write!($dst, concat!($fmt, "\r\n"))
+ );
+ ($dst:expr, $fmt:expr, $($arg:tt)*) => (
+ write!($dst, concat!($fmt, "\r\n"), $($arg)*)
+ );
+}
+
//pub mod period;
mod components;
mod properties;