From 052679145ef43909cf05e33ec5bde5b85f3fec8f Mon Sep 17 00:00:00 2001 From: Alison Watson Date: Fri, 14 Jun 2019 12:12:31 -0400 Subject: [PATCH] maraiah: add meta info module --- Cargo.toml | 2 +- LICENSE | 12 ++++++------ source/lib.rs | 1 + source/meta.rs | 28 ++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 source/meta.rs diff --git a/Cargo.toml b/Cargo.toml index 15685dd..6de5ed8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "maraiah" version = "0.1.0" -authors = ["Alison Watson "] +authors = ["Alison Watson ", "Tae Matous"] description = "Marathon editing tools." homepage = "https://greyserv.net/maraiah/" repository = "http://git.greyserv.net/marrub/Maraiah" diff --git a/LICENSE b/LICENSE index e56f995..aef7147 100644 --- a/LICENSE +++ b/LICENSE @@ -1,10 +1,10 @@ -Some of the data contained in tests/data and benches/data is -Copyright © Bungie Software. I do not own them, but am permitted to -redistribute them. Everything else is public domain, as stated: +Some of the data contained in tests/data and benches/data is Copyright © Bungie +Software. I do not own them, but am permitted to redistribute them. Everything +else is public domain, as stated: -To the extent possible under law, I, Alison Watson, have waived all -copyright and related or neighboring rights to this Document as described by -the Creative Commons Zero license as follows: +To the extent possible under law, I, Alison Watson, and all other contributors +to Maraiah, have waived all copyright and related or neighboring rights to this +Document as described by the Creative Commons Zero license as follows: Creative Commons Legal Code diff --git a/source/lib.rs b/source/lib.rs index afda207..8df2565 100644 --- a/source/lib.rs +++ b/source/lib.rs @@ -64,6 +64,7 @@ pub mod fixed; pub mod image; pub mod machdr; pub mod map; +pub mod meta; pub mod shp; pub mod snd; pub mod sound; diff --git a/source/meta.rs b/source/meta.rs new file mode 100644 index 0000000..65fe96f --- /dev/null +++ b/source/meta.rs @@ -0,0 +1,28 @@ +//! Meta-information of this crate. + +use crate::ffi; + +macro_rules! meta_str { + ($($name:ident = $cname:ident = $e:expr;)*) => { + $( + pub const $name: &'static str = $e; + pub const $cname: ffi::NT = c_str!($e); + )* + } +} + +meta_str!( + AUTHORS = C_AUTHORS = env!("CARGO_PKG_AUTHORS"); + DESCRIPTION = C_DESCRIPTION = env!("CARGO_PKG_DESCRIPTION"); + HOMEPAGE = C_HOMEPAGE = env!("CARGO_PKG_HOMEPAGE"); + LICENSE_TEXT = C_LICENSE_TEXT = include_str!("../LICENSE"); + NAME = C_NAME = env!("CARGO_PKG_NAME"); + REPOSITORY = C_REPOSITORY = env!("CARGO_PKG_REPOSITORY"); + VERSION = C_VERSION = env!("CARGO_PKG_VERSION"); + VERSION_MAJOR = C_VERSION_MAJOR = env!("CARGO_PKG_VERSION_MAJOR"); + VERSION_MINOR = C_VERSION_MINOR = env!("CARGO_PKG_VERSION_MINOR"); + VERSION_PATCH = C_VERSION_PATCH = env!("CARGO_PKG_VERSION_PATCH"); + VERSION_PRE = C_VERSION_PRE = env!("CARGO_PKG_VERSION_PRE"); +); + +// EOF