mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 14:07:46 +00:00
reposition functions
This commit is contained in:
parent
d8226bf658
commit
b723be4fe2
1 changed files with 21 additions and 22 deletions
|
@ -26,6 +26,27 @@ use std::os::unix::prelude::OsStrExt;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::{cmp, fs, iter};
|
use std::{cmp, fs, iter};
|
||||||
|
|
||||||
|
static ABOUT: &str = "Display file or file system status.";
|
||||||
|
const USAGE: &str = "{} [OPTION]... FILE...";
|
||||||
|
|
||||||
|
pub mod options {
|
||||||
|
pub static DEREFERENCE: &str = "dereference";
|
||||||
|
pub static FILE_SYSTEM: &str = "file-system";
|
||||||
|
pub static FORMAT: &str = "format";
|
||||||
|
pub static PRINTF: &str = "printf";
|
||||||
|
pub static TERSE: &str = "terse";
|
||||||
|
}
|
||||||
|
|
||||||
|
static ARG_FILES: &str = "files";
|
||||||
|
|
||||||
|
pub const F_ALTER: u8 = 1;
|
||||||
|
pub const F_ZERO: u8 = 1 << 1;
|
||||||
|
pub const F_LEFT: u8 = 1 << 2;
|
||||||
|
pub const F_SPACE: u8 = 1 << 3;
|
||||||
|
pub const F_SIGN: u8 = 1 << 4;
|
||||||
|
// unused at present
|
||||||
|
pub const F_GROUP: u8 = 1 << 5;
|
||||||
|
|
||||||
/// checks if the string is within the specified bound
|
/// checks if the string is within the specified bound
|
||||||
///
|
///
|
||||||
fn check_bound(slice: &str, bound: usize, beg: usize, end: usize) -> UResult<()> {
|
fn check_bound(slice: &str, bound: usize, beg: usize, end: usize) -> UResult<()> {
|
||||||
|
@ -101,28 +122,6 @@ fn print_adjusted(
|
||||||
pad_and_print(s, left, field_width, padding);
|
pad_and_print(s, left, field_width, padding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ABOUT: &str = "Display file or file system status.";
|
|
||||||
const USAGE: &str = "{} [OPTION]... FILE...";
|
|
||||||
|
|
||||||
pub mod options {
|
|
||||||
pub static DEREFERENCE: &str = "dereference";
|
|
||||||
pub static FILE_SYSTEM: &str = "file-system";
|
|
||||||
pub static FORMAT: &str = "format";
|
|
||||||
pub static PRINTF: &str = "printf";
|
|
||||||
pub static TERSE: &str = "terse";
|
|
||||||
}
|
|
||||||
|
|
||||||
static ARG_FILES: &str = "files";
|
|
||||||
|
|
||||||
pub const F_ALTER: u8 = 1;
|
|
||||||
pub const F_ZERO: u8 = 1 << 1;
|
|
||||||
pub const F_LEFT: u8 = 1 << 2;
|
|
||||||
pub const F_SPACE: u8 = 1 << 3;
|
|
||||||
pub const F_SIGN: u8 = 1 << 4;
|
|
||||||
// unused at present
|
|
||||||
pub const F_GROUP: u8 = 1 << 5;
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub enum OutputType {
|
pub enum OutputType {
|
||||||
Str,
|
Str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue