mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge pull request #725 from ebfe/versions
Switch to cargo version numbers
This commit is contained in:
commit
cda60eb3d5
70 changed files with 71 additions and 71 deletions
|
@ -32,7 +32,7 @@ enum Mode {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "base64";
|
static NAME: &'static str = "base64";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub type FileOrStdReader = BufReader<Box<Read+'static>>;
|
pub type FileOrStdReader = BufReader<Box<Read+'static>>;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::Write;
|
||||||
use std::path::{is_separator, PathBuf};
|
use std::path::{is_separator, PathBuf};
|
||||||
|
|
||||||
static NAME: &'static str = "basename";
|
static NAME: &'static str = "basename";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
//
|
//
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::intrinsics::{copy_nonoverlapping};
|
||||||
use std::io::{stdout, stdin, stderr, Write, Read, Result};
|
use std::io::{stdout, stdin, stderr, Write, Read, Result};
|
||||||
|
|
||||||
static NAME: &'static str = "cat";
|
static NAME: &'static str = "cat";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -32,7 +32,7 @@ use uucore::fs::UUPathExt;
|
||||||
use walker::Walker;
|
use walker::Walker;
|
||||||
|
|
||||||
const NAME: &'static str = "chmod";
|
const NAME: &'static str = "chmod";
|
||||||
const VERSION: &'static str = "1.0.0";
|
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -40,7 +40,7 @@ extern {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "chroot";
|
static NAME: &'static str = "chroot";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -25,7 +25,7 @@ use crc_table::CRC_TABLE;
|
||||||
mod crc_table;
|
mod crc_table;
|
||||||
|
|
||||||
static NAME: &'static str = "cksum";
|
static NAME: &'static str = "cksum";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn crc_update(crc: u32, input: u8) -> u32 {
|
fn crc_update(crc: u32, input: u8) -> u32 {
|
||||||
|
|
|
@ -18,7 +18,7 @@ use std::io::{self, BufRead, BufReader, Read, stdin, Stdin};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "comm";
|
static NAME: &'static str = "comm";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn mkdelim(col: usize, opts: &getopts::Matches) -> String {
|
fn mkdelim(col: usize, opts: &getopts::Matches) -> String {
|
||||||
let mut s = String::new();
|
let mut s = String::new();
|
||||||
|
|
|
@ -28,7 +28,7 @@ pub enum Mode {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "cp";
|
static NAME: &'static str = "cp";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -28,7 +28,7 @@ mod ranges;
|
||||||
mod searcher;
|
mod searcher;
|
||||||
|
|
||||||
static NAME: &'static str = "cut";
|
static NAME: &'static str = "cut";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
struct Options {
|
struct Options {
|
||||||
out_delim: Option<String>,
|
out_delim: Option<String>,
|
||||||
|
|
|
@ -14,7 +14,7 @@ extern crate getopts;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "dirname";
|
static NAME: &'static str = "dirname";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -28,7 +28,7 @@ use std::sync::mpsc::channel;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
static NAME: &'static str = "du";
|
static NAME: &'static str = "du";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
struct Options {
|
struct Options {
|
||||||
all: bool,
|
all: bool,
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::str::from_utf8;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
static NAME: &'static str = "echo";
|
static NAME: &'static str = "echo";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct EchoOptions {
|
struct EchoOptions {
|
||||||
|
|
2
src/env/env.rs
vendored
2
src/env/env.rs
vendored
|
@ -21,7 +21,7 @@ use std::io::Write;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
static NAME: &'static str = "env";
|
static NAME: &'static str = "env";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
struct options {
|
struct options {
|
||||||
ignore_env: bool,
|
ignore_env: bool,
|
||||||
|
|
|
@ -28,7 +28,7 @@ use rustc_unicode::str::utf8_char_width;
|
||||||
use unicode_width::UnicodeWidthChar;
|
use unicode_width::UnicodeWidthChar;
|
||||||
|
|
||||||
static NAME: &'static str = "expand";
|
static NAME: &'static str = "expand";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static DEFAULT_TABSTOP: usize = 8;
|
static DEFAULT_TABSTOP: usize = 8;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ mod syntax_tree;
|
||||||
use std::io::{Write};
|
use std::io::{Write};
|
||||||
|
|
||||||
static NAME: &'static str = "expr";
|
static NAME: &'static str = "expr";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
// For expr utility we do not want getopts.
|
// For expr utility we do not want getopts.
|
||||||
|
|
|
@ -33,7 +33,7 @@ mod numeric;
|
||||||
mod prime_table;
|
mod prime_table;
|
||||||
|
|
||||||
static NAME: &'static str = "factor";
|
static NAME: &'static str = "factor";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn rho_pollard_pseudorandom_function(x: u64, a: u64, b: u64, num: u64) -> u64 {
|
fn rho_pollard_pseudorandom_function(x: u64, a: u64, b: u64, num: u64) -> u64 {
|
||||||
if num < 1 << 63 {
|
if num < 1 << 63 {
|
||||||
|
|
|
@ -38,7 +38,7 @@ mod parasplit;
|
||||||
|
|
||||||
// program's NAME and VERSION are used for -V and -h
|
// program's NAME and VERSION are used for -V and -h
|
||||||
static NAME: &'static str = "fmt";
|
static NAME: &'static str = "fmt";
|
||||||
static VERSION: &'static str = "0.0.3";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub type FileOrStdReader = BufReader<Box<Read+'static>>;
|
pub type FileOrStdReader = BufReader<Box<Read+'static>>;
|
||||||
pub struct FmtOptions {
|
pub struct FmtOptions {
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::{BufRead, BufReader, Read, stdin, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "fold";
|
static NAME: &'static str = "fold";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let (args, obs_width) = handle_obsolete(&args[..]);
|
let (args, obs_width) = handle_obsolete(&args[..]);
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::io::Write;
|
||||||
use uucore::c_types::{get_pw_from_args, group};
|
use uucore::c_types::{get_pw_from_args, group};
|
||||||
|
|
||||||
static NAME: &'static str = "groups";
|
static NAME: &'static str = "groups";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -30,7 +30,7 @@ use std::io::{self, BufRead, BufReader, Read, stdin, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "hashsum";
|
static NAME: &'static str = "hashsum";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn is_custom_binary(program: &str) -> bool {
|
fn is_custom_binary(program: &str) -> bool {
|
||||||
match program {
|
match program {
|
||||||
|
|
|
@ -22,7 +22,7 @@ use std::path::Path;
|
||||||
use std::str::from_utf8;
|
use std::str::from_utf8;
|
||||||
|
|
||||||
static NAME: &'static str = "head";
|
static NAME: &'static str = "head";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
enum FilterMode {
|
enum FilterMode {
|
||||||
Bytes(usize),
|
Bytes(usize),
|
||||||
|
|
|
@ -18,7 +18,7 @@ extern crate uucore;
|
||||||
use libc::c_long;
|
use libc::c_long;
|
||||||
|
|
||||||
static NAME: &'static str = "hostid";
|
static NAME: &'static str = "hostid";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static EXIT_ERR: i32 = 1;
|
static EXIT_ERR: i32 = 1;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ use std::io::Write;
|
||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
|
|
||||||
static NAME: &'static str = "hostname";
|
static NAME: &'static str = "hostname";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
extern {
|
extern {
|
||||||
fn gethostname(name: *mut libc::c_char, namelen: libc::size_t) -> libc::c_int;
|
fn gethostname(name: *mut libc::c_char, namelen: libc::size_t) -> libc::c_int;
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::{Error, Write};
|
||||||
use uucore::signals::ALL_SIGNALS;
|
use uucore::signals::ALL_SIGNALS;
|
||||||
|
|
||||||
static NAME: &'static str = "kill";
|
static NAME: &'static str = "kill";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static EXIT_OK: i32 = 0;
|
static EXIT_OK: i32 = 0;
|
||||||
static EXIT_ERR: i32 = 1;
|
static EXIT_ERR: i32 = 1;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::io::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "link";
|
static NAME: &'static str = "link";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -22,7 +22,7 @@ use std::path::{Path, PathBuf};
|
||||||
use uucore::fs::UUPathExt;
|
use uucore::fs::UUPathExt;
|
||||||
|
|
||||||
static NAME: &'static str = "ln";
|
static NAME: &'static str = "ln";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub struct Settings {
|
pub struct Settings {
|
||||||
overwrite: OverwriteMode,
|
overwrite: OverwriteMode,
|
||||||
|
|
|
@ -37,7 +37,7 @@ fn get_userlogin() -> Option<String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "logname";
|
static NAME: &'static str = "logname";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
//
|
//
|
||||||
|
|
|
@ -22,7 +22,7 @@ use std::path::{Path, PathBuf};
|
||||||
use uucore::fs::UUPathExt;
|
use uucore::fs::UUPathExt;
|
||||||
|
|
||||||
static NAME: &'static str = "mkdir";
|
static NAME: &'static str = "mkdir";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles option parsing
|
* Handles option parsing
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::ffi::CString;
|
||||||
use std::io::{Error, Write};
|
use std::io::{Error, Write};
|
||||||
|
|
||||||
static NAME: &'static str = "mkfifo";
|
static NAME: &'static str = "mkfifo";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -23,7 +23,7 @@ use std::path::{Path, PathBuf};
|
||||||
use uucore::fs::UUPathExt;
|
use uucore::fs::UUPathExt;
|
||||||
|
|
||||||
static NAME: &'static str = "mv";
|
static NAME: &'static str = "mv";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub struct Behaviour {
|
pub struct Behaviour {
|
||||||
overwrite: OverwriteMode,
|
overwrite: OverwriteMode,
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::ffi::CString;
|
||||||
use std::io::{Error, Write};
|
use std::io::{Error, Write};
|
||||||
|
|
||||||
const NAME: &'static str = "nice";
|
const NAME: &'static str = "nice";
|
||||||
const VERSION: &'static str = "1.0.0";
|
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
// XXX: PRIO_PROCESS is 0 on at least FreeBSD and Linux. Don't know about Mac OS X.
|
// XXX: PRIO_PROCESS is 0 on at least FreeBSD and Linux. Don't know about Mac OS X.
|
||||||
const PRIO_PROCESS: c_int = 0;
|
const PRIO_PROCESS: c_int = 0;
|
||||||
|
|
|
@ -27,7 +27,7 @@ use std::path::Path;
|
||||||
mod helper;
|
mod helper;
|
||||||
|
|
||||||
static NAME: &'static str = "nl";
|
static NAME: &'static str = "nl";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
static USAGE: &'static str = "nl [OPTION]... [FILE]...";
|
static USAGE: &'static str = "nl [OPTION]... [FILE]...";
|
||||||
// A regular expression matching everything.
|
// A regular expression matching everything.
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::path::{Path, PathBuf};
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
static NAME: &'static str = "nohup";
|
static NAME: &'static str = "nohup";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
extern {
|
extern {
|
||||||
|
|
|
@ -18,8 +18,8 @@ extern crate uucore;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
static NAME : &'static str = "nproc";
|
static NAME: &'static str = "nproc";
|
||||||
static VERSION : &'static str = "0.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::fs::File;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "paste";
|
static NAME: &'static str = "paste";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::io::Write;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
static NAME: &'static str = "printenv";
|
static NAME: &'static str = "printenv";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -27,7 +27,7 @@ use std::fs::File;
|
||||||
use std::io::{stdin, stdout, BufReader, BufWriter, BufRead, Read, Write};
|
use std::io::{stdin, stdout, BufReader, BufWriter, BufRead, Read, Write};
|
||||||
|
|
||||||
static NAME: &'static str = "ptx";
|
static NAME: &'static str = "ptx";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum OutFormat {
|
enum OutFormat {
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::io::Write;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
static NAME: &'static str = "pwd";
|
static NAME: &'static str = "pwd";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::path::PathBuf;
|
||||||
use uucore::fs::{canonicalize, CanonicalizeMode};
|
use uucore::fs::{canonicalize, CanonicalizeMode};
|
||||||
|
|
||||||
const NAME: &'static str = "readlink";
|
const NAME: &'static str = "readlink";
|
||||||
const VERSION: &'static str = "0.0.1";
|
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::path::{Path, PathBuf};
|
||||||
use uucore::fs::{canonicalize, CanonicalizeMode};
|
use uucore::fs::{canonicalize, CanonicalizeMode};
|
||||||
|
|
||||||
static NAME: &'static str = "realpath";
|
static NAME: &'static str = "realpath";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::path::{Path, PathBuf};
|
||||||
use uucore::fs::{canonicalize, CanonicalizeMode};
|
use uucore::fs::{canonicalize, CanonicalizeMode};
|
||||||
|
|
||||||
static NAME: &'static str = "relpath";
|
static NAME: &'static str = "relpath";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -30,7 +30,7 @@ enum InteractiveMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "rm";
|
static NAME: &'static str = "rm";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
// TODO: make getopts support -R in addition to -r
|
// TODO: make getopts support -R in addition to -r
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::Write;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "rmdir";
|
static NAME: &'static str = "rmdir";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -13,7 +13,7 @@ use std::cmp;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
static NAME: &'static str = "seq";
|
static NAME: &'static str = "seq";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct SeqOptions {
|
struct SeqOptions {
|
||||||
|
|
|
@ -29,7 +29,7 @@ enum Mode {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "shuf";
|
static NAME: &'static str = "shuf";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::time::Duration;
|
||||||
use std::u32::MAX as U32_MAX;
|
use std::u32::MAX as U32_MAX;
|
||||||
|
|
||||||
static NAME: &'static str = "sleep";
|
static NAME: &'static str = "sleep";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -25,7 +25,7 @@ use std::io::{BufRead, BufReader, Read, stdin, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "sort";
|
static NAME: &'static str = "sort";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static DECIMAL_PT: char = '.';
|
static DECIMAL_PT: char = '.';
|
||||||
static THOUSANDS_SEP: char = ',';
|
static THOUSANDS_SEP: char = ',';
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::io::{BufRead, BufReader, BufWriter, Read, stdin, stdout, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "split";
|
static NAME: &'static str = "split";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -23,7 +23,7 @@ use std::process::Command;
|
||||||
use uucore::fs::{canonicalize, CanonicalizeMode, UUPathExt};
|
use uucore::fs::{canonicalize, CanonicalizeMode, UUPathExt};
|
||||||
|
|
||||||
static NAME: &'static str = "stdbuf";
|
static NAME: &'static str = "stdbuf";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
static LIBSTDBUF: &'static str = "libstdbuf";
|
static LIBSTDBUF: &'static str = "libstdbuf";
|
||||||
|
|
||||||
enum BufferType {
|
enum BufferType {
|
||||||
|
|
|
@ -20,7 +20,7 @@ use std::io::{Read, Result, stdin, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "sum";
|
static NAME: &'static str = "sum";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
fn bsd_sum(mut reader: Box<Read>) -> (usize, u16) {
|
fn bsd_sum(mut reader: Box<Read>) -> (usize, u16) {
|
||||||
let mut buf = [0; 1024];
|
let mut buf = [0; 1024];
|
||||||
|
|
|
@ -18,7 +18,7 @@ extern crate libc;
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
|
|
||||||
static NAME: &'static str = "sync";
|
static NAME: &'static str = "sync";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
mod platform {
|
mod platform {
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::fs::File;
|
||||||
use std::io::{BufReader, Read, stdin, stdout, Stdout, Write};
|
use std::io::{BufReader, Read, stdin, stdout, Stdout, Write};
|
||||||
|
|
||||||
static NAME: &'static str = "tac";
|
static NAME: &'static str = "tac";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -24,7 +24,7 @@ use std::thread::sleep;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
static NAME: &'static str = "tail";
|
static NAME: &'static str = "tail";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut beginning = false;
|
let mut beginning = false;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::io::{copy, Error, ErrorKind, Read, Result, sink, stdin, stdout, Write};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
static NAME: &'static str = "tee";
|
static NAME: &'static str = "tee";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
match options(&args).and_then(exec) {
|
match options(&args).and_then(exec) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "timeout";
|
static NAME: &'static str = "timeout";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static ERR_EXIT_STATUS: i32 = 125;
|
static ERR_EXIT_STATUS: i32 = 125;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ use std::path::Path;
|
||||||
use uucore::fs::UUPathExt;
|
use uucore::fs::UUPathExt;
|
||||||
|
|
||||||
static NAME: &'static str = "touch";
|
static NAME: &'static str = "touch";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
// Since touch's date/timestamp parsing doesn't account for timezone, the
|
// Since touch's date/timestamp parsing doesn't account for timezone, the
|
||||||
// returned value from time::strptime() is UTC. We get system's timezone to
|
// returned value from time::strptime() is UTC. We get system's timezone to
|
||||||
|
|
|
@ -29,7 +29,7 @@ use expand::ExpandSet;
|
||||||
mod expand;
|
mod expand;
|
||||||
|
|
||||||
static NAME: &'static str = "tr";
|
static NAME: &'static str = "tr";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
const BUFFER_LEN: usize = 1024;
|
const BUFFER_LEN: usize = 1024;
|
||||||
|
|
||||||
fn delete<'a>(set: ExpandSet<'a>, complement: bool) {
|
fn delete<'a>(set: ExpandSet<'a>, complement: bool) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ enum TruncateMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "truncate";
|
static NAME: &'static str = "truncate";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -22,7 +22,7 @@ use std::io::{BufRead, BufReader, Read, stdin, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
static NAME: &'static str = "tsort";
|
static NAME: &'static str = "tsort";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -26,7 +26,7 @@ extern {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "tty";
|
static NAME: &'static str = "tty";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -51,7 +51,7 @@ unsafe fn getuname() -> Uts {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "uname";
|
static NAME: &'static str = "uname";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = getopts::Options::new();
|
let mut opts = getopts::Options::new();
|
||||||
|
|
|
@ -27,7 +27,7 @@ use rustc_unicode::str::utf8_char_width;
|
||||||
use unicode_width::UnicodeWidthChar;
|
use unicode_width::UnicodeWidthChar;
|
||||||
|
|
||||||
static NAME: &'static str = "unexpand";
|
static NAME: &'static str = "unexpand";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
static DEFAULT_TABSTOP: usize = 8;
|
static DEFAULT_TABSTOP: usize = 8;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ use std::path::Path;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
static NAME: &'static str = "uniq";
|
static NAME: &'static str = "uniq";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
struct Uniq {
|
struct Uniq {
|
||||||
repeats_only: bool,
|
repeats_only: bool,
|
||||||
|
|
|
@ -24,7 +24,7 @@ use std::io::{Error, ErrorKind, Write};
|
||||||
use std::mem::uninitialized;
|
use std::mem::uninitialized;
|
||||||
|
|
||||||
static NAME: &'static str = "unlink";
|
static NAME: &'static str = "unlink";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -28,7 +28,7 @@ use std::ptr::null;
|
||||||
use uucore::utmpx::*;
|
use uucore::utmpx::*;
|
||||||
|
|
||||||
static NAME: &'static str = "uptime";
|
static NAME: &'static str = "uptime";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
extern {
|
extern {
|
||||||
|
|
|
@ -46,7 +46,7 @@ unsafe extern fn utmpxname(_file: *const libc::c_char) -> libc::c_int {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "users";
|
static NAME: &'static str = "users";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -16,7 +16,7 @@ use std::path::Path;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
static NAME: &'static str = "uutils";
|
static NAME: &'static str = "uutils";
|
||||||
static VERSION: &'static str = "0.0.1";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
include!(concat!(env!("OUT_DIR"), "/uutils_map.rs"));
|
include!(concat!(env!("OUT_DIR"), "/uutils_map.rs"));
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ struct Result {
|
||||||
}
|
}
|
||||||
|
|
||||||
static NAME: &'static str = "wc";
|
static NAME: &'static str = "wc";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -23,7 +23,7 @@ use std::io::Write;
|
||||||
mod platform;
|
mod platform;
|
||||||
|
|
||||||
static NAME: &'static str = "whoami";
|
static NAME: &'static str = "whoami";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
|
@ -21,7 +21,7 @@ use getopts::Options;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
static NAME: &'static str = "yes";
|
static NAME: &'static str = "yes";
|
||||||
static VERSION: &'static str = "1.0.0";
|
static VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue