From a7a0d88f9fd0e1576dd27a1887a8f9a660001598 Mon Sep 17 00:00:00 2001 From: sylvestre Date: Sun, 20 Aug 2023 02:20:37 +0000 Subject: [PATCH] deploy: f0e8d44e6e64ee3354f95864c0a25b74cf1c1151 --- dev/implementors/core/clone/trait.Clone.js | 2 +- dev/implementors/core/fmt/trait.Debug.js | 2 +- dev/src/uu_nl/nl.rs.html | 8 +- dev/src/uudoc/uudoc.rs.html | 86 +++++++++++++++++++++- dev/uu_nl/index.html | 2 +- dev/uudoc/fn.get_zip_content.html | 2 +- dev/uudoc/fn.main.html | 2 +- dev/uudoc/index.html | 2 +- dev/uudoc/struct.MDWriter.html | 4 +- 9 files changed, 99 insertions(+), 11 deletions(-) diff --git a/dev/implementors/core/clone/trait.Clone.js b/dev/implementors/core/clone/trait.Clone.js index d514aa1e9..b23be4445 100644 --- a/dev/implementors/core/clone/trait.Clone.js +++ b/dev/implementors/core/clone/trait.Clone.js @@ -7,7 +7,7 @@ "uu_ln":[["impl Clone for OverwriteMode"]], "uu_mv":[["impl Clone for OverwriteMode"]], "uu_numfmt":[["impl Clone for RoundMethod"]], -"uu_sort":[["impl<'a> Clone for Line<'a>"],["impl Clone for GlobalSettings"],["impl Clone for GeneralF64ParseResult"]], +"uu_sort":[["impl<'a> Clone for Line<'a>"],["impl Clone for GeneralF64ParseResult"],["impl Clone for GlobalSettings"]], "uu_stty":[["impl<T: Clone> Clone for Flag<T>"]], "uu_tail":[["impl Clone for BytesChunk"],["impl Clone for FollowMode"],["impl Clone for Signum"]], "uucore":[["impl Clone for BackupMode"],["impl Clone for Passwd"],["impl Clone for UpdateMode"],["impl Clone for Verbosity"],["impl Clone for MissingHandling"],["impl Clone for FsUsage"],["impl Clone for MountInfo"],["impl Clone for ResolveMode"],["impl Clone for Quotes"],["impl Clone for ShortcutValueParser"],["impl Clone for Group"],["impl Clone for VerbosityLevel"],["impl Clone for Format"]] diff --git a/dev/implementors/core/fmt/trait.Debug.js b/dev/implementors/core/fmt/trait.Debug.js index 730ccea0d..de26b6f19 100644 --- a/dev/implementors/core/fmt/trait.Debug.js +++ b/dev/implementors/core/fmt/trait.Debug.js @@ -6,7 +6,7 @@ "uu_ln":[["impl Debug for OverwriteMode"]], "uu_ls":[["impl Debug for Format"]], "uu_numfmt":[["impl Debug for FormatOptions"],["impl Debug for InvalidModes"],["impl Debug for NumfmtError"]], -"uu_sort":[["impl Debug for GeneralF64ParseResult"],["impl<'a> Debug for Line<'a>"]], +"uu_sort":[["impl<'a> Debug for Line<'a>"],["impl Debug for GeneralF64ParseResult"]], "uu_stat":[["impl Debug for OutputType"]], "uu_stty":[["impl<T: Debug> Debug for Flag<T>"],["impl Debug for TermSize"]], "uu_tail":[["impl Debug for VerificationResult"],["impl Debug for FollowMode"],["impl Debug for LinesChunk"],["impl Debug for Settings"],["impl Debug for FilterMode"],["impl Debug for BytesChunk"],["impl Debug for Signum"]], diff --git a/dev/src/uu_nl/nl.rs.html b/dev/src/uu_nl/nl.rs.html index 1aa94b309..ef57803e1 100644 --- a/dev/src/uu_nl/nl.rs.html +++ b/dev/src/uu_nl/nl.rs.html @@ -376,6 +376,9 @@ 376 377 378 +379 +380 +381
//  * This file is part of the uutils coreutils package.
 //  *
 //  * (c) Tobias Bohumir Schottdorf <tobias.schottdorf@gmail.com>
@@ -722,7 +725,10 @@
                     line
                 );
                 // update line number for the potential next line
-                line_no += settings.line_increment;
+                match line_no.checked_add(settings.line_increment) {
+                    Some(new_line_no) => line_no = new_line_no,
+                    None => return Err(USimpleError::new(1, "line number overflow")),
+                }
             } else {
                 let spaces = " ".repeat(settings.number_width + 1);
                 println!("{spaces}{line}");
diff --git a/dev/src/uudoc/uudoc.rs.html b/dev/src/uudoc/uudoc.rs.html
index 4ba3a7ab1..55ebb6d08 100644
--- a/dev/src/uudoc/uudoc.rs.html
+++ b/dev/src/uudoc/uudoc.rs.html
@@ -318,6 +318,47 @@
 318
 319
 320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
 
// This file is part of the uutils coreutils package.
 //
 // For the full copyright and license information, please view the LICENSE
@@ -362,6 +403,7 @@
         [Introduction](index.md)\n\
         * [Installation](installation.md)\n\
         * [Build from source](build.md)\n\
+        * [Platform support](platforms.md)\n\
         * [Contributing](contributing.md)\n\
         * [GNU test coverage](test_coverage.md)\n\
         * [Extensions](extensions.md)\n\
@@ -373,7 +415,7 @@
     println!("Gathering utils per platform");
     let utils_per_platform = {
         let mut map = HashMap::new();
-        for platform in ["unix", "macos", "windows"] {
+        for platform in ["unix", "macos", "windows", "unix_android"] {
             let platform_utils: Vec<String> = String::from_utf8(
                 std::process::Command::new("./util/show-utils.sh")
                     .arg(format!("--features=feat_os_{}", platform))
@@ -381,6 +423,7 @@
                     .stdout,
             )
             .unwrap()
+            .trim()
             .split(' ')
             .map(ToString::to_string)
             .collect();
@@ -395,6 +438,7 @@
                 .stdout,
         )
         .unwrap()
+        .trim()
         .split(' ')
         .map(ToString::to_string)
         .collect();
@@ -403,9 +447,47 @@
         map
     };
 
-    println!("Writing to utils");
     let mut utils = utils.entries().collect::<Vec<_>>();
     utils.sort();
+
+    println!("Writing util per platform table");
+    {
+        let mut platform_table_file = File::create("docs/src/platform_table.md").unwrap();
+
+        // sum, cksum, b2sum, etc. are all available on all platforms, but not in the data structure
+        // otherwise, we check the map for the util name.
+        let check_supported = |name: &str, platform: &str| {
+            if name.ends_with("sum") || utils_per_platform[platform].iter().any(|u| u == name) {
+                "✓"
+            } else {
+                " "
+            }
+        };
+        writeln!(
+            platform_table_file,
+            "| util             | Linux | macOS | Windows | FreeBSD | Android |\n\
+             | ---------------- | ----- | ----- | ------- | ------- | ------- |"
+        )?;
+        for (&name, _) in &utils {
+            if name == "[" {
+                continue;
+            }
+            // The alignment is not necessary, but makes the output a bit more
+            // pretty when viewed as plain markdown.
+            writeln!(
+                platform_table_file,
+                "| {:<16} | {:<5} | {:<5} | {:<7} | {:<7} | {:<7} |",
+                format!("**{name}**"),
+                check_supported(name, "linux"),
+                check_supported(name, "macos"),
+                check_supported(name, "windows"),
+                check_supported(name, "unix"),
+                check_supported(name, "unix_android"),
+            )?;
+        }
+    }
+
+    println!("Writing to utils");
     for (&name, (_, command)) in utils {
         if name == "[" {
             continue;
diff --git a/dev/uu_nl/index.html b/dev/uu_nl/index.html
index d7cbf8c00..95864f3bb 100644
--- a/dev/uu_nl/index.html
+++ b/dev/uu_nl/index.html
@@ -1 +1 @@
-uu_nl - Rust
\ No newline at end of file +uu_nl - Rust
\ No newline at end of file diff --git a/dev/uudoc/fn.get_zip_content.html b/dev/uudoc/fn.get_zip_content.html index f87d42dce..3c461ba67 100644 --- a/dev/uudoc/fn.get_zip_content.html +++ b/dev/uudoc/fn.get_zip_content.html @@ -1,4 +1,4 @@ -get_zip_content in uudoc - Rust

Function uudoc::get_zip_content

source ·
pub(crate) fn get_zip_content(
+get_zip_content in uudoc - Rust

Function uudoc::get_zip_content

source ·
pub(crate) fn get_zip_content(
     archive: &mut ZipArchive<impl Read + Seek>,
     name: &str
 ) -> Option<String>
\ No newline at end of file diff --git a/dev/uudoc/fn.main.html b/dev/uudoc/fn.main.html index 9c1ac6708..b9b05b91f 100644 --- a/dev/uudoc/fn.main.html +++ b/dev/uudoc/fn.main.html @@ -1 +1 @@ -main in uudoc - Rust

Function uudoc::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file +main in uudoc - Rust

Function uudoc::main

source ·
pub(crate) fn main() -> Result<()>
\ No newline at end of file diff --git a/dev/uudoc/index.html b/dev/uudoc/index.html index 01d3958b3..b6d21c12a 100644 --- a/dev/uudoc/index.html +++ b/dev/uudoc/index.html @@ -1 +1 @@ -uudoc - Rust
\ No newline at end of file +uudoc - Rust
\ No newline at end of file diff --git a/dev/uudoc/struct.MDWriter.html b/dev/uudoc/struct.MDWriter.html index 9b82f2615..c29b8389a 100644 --- a/dev/uudoc/struct.MDWriter.html +++ b/dev/uudoc/struct.MDWriter.html @@ -1,11 +1,11 @@ -MDWriter in uudoc - Rust

Struct uudoc::MDWriter

source ·
pub(crate) struct MDWriter<'a, 'b> {
+MDWriter in uudoc - Rust

Struct uudoc::MDWriter

source ·
pub(crate) struct MDWriter<'a, 'b> {
     pub(crate) w: Box<dyn Write>,
     pub(crate) command: Command,
     pub(crate) name: &'a str,
     pub(crate) tldr_zip: &'b mut Option<ZipArchive<File>>,
     pub(crate) utils_per_platform: &'b HashMap<&'b str, Vec<String>>,
     pub(crate) markdown: Option<String>,
-}

Fields§

§w: Box<dyn Write>§command: Command§name: &'a str§tldr_zip: &'b mut Option<ZipArchive<File>>§utils_per_platform: &'b HashMap<&'b str, Vec<String>>§markdown: Option<String>

Implementations§

source§

impl<'a, 'b> MDWriter<'a, 'b>

source

pub(crate) fn markdown(&mut self) -> Result<()>

source

pub(crate) fn additional(&mut self) -> Result<()>

source

pub(crate) fn platforms(&mut self) -> Result<()>

source

pub(crate) fn version(&mut self) -> Result<()>

source

pub(crate) fn usage(&mut self) -> Result<()>

source

pub(crate) fn about(&mut self) -> Result<()>

source

pub(crate) fn after_help(&mut self) -> Result<()>

source

pub(crate) fn examples(&mut self) -> Result<()>

source

pub(crate) fn options(&mut self) -> Result<()>

Auto Trait Implementations§

§

impl<'a, 'b> !RefUnwindSafe for MDWriter<'a, 'b>

§

impl<'a, 'b> !Send for MDWriter<'a, 'b>

§

impl<'a, 'b> !Sync for MDWriter<'a, 'b>

§

impl<'a, 'b> Unpin for MDWriter<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for MDWriter<'a, 'b>

Blanket Implementations§

source§

impl<T> Any for Twhere +}

Fields§

§w: Box<dyn Write>§command: Command§name: &'a str§tldr_zip: &'b mut Option<ZipArchive<File>>§utils_per_platform: &'b HashMap<&'b str, Vec<String>>§markdown: Option<String>

Implementations§

source§

impl<'a, 'b> MDWriter<'a, 'b>

source

pub(crate) fn markdown(&mut self) -> Result<()>

source

pub(crate) fn additional(&mut self) -> Result<()>

source

pub(crate) fn platforms(&mut self) -> Result<()>

source

pub(crate) fn version(&mut self) -> Result<()>

source

pub(crate) fn usage(&mut self) -> Result<()>

source

pub(crate) fn about(&mut self) -> Result<()>

source

pub(crate) fn after_help(&mut self) -> Result<()>

source

pub(crate) fn examples(&mut self) -> Result<()>

source

pub(crate) fn options(&mut self) -> Result<()>

Auto Trait Implementations§

§

impl<'a, 'b> !RefUnwindSafe for MDWriter<'a, 'b>

§

impl<'a, 'b> !Send for MDWriter<'a, 'b>

§

impl<'a, 'b> !Sync for MDWriter<'a, 'b>

§

impl<'a, 'b> Unpin for MDWriter<'a, 'b>

§

impl<'a, 'b> !UnwindSafe for MDWriter<'a, 'b>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.