rust: rename types, add cell init macros
- +3 macros: cell_initializer, cell_simple_initializer and cell_trivial_initializer - rename GraphemeCluster to EGC and GraphemeClusterBackStop to EGCBackstop - improve EGC doc commentspull/922/head
parent
9c08411e27
commit
11287b6081
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
// #define CELL_INITIALIZER(c, s, chan) { .gcluster = (c), .gcluster_backstop = 0, .reserved = 0, .stylemask = (s), .channels = (chan), }
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! cell_initializer {
|
||||||
|
( $c:expr, $s:expr, $chan:expr ) => {
|
||||||
|
cell {
|
||||||
|
gcluster: $c as EGC,
|
||||||
|
gcluster_backstop: 0 as EGCBackstop,
|
||||||
|
reserved: 0,
|
||||||
|
stylemask: $s,
|
||||||
|
channels: $chan,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
//#define CELL_SIMPLE_INITIALIZER(c) { .gcluster = (c), .gcluster_backstop = 0, .reserved = 0, .stylemask = 0, .channels = 0, }
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! cell_simple_initializer {
|
||||||
|
( $c:expr ) => {
|
||||||
|
cell_initializer![$c, 0, 0]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #define CELL_TRIVIAL_INITIALIZER { }
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! cell_trivial_initializer {
|
||||||
|
( ) => {
|
||||||
|
cell_simple_initializer![0]
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue