From 452b7cd5350bfbfe8bc20ce2b8013e900fab5d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Thu, 15 Apr 2021 20:45:08 +0200 Subject: [PATCH] [rust] renamed cell_* functions to nccell_* --- rust/src/cells/methods.rs | 126 ++++++++++++++++---------------- rust/src/cells/reimplemented.rs | 68 ++++++++--------- 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/rust/src/cells/methods.rs b/rust/src/cells/methods.rs index 4e1e65866..5c91ac6b3 100644 --- a/rust/src/cells/methods.rs +++ b/rust/src/cells/methods.rs @@ -122,106 +122,106 @@ impl NcCell { /// Extracts the background [NcAlphaBits] (shifted to LSBs). /// - /// *C style function: [cell_bg_alpha()][crate::cell_bg_alpha].* + /// *C style function: [nccell_bg_alpha()][crate::nccell_bg_alpha].* pub fn bg_alpha(&self) -> NcAlphaBits { - crate::cell_bg_alpha(self) + crate::nccell_bg_alpha(self) } /// Is the background [NcChannel] using the "default background color"? /// - /// *C style function: [cell_bg_default_p()][crate::cell_bg_default_p].* + /// *C style function: [nccell_bg_default_p()][crate::nccell_bg_default_p].* pub fn bg_default_p(&self) -> bool { - crate::cell_bg_default_p(self) + crate::nccell_bg_default_p(self) } /// Gets the [NcPaletteIndex] of the background [NcChannel]. /// - /// *C style function: [cell_bg_palindex()][crate::cell_bg_palindex].* + /// *C style function: [nccell_bg_palindex()][crate::nccell_bg_palindex].* pub fn bg_palindex(&self) -> NcPaletteIndex { - crate::cell_bg_palindex(self) + crate::nccell_bg_palindex(self) } /// Is the background [NcChannel] using an [NcPaletteIndex] indexed /// [NcPalette][crate::NcPalette] color? /// - /// *C style function: [cell_bg_palindex_p()][crate::cell_bg_palindex_p].* + /// *C style function: [nccell_bg_palindex_p()][crate::nccell_bg_palindex_p].* pub fn bg_palindex_p(&self) -> bool { - crate::cell_bg_palindex_p(self) + crate::nccell_bg_palindex_p(self) } /// Gets the background [NcRgb] (shifted to LSBs). /// - /// *C style function: [cell_bg_rgb()][crate::cell_bg_rgb].* + /// *C style function: [nccell_bg_rgb()][crate::nccell_bg_rgb].* pub fn bg_rgb(&self) -> NcRgb { - crate::cell_bg_rgb(self) + crate::nccell_bg_rgb(self) } /// Gets the background [NcColor] RGB components. /// - /// *C style function: [cell_bg_rgb8()][crate::cell_bg_rgb8].* + /// *C style function: [nccell_bg_rgb8()][crate::nccell_bg_rgb8].* pub fn bg_rgb8(&self) -> (NcColor, NcColor, NcColor) { let (mut r, mut g, mut b) = (0, 0, 0); - crate::cell_bg_rgb8(self, &mut r, &mut g, &mut b); + crate::nccell_bg_rgb8(self, &mut r, &mut g, &mut b); (r, g, b) } /// Extracts the foreground [NcAlphaBits] (shifted to LSBs). /// - /// *C style function: [cell_fg_alpha()][crate::cell_fg_alpha].* + /// *C style function: [nccell_fg_alpha()][crate::nccell_fg_alpha].* pub fn fg_alpha(&self) -> NcAlphaBits { - crate::cell_fg_alpha(self) + crate::nccell_fg_alpha(self) } /// Is the foreground [NcChannel] using the "default foreground color"? /// - /// *C style function: [cell_fg_default_p()][crate::cell_fg_default_p].* + /// *C style function: [nccell_fg_default_p()][crate::nccell_fg_default_p].* pub fn fg_default_p(&self) -> bool { - crate::cell_fg_default_p(self) + crate::nccell_fg_default_p(self) } /// Gets the [NcPaletteIndex] of the foreground [NcChannel]. /// - /// *C style function: [cell_fg_palindex()][crate::cell_fg_palindex].* + /// *C style function: [nccell_fg_palindex()][crate::nccell_fg_palindex].* pub fn fg_palindex(&self) -> NcPaletteIndex { - crate::cell_fg_palindex(self) + crate::nccell_fg_palindex(self) } /// Is the foreground [NcChannel] using an [NcPaletteIndex] indexed /// [NcPalette][crate::NcPalette] color? /// - /// *C style function: [cell_fg_palindex_p()][crate::cell_fg_palindex_p].* + /// *C style function: [nccell_fg_palindex_p()][crate::nccell_fg_palindex_p].* pub fn fg_palindex_p(&self) -> bool { - crate::cell_fg_palindex_p(self) + crate::nccell_fg_palindex_p(self) } /// Gets the foreground [NcRgb] (shifted to LSBs). /// - /// *C style function: [cell_fg_rgb()][crate::cell_fg_rgb].* + /// *C style function: [nccell_fg_rgb()][crate::nccell_fg_rgb].* pub fn fg_rgb(&self) -> NcRgb { - crate::cell_fg_rgb(self) + crate::nccell_fg_rgb(self) } /// Gets the foreground [NcColor] RGB components. /// - /// *C style function: [cell_fg_rgb8()][crate::cell_fg_rgb8].* + /// *C style function: [nccell_fg_rgb8()][crate::nccell_fg_rgb8].* pub fn fg_rgb8(&self) -> (NcColor, NcColor, NcColor) { let (mut r, mut g, mut b) = (0, 0, 0); - crate::cell_fg_rgb8(self, &mut r, &mut g, &mut b); + crate::nccell_fg_rgb8(self, &mut r, &mut g, &mut b); (r, g, b) } /// Sets the background [NcAlphaBits]. /// - /// *C style function: [cell_set_bg_alpha()][crate::cell_set_bg_alpha].* + /// *C style function: [nccell_set_bg_alpha()][crate::nccell_set_bg_alpha].* pub fn set_bg_alpha(&mut self, alpha: NcAlphaBits) { - crate::cell_set_bg_alpha(self, alpha); + crate::nccell_set_bg_alpha(self, alpha); } /// Indicates to use the "default color" for the background [NcChannel]. /// - /// *C style function: [cell_set_bg_default()][crate::cell_set_bg_default].* + /// *C style function: [nccell_set_bg_default()][crate::nccell_set_bg_default].* pub fn set_bg_default(&mut self) { - crate::cell_set_bg_default(self); + crate::nccell_set_bg_default(self); } /// Sets the background [NcPaletteIndex]. @@ -230,38 +230,38 @@ impl NcCell { /// [NCCELL_ALPHA_OPAQUE][crate::NCCELL_ALPHA_OPAQUE], and clears out /// [NCCELL_BGDEFAULT_MASK][crate::NCCELL_BGDEFAULT_MASK]. /// - /// *C style function: [cell_set_bg_palindex()][crate::cell_set_bg_palindex].* + /// *C style function: [nccell_set_bg_palindex()][crate::nccell_set_bg_palindex].* pub fn set_bg_palindex(&mut self, index: NcPaletteIndex) { - crate::cell_set_bg_palindex(self, index); + crate::nccell_set_bg_palindex(self, index); } /// Sets the background [NcRgb] and marks it as not using the default color. /// - /// *C style function: [cell_set_bg_rgb()][crate::cell_set_bg_rgb].* + /// *C style function: [nccell_set_bg_rgb()][crate::nccell_set_bg_rgb].* pub fn set_bg_rgb(&mut self, rgb: NcRgb) { - crate::cell_set_bg_rgb(self, rgb); + crate::nccell_set_bg_rgb(self, rgb); } /// Sets the background [NcColor] RGB components, and marks it as not using /// the "default color". /// - /// *C style function: [cell_set_bg_rgb8()][crate::cell_set_bg_rgb8].* + /// *C style function: [nccell_set_bg_rgb8()][crate::nccell_set_bg_rgb8].* pub fn set_bg_rgb8(&mut self, red: NcColor, green: NcColor, blue: NcColor) { - crate::cell_set_bg_rgb8(self, red, green, blue); + crate::nccell_set_bg_rgb8(self, red, green, blue); } /// Sets the foreground [NcAlphaBits]. /// - /// *C style function: [cell_set_fg_alpha()][crate::cell_set_fg_alpha].* + /// *C style function: [nccell_set_fg_alpha()][crate::nccell_set_fg_alpha].* pub fn set_fg_alpha(&mut self, alpha: NcAlphaBits) { - crate::cell_set_fg_alpha(self, alpha); + crate::nccell_set_fg_alpha(self, alpha); } /// Indicates to use the "default color" for the foreground [NcChannel]. /// - /// *C style function: [cell_set_fg_default()][crate::cell_set_fg_default].* + /// *C style function: [nccell_set_fg_default()][crate::nccell_set_fg_default].* pub fn set_fg_default(&mut self) { - crate::cell_set_fg_default(self); + crate::nccell_set_fg_default(self); } /// Sets the foreground [NcPaletteIndex]. @@ -270,24 +270,24 @@ impl NcCell { /// [NCCELL_ALPHA_OPAQUE][crate::NCCELL_ALPHA_OPAQUE], and clears out /// [NCCELL_BGDEFAULT_MASK][crate::NCCELL_BGDEFAULT_MASK]. /// - /// *C style function: [cell_set_fg_palindex()][crate::cell_set_fg_palindex].* + /// *C style function: [nccell_set_fg_palindex()][crate::nccell_set_fg_palindex].* pub fn set_fg_palindex(&mut self, index: NcPaletteIndex) { - crate::cell_set_fg_palindex(self, index); + crate::nccell_set_fg_palindex(self, index); } /// Sets the foreground [NcRgb] and marks it as not using the default color. /// - /// *C style function: [cell_set_fg_rgb()][crate::cell_set_fg_rgb].* + /// *C style function: [nccell_set_fg_rgb()][crate::nccell_set_fg_rgb].* pub fn set_fg_rgb(&mut self, rgb: NcRgb) { - crate::cell_set_fg_rgb(self, rgb); + crate::nccell_set_fg_rgb(self, rgb); } /// Sets the foreground [NcColor] RGB components, and marks it as not using /// the "default color". /// - /// *C style function: [cell_set_fg_rgb8()][crate::cell_set_fg_rgb8].* + /// *C style function: [nccell_set_fg_rgb8()][crate::nccell_set_fg_rgb8].* pub fn set_fg_rgb8(&mut self, red: NcColor, green: NcColor, blue: NcColor) { - crate::cell_set_fg_rgb8(self, red, green, blue); + crate::nccell_set_fg_rgb8(self, red, green, blue); } } @@ -299,15 +299,15 @@ impl NcCell { /// The actual egcpool index needn't be the same--indeed, the planes /// needn't even be the same. Only the expanded NcEgc must be bit-equal. /// - /// *C style function: [cellcmp()][crate::cellcmp].* + /// *C style function: [nccellcmp()][crate::nccellcmp].* pub fn compare(plane1: &NcPlane, cell1: &NcCell, plane2: &NcPlane, cell2: &NcCell) -> bool { - crate::cellcmp(plane1, cell1, plane2, cell2) + crate::nccellcmp(plane1, cell1, plane2, cell2) } /// Saves the [NcStyleMask] and the [NcChannelPair], and returns the [NcEgc]. /// (These are the three elements of an NcCell). /// - /// *C style function: [cell_fg_alpha()][crate::cell_fg_alpha].* + /// *C style function: [nccell_fg_alpha()][crate::nccell_fg_alpha].* pub fn extract( &mut self, plane: &mut NcPlane, @@ -329,30 +329,30 @@ impl NcCell { /// Returns the [NcStyleMask] bits. /// - /// *C style function: [cell_styles()][crate::cell_styles].* + /// *C style function: [nccell_styles()][crate::nccell_styles].* pub fn styles(&mut self) -> NcStyleMask { - crate::cell_styles(self) + crate::nccell_styles(self) } /// Removes the specified [NcStyleMask] bits. /// - /// *C style function: [cell_off()][crate::cell_off_styles].* + /// *C style function: [nccell_off()][crate::nccell_off_styles].* pub fn off_styles(&mut self, stylebits: NcStyleMask) { - crate::cell_off_styles(self, stylebits) + crate::nccell_off_styles(self, stylebits) } /// Adds the specified [NcStyleMask] bits. /// - /// *C style function: [cell_on()][crate::cell_on_styles].* + /// *C style function: [nccell_on()][crate::nccell_on_styles].* pub fn on_styles(&mut self, stylebits: NcStyleMask) { - crate::cell_on_styles(self, stylebits) + crate::nccell_on_styles(self, stylebits) } /// Sets just the specified [NcStyleMask] bits. /// - /// *C style function: [cell_set_styles()][crate::cell_set_styles].* + /// *C style function: [nccell_set_styles()][crate::nccell_set_styles].* pub fn set_styles(&mut self, stylebits: NcStyleMask) { - crate::cell_set_styles(self, stylebits) + crate::nccell_set_styles(self, stylebits) } } @@ -363,9 +363,9 @@ impl NcCell { // /// This pointer can be invalidated by any further operation on the referred // /// plane, so… watch out! // /// - // /// *C style function: [cell_extended_gcluster()][crate::cell_wide_left_p].* + // /// *C style function: [nccell_extended_gcluster()][crate::nccell_wide_left_p].* // pub fn extended_gcluster(&self, plane: &NcPlane) -> u32 { - // let egcpointer = unsafe { crate::cell_extended_gcluster(plane, self) }; + // let egcpointer = unsafe { crate::nccell_extended_gcluster(plane, self) }; // egcpointer // } @@ -382,23 +382,23 @@ impl NcCell { /// Does this NcCell contain a wide codepoint? /// - /// *C style function: [cell_double_wide_p()][crate::cell_double_wide_p].* + /// *C style function: [nccell_double_wide_p()][crate::nccell_double_wide_p].* pub fn double_wide_p(&self) -> bool { - crate::cell_double_wide_p(self) + crate::nccell_double_wide_p(self) } /// Is this the left half of a wide character? /// - /// *C style function: [cell_wide_left_p()][crate::cell_wide_left_p].* + /// *C style function: [nccell_wide_left_p()][crate::nccell_wide_left_p].* pub fn wide_left_p(&self) -> bool { - crate::cell_wide_right_p(self) + crate::nccell_wide_right_p(self) } /// Is this the right side of a wide character? /// - /// *C style function: [cell_wide_right_p()][crate::cell_wide_right_p].* + /// *C style function: [nccell_wide_right_p()][crate::nccell_wide_right_p].* pub fn wide_right_p(&self) -> bool { - crate::cell_wide_right_p(self) + crate::nccell_wide_right_p(self) } } diff --git a/rust/src/cells/reimplemented.rs b/rust/src/cells/reimplemented.rs index 4d2a7ba56..6b1227e43 100644 --- a/rust/src/cells/reimplemented.rs +++ b/rust/src/cells/reimplemented.rs @@ -15,7 +15,7 @@ use crate::{ /// /// *Method: NcCell.[fg_alpha()][NcCell#method.fg_alpha].* #[inline] -pub fn cell_fg_alpha(cell: &NcCell) -> NcAlphaBits { +pub fn nccell_fg_alpha(cell: &NcCell) -> NcAlphaBits { crate::channels_fg_alpha(cell.channels) } @@ -23,7 +23,7 @@ pub fn cell_fg_alpha(cell: &NcCell) -> NcAlphaBits { /// /// *Method: NcCell.[bg_alpha()][NcCell#method.bg_alpha].* #[inline] -pub fn cell_bg_alpha(cell: &NcCell) -> NcAlphaBits { +pub fn nccell_bg_alpha(cell: &NcCell) -> NcAlphaBits { crate::channels_bg_alpha(cell.channels) } @@ -31,7 +31,7 @@ pub fn cell_bg_alpha(cell: &NcCell) -> NcAlphaBits { /// /// *Method: NcCell.[set_fg_alpha()][NcCell#method.set_fg_alpha].* #[inline] -pub fn cell_set_fg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { +pub fn nccell_set_fg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { crate::channels_set_fg_alpha(&mut cell.channels, alpha); } @@ -39,7 +39,7 @@ pub fn cell_set_fg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { /// /// *Method: NcCell.[set_bg_alpha()][NcCell#method.set_bg_alpha].* #[inline] -pub fn cell_set_bg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { +pub fn nccell_set_bg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { crate::channels_set_bg_alpha(&mut cell.channels, alpha); } @@ -50,7 +50,7 @@ pub fn cell_set_bg_alpha(cell: &mut NcCell, alpha: NcAlphaBits) { /// /// *Method: NcCell.[fg_rgb8()][NcCell#method.fg_rgb8].* #[inline] -pub fn cell_fg_rgb8( +pub fn nccell_fg_rgb8( cell: &NcCell, red: &mut NcColor, green: &mut NcColor, @@ -64,7 +64,7 @@ pub fn cell_fg_rgb8( /// /// *Method: NcCell.[bg_rgb8()][NcCell#method.bg_rgb8].* #[inline] -pub fn cell_bg_rgb8( +pub fn nccell_bg_rgb8( cell: &NcCell, red: &mut NcColor, green: &mut NcColor, @@ -78,7 +78,7 @@ pub fn cell_bg_rgb8( /// /// *Method: NcCell.[set_fg_rgb8()][NcCell#method.set_fg_rgb8].* #[inline] -pub fn cell_set_fg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: NcColor) { +pub fn nccell_set_fg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: NcColor) { crate::channels_set_fg_rgb8(&mut cell.channels, red, green, blue); } @@ -87,7 +87,7 @@ pub fn cell_set_fg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: N /// /// *Method: NcCell.[set_bg_rgb8()][NcCell#method.set_bg_rgb8].* #[inline] -pub fn cell_set_bg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: NcColor) { +pub fn nccell_set_bg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: NcColor) { crate::channels_set_bg_rgb8(&mut cell.channels, red, green, blue); } @@ -97,7 +97,7 @@ pub fn cell_set_bg_rgb8(cell: &mut NcCell, red: NcColor, green: NcColor, blue: N /// /// *Method: NcCell.[fg_rgb()][NcCell#method.fg_rgb].* #[inline] -pub fn cell_fg_rgb(cell: &NcCell) -> NcRgb { +pub fn nccell_fg_rgb(cell: &NcCell) -> NcRgb { crate::channels_fg_rgb(cell.channels) } @@ -105,7 +105,7 @@ pub fn cell_fg_rgb(cell: &NcCell) -> NcRgb { /// /// *Method: NcCell.[bg_rgb()][NcCell#method.bg_rgb].* #[inline] -pub fn cell_bg_rgb(cell: &NcCell) -> NcRgb { +pub fn nccell_bg_rgb(cell: &NcCell) -> NcRgb { crate::channels_bg_rgb(cell.channels) } @@ -114,7 +114,7 @@ pub fn cell_bg_rgb(cell: &NcCell) -> NcRgb { /// /// *Method: NcCell.[set_fg_rgb()][NcCell#method.set_fg_rgb].* #[inline] -pub fn cell_set_fg_rgb(cell: &mut NcCell, rgb: NcRgb) { +pub fn nccell_set_fg_rgb(cell: &mut NcCell, rgb: NcRgb) { crate::channels_set_fg_rgb(&mut cell.channels, rgb); } @@ -123,7 +123,7 @@ pub fn cell_set_fg_rgb(cell: &mut NcCell, rgb: NcRgb) { /// /// *Method: NcCell.[set_bg_rgb()][NcCell#method.set_bg_rgb].* #[inline] -pub fn cell_set_bg_rgb(cell: &mut NcCell, rgb: NcRgb) { +pub fn nccell_set_bg_rgb(cell: &mut NcCell, rgb: NcRgb) { crate::channels_set_bg_rgb(&mut cell.channels, rgb); } @@ -134,7 +134,7 @@ pub fn cell_set_bg_rgb(cell: &mut NcCell, rgb: NcRgb) { /// /// *Method: NcCell.[set_fg_default()][NcCell#method.set_fg_default].* #[inline] -pub fn cell_set_fg_default(cell: &mut NcCell) { +pub fn nccell_set_fg_default(cell: &mut NcCell) { crate::channels_set_fg_default(&mut cell.channels); } @@ -143,7 +143,7 @@ pub fn cell_set_fg_default(cell: &mut NcCell) { /// /// *Method: NcCell.[set_bg_default()][NcCell#method.set_bg_default].* #[inline] -pub fn cell_set_bg_default(cell: &mut NcCell) { +pub fn nccell_set_bg_default(cell: &mut NcCell) { crate::channels_set_bg_default(&mut cell.channels); } @@ -152,7 +152,7 @@ pub fn cell_set_bg_default(cell: &mut NcCell) { /// /// *Method: NcCell.[fg_default_p()][NcCell#method.fg_default_p].* #[inline] -pub fn cell_fg_default_p(cell: &NcCell) -> bool { +pub fn nccell_fg_default_p(cell: &NcCell) -> bool { crate::channels_fg_default_p(cell.channels) } @@ -164,7 +164,7 @@ pub fn cell_fg_default_p(cell: &NcCell) -> bool { /// /// *Method: NcCell.[bg_default_p()][NcCell#method.bg_default_p].* #[inline] -pub fn cell_bg_default_p(cell: &NcCell) -> bool { +pub fn nccell_bg_default_p(cell: &NcCell) -> bool { crate::channels_bg_default_p(cell.channels) } @@ -175,7 +175,7 @@ pub fn cell_bg_default_p(cell: &NcCell) -> bool { /// /// *Method: NcCell.[fg_palindex_p()][NcCell#method.fg_palindex_p].* #[inline] -pub fn cell_fg_palindex_p(cell: &NcCell) -> bool { +pub fn nccell_fg_palindex_p(cell: &NcCell) -> bool { crate::channels_fg_palindex_p(cell.channels) } @@ -184,7 +184,7 @@ pub fn cell_fg_palindex_p(cell: &NcCell) -> bool { /// /// *Method: NcCell.[bg_palindex_p()][NcCell#method.bg_palindex_p].* #[inline] -pub fn cell_bg_palindex_p(cell: &NcCell) -> bool { +pub fn nccell_bg_palindex_p(cell: &NcCell) -> bool { crate::channels_bg_palindex_p(cell.channels) } @@ -192,7 +192,7 @@ pub fn cell_bg_palindex_p(cell: &NcCell) -> bool { /// /// *Method: NcCell.[fg_palindex()][NcCell#method.fg_palindex].* #[inline] -pub const fn cell_fg_palindex(cell: &NcCell) -> NcPaletteIndex { +pub const fn nccell_fg_palindex(cell: &NcCell) -> NcPaletteIndex { ((cell.channels & 0xff00000000 as NcChannelPair) >> 32) as NcPaletteIndex } @@ -200,7 +200,7 @@ pub const fn cell_fg_palindex(cell: &NcCell) -> NcPaletteIndex { /// /// *Method: NcCell.[bg_palindex()][NcCell#method.bg_palindex].* #[inline] -pub const fn cell_bg_palindex(cell: &NcCell) -> NcPaletteIndex { +pub const fn nccell_bg_palindex(cell: &NcCell) -> NcPaletteIndex { (cell.channels & 0xff) as NcPaletteIndex } @@ -213,10 +213,10 @@ pub const fn cell_bg_palindex(cell: &NcCell) -> NcPaletteIndex { // // NOTE: unlike the original C function, this one can't fail #[inline] -pub fn cell_set_fg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { +pub fn nccell_set_fg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { cell.channels |= NCCELL_FGDEFAULT_MASK; cell.channels |= NCCELL_FG_PALETTE; - cell_set_fg_alpha(cell, NCCELL_ALPHA_OPAQUE); + nccell_set_fg_alpha(cell, NCCELL_ALPHA_OPAQUE); cell.channels &= 0xff000000ffffffff as NcChannelPair; cell.channels |= (index as NcChannelPair) << 32; } @@ -230,10 +230,10 @@ pub fn cell_set_fg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { // // NOTE: unlike the original C function, this one can't fail #[inline] -pub fn cell_set_bg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { +pub fn nccell_set_bg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { cell.channels |= NCCELL_BGDEFAULT_MASK as NcChannelPair; cell.channels |= NCCELL_BG_PALETTE as NcChannelPair; - cell_set_bg_alpha(cell, NCCELL_ALPHA_OPAQUE); + nccell_set_bg_alpha(cell, NCCELL_ALPHA_OPAQUE); cell.channels &= 0xffffffffff000000; cell.channels |= index as NcChannelPair; } @@ -244,7 +244,7 @@ pub fn cell_set_bg_palindex(cell: &mut NcCell, index: NcPaletteIndex) { /// /// *Method: NcCell.[cell_styles()][NcCell#method.cell_styles].* #[inline] -pub const fn cell_styles(cell: &NcCell) -> NcStyleMask { +pub const fn nccell_styles(cell: &NcCell) -> NcStyleMask { cell.stylemask } @@ -253,7 +253,7 @@ pub const fn cell_styles(cell: &NcCell) -> NcStyleMask { /// /// *Method: NcCell.[styles_on()][NcCell#method.styles_on].* #[inline] -pub fn cell_on_styles(cell: &mut NcCell, stylebits: NcStyleMask) { +pub fn nccell_on_styles(cell: &mut NcCell, stylebits: NcStyleMask) { cell.stylemask |= stylebits & NCSTYLE_MASK as u16; } @@ -261,7 +261,7 @@ pub fn cell_on_styles(cell: &mut NcCell, stylebits: NcStyleMask) { /// /// *Method: NcCell.[styles_off()][NcCell#method.styles_off].* #[inline] -pub fn cell_off_styles(cell: &mut NcCell, stylebits: NcStyleMask) { +pub fn nccell_off_styles(cell: &mut NcCell, stylebits: NcStyleMask) { cell.stylemask &= !(stylebits & NCSTYLE_MASK as u16); } @@ -270,7 +270,7 @@ pub fn cell_off_styles(cell: &mut NcCell, stylebits: NcStyleMask) { /// /// *Method: NcCell.[styles_set()][NcCell#method.styles_set].* #[inline] -pub fn cell_set_styles(cell: &mut NcCell, stylebits: NcStyleMask) { +pub fn nccell_set_styles(cell: &mut NcCell, stylebits: NcStyleMask) { cell.stylemask = stylebits & NCSTYLE_MASK as u16; } @@ -280,7 +280,7 @@ pub fn cell_set_styles(cell: &mut NcCell, stylebits: NcStyleMask) { /// /// *Method: NcCell.[double_wide_p()][NcCell#method.double_wide_p].* #[inline] -pub const fn cell_double_wide_p(cell: &NcCell) -> bool { +pub const fn nccell_double_wide_p(cell: &NcCell) -> bool { cell.width > 0 } @@ -288,16 +288,16 @@ pub const fn cell_double_wide_p(cell: &NcCell) -> bool { /// /// *Method: NcCell.[wide_right_p()][NcCell#method.wide_right_p].* #[inline] -pub const fn cell_wide_right_p(cell: &NcCell) -> bool { - cell_double_wide_p(cell) && cell.gcluster == 0 +pub const fn nccell_wide_right_p(cell: &NcCell) -> bool { + nccell_double_wide_p(cell) && cell.gcluster == 0 } /// Is this the left half of a wide character? /// /// *Method: NcCell.[wide_left_p()][NcCell#method.wide_left_p].* #[inline] -pub const fn cell_wide_left_p(cell: &NcCell) -> bool { - cell_double_wide_p(cell) && cell.gcluster != 0 +pub const fn nccell_wide_left_p(cell: &NcCell) -> bool { + nccell_double_wide_p(cell) && cell.gcluster != 0 } // /// Loads a 7-bit [NcEgc] character into the [NcCell]. @@ -391,7 +391,7 @@ pub fn nccell_extract( // // NOTE: FIXME: it would probably be better to test whether they're Unicode-equal #[inline] -pub fn cellcmp(plane1: &NcPlane, cell1: &NcCell, plane2: &NcPlane, cell2: &NcCell) -> bool { +pub fn nccellcmp(plane1: &NcPlane, cell1: &NcCell, plane2: &NcPlane, cell2: &NcCell) -> bool { if cell1.stylemask != cell2.stylemask { return true; }