mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 21:47:46 +00:00
Make uumain return isize everywhere
This commit is contained in:
parent
c223e28fac
commit
f2d49f4bb6
57 changed files with 57 additions and 57 deletions
|
@ -40,7 +40,7 @@ fn main() {
|
|||
}
|
||||
_ => {
|
||||
crates.push_str(format!("extern crate {};\n", prog).as_slice());
|
||||
util_map.push_str(format!("map.insert(\"{prog}\", {prog}::uumain as fn(Vec<String>) -> int);\n", prog = prog).as_slice());
|
||||
util_map.push_str(format!("map.insert(\"{prog}\", {prog}::uumain as fn(Vec<String>) -> isize);\n", prog = prog).as_slice());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ mod util;
|
|||
static NAME: &'static str = "basename";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = strip_dir(args[0].as_slice());
|
||||
|
||||
//
|
||||
|
|
|
@ -19,7 +19,7 @@ use std::io::stdio::{stdout_raw, stdin_raw, stderr};
|
|||
use std::io::{IoResult};
|
||||
use std::ptr::{copy_nonoverlapping_memory};
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
getopts::optflag("A", "show-all", "equivalent to -vET"),
|
||||
|
|
|
@ -31,7 +31,7 @@ pub enum Mode {
|
|||
|
||||
impl Copy for Mode {}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
optflag("h", "help", "display this help and exit"),
|
||||
optflag("", "version", "output version information and exit"),
|
||||
|
|
|
@ -447,7 +447,7 @@ fn cut_files(mut filenames: Vec<String>, mode: Mode) -> int {
|
|||
exit_code
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
optopt("b", "bytes", "select only these bytes", "LIST"),
|
||||
optopt("c", "characters", "select only these characters", "LIST"),
|
||||
|
|
|
@ -15,7 +15,7 @@ use std::io::print;
|
|||
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("z", "zero", "separate output with NUL rather than newline"),
|
||||
|
|
|
@ -89,7 +89,7 @@ fn du(path: &Path, mut my_stat: Stat,
|
|||
stats
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
// In task
|
||||
|
|
|
@ -162,7 +162,7 @@ fn print_version() {
|
|||
println!("echo version: {}", VERSION);
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let mut options = EchoOptions {
|
||||
newline: false,
|
||||
escape: false
|
||||
|
|
2
src/env/env.rs
vendored
2
src/env/env.rs
vendored
|
@ -51,7 +51,7 @@ fn print_env(null: bool) {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let prog = args[0].as_slice();
|
||||
|
||||
// to handle arguments the same way than GNU env, we can't use getopts
|
||||
|
|
|
@ -72,7 +72,7 @@ impl Options {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("i", "initial", "do not convert tabs after non blanks"),
|
||||
getopts::optopt("t", "tabs", "have tabs NUMBER characters apart, not 8", "NUMBER"),
|
||||
|
|
|
@ -63,7 +63,7 @@ fn print_factors_str(num_str: &str) {
|
|||
print_factors(num);
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "show this help message"),
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
pub fn uumain(_: Vec<String>) -> int {
|
||||
pub fn uumain(_: Vec<String>) -> isize {
|
||||
1
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ struct FmtOptions {
|
|||
tabwidth : uint,
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
|
||||
let opts = [
|
||||
getopts::optflag("c", "crown-margin", "First and second line of paragraph may have different indentations, in which case the first line's indentation is preserved, and each subsequent line's indentation matches the second line."),
|
||||
|
|
|
@ -23,7 +23,7 @@ mod util;
|
|||
static NAME: &'static str = "fold";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let (args, obs_width) = handle_obsolete(args.as_slice());
|
||||
let program = args[0].clone();
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ use c_types::{get_pw_from_args, group};
|
|||
static NAME: &'static str = "groups";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
let options = [
|
||||
|
|
|
@ -26,7 +26,7 @@ mod util;
|
|||
|
||||
static NAME: &'static str = "head";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let mut line_count = 10u;
|
||||
let mut byte_count = 0u;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ extern {
|
|||
pub fn gethostid() -> c_long;
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
|
||||
let opts = [
|
||||
optflag("", "help", "display this help and exit"),
|
||||
|
|
|
@ -41,7 +41,7 @@ extern {
|
|||
fn sethostname(name: *const libc::c_char, namelen: libc::size_t) -> libc::c_int;
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = &args[0];
|
||||
|
||||
let options = [
|
||||
|
|
|
@ -83,7 +83,7 @@ extern {
|
|||
|
||||
static NAME: &'static str = "id";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let args_t = args.tail();
|
||||
|
||||
let options = [
|
||||
|
|
|
@ -52,7 +52,7 @@ pub enum Mode {
|
|||
|
||||
impl Copy for Mode {}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
optflag("h", "help", "display this help and exit"),
|
||||
optflag("V", "version", "output version information and exit"),
|
||||
|
|
|
@ -21,7 +21,7 @@ mod util;
|
|||
static NAME : &'static str = "link";
|
||||
static VERSION : &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
getopts::optflag("V", "version", "output version information and exit"),
|
||||
|
|
|
@ -45,7 +45,7 @@ fn version() {
|
|||
println!("{} {}", NAME, VERSION);
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
//
|
||||
|
|
|
@ -26,7 +26,7 @@ static VERSION: &'static str = "1.0.0";
|
|||
/**
|
||||
* Handles option parsing
|
||||
*/
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
|
||||
let opts = [
|
||||
// Linux-specific options, not implemented
|
||||
|
|
|
@ -61,7 +61,7 @@ pub enum BackupMode {
|
|||
|
||||
impl Copy for BackupMode {}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
optflagopt("", "backup", "make a backup of each existing destination file", "CONTROL"),
|
||||
|
|
|
@ -32,7 +32,7 @@ extern {
|
|||
fn setpriority(which: c_int, who: c_int, prio: c_int) -> c_int;
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optopt("n", "adjustment", "add N to the niceness (default is 10)", "N"),
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
|
@ -73,7 +73,7 @@ enum NumberFormat {
|
|||
RightZero,
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let possible_options = [
|
||||
optopt("b", "body-numbering", "use STYLE for numbering body lines", "STYLE"),
|
||||
optopt("d", "section-delimiter", "use CC for separating logical pages", "CC"),
|
||||
|
|
|
@ -35,7 +35,7 @@ extern {
|
|||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||
unsafe fn _vprocmgr_detach_from_console(_: u32) -> *const libc::c_int { std::ptr::null() }
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = &args[0];
|
||||
|
||||
let options = [
|
||||
|
|
|
@ -20,7 +20,7 @@ static VERSION : &'static str = "0.0.0";
|
|||
#[macro_use]
|
||||
mod util;
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("", "all", "print the number of cores available to the system"),
|
||||
getopts::optopt("", "ignore", "ignore up to N cores", "N"),
|
||||
|
|
|
@ -23,7 +23,7 @@ mod util;
|
|||
|
||||
static NAME: &'static str = "printenv";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("0", "null", "end each output line with 0 byte rather than newline"),
|
||||
|
|
|
@ -21,7 +21,7 @@ mod util;
|
|||
static NAME: &'static str = "pwd";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("", "help", "display this help and exit"),
|
||||
|
|
|
@ -19,7 +19,7 @@ use getopts::{optflag, getopts, usage};
|
|||
static NAME: &'static str = "realpath";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = &args[0];
|
||||
let options = [
|
||||
optflag("h", "help", "Show help and exit"),
|
||||
|
|
|
@ -19,7 +19,7 @@ use getopts::{optflag, optopt, getopts, usage};
|
|||
static NAME: &'static str = "relpath";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = &args[0];
|
||||
let options = [
|
||||
optflag("h", "help", "Show help and exit"),
|
||||
|
|
|
@ -30,7 +30,7 @@ impl Copy for InteractiveMode {}
|
|||
|
||||
static NAME: &'static str = "rm";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
// TODO: make getopts support -R in addition to -r
|
||||
|
|
|
@ -21,7 +21,7 @@ mod util;
|
|||
|
||||
static NAME: &'static str = "rmdir";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
let opts = [
|
||||
|
|
|
@ -145,7 +145,7 @@ fn print_version() {
|
|||
println!("seq 1.0.0\n");
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let mut options = SeqOptions {
|
||||
separator: "\n".to_string(),
|
||||
|
|
|
@ -25,7 +25,7 @@ mod time;
|
|||
|
||||
static NAME: &'static str = "sleep";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
let opts = [
|
||||
|
|
|
@ -23,7 +23,7 @@ mod util;
|
|||
static NAME: &'static str = "split";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optopt("a", "suffix-length", "use suffixes of length N (default 2)", "N"),
|
||||
getopts::optopt("b", "bytes", "put SIZE bytes per output file", "SIZE"),
|
||||
|
|
|
@ -138,7 +138,7 @@ mod platform {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = &args[0];
|
||||
|
||||
let options = [
|
||||
|
|
|
@ -29,7 +29,7 @@ mod util;
|
|||
static NAME: &'static str = "tail";
|
||||
static VERSION: &'static str = "0.0.1";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let mut beginning = false;
|
||||
let mut lines = true;
|
||||
let mut byte_count = 0u;
|
||||
|
|
|
@ -21,7 +21,7 @@ use getopts::{getopts, optflag, usage};
|
|||
static NAME: &'static str = "tee";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
match options(args.as_slice()).and_then(exec) {
|
||||
Ok(_) => 0,
|
||||
Err(_) => 1
|
||||
|
|
|
@ -18,7 +18,7 @@ use std::str::{from_utf8};
|
|||
static NAME: &'static str = "test";
|
||||
|
||||
// TODO: decide how to handle non-UTF8 input for all the utils
|
||||
pub fn uumain(_: Vec<String>) -> int {
|
||||
pub fn uumain(_: Vec<String>) -> isize {
|
||||
let args = args_as_bytes();
|
||||
let args: Vec<&[u8]> = args.iter().map(|a| a.as_slice()).collect();
|
||||
if args.len() == 0 {
|
||||
|
|
|
@ -34,7 +34,7 @@ static VERSION: &'static str = "1.0.0";
|
|||
|
||||
static ERR_EXIT_STATUS: int = 125;
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
let opts = [
|
||||
|
|
|
@ -22,7 +22,7 @@ mod util;
|
|||
static NAME: &'static str = "touch";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("a", "", "change only the access time"),
|
||||
getopts::optflag("c", "no-create", "do not create any files"),
|
||||
|
|
|
@ -158,7 +158,7 @@ fn usage(opts: &[OptGroup]) {
|
|||
print(getopts::usage("Translate or delete characters.", opts).as_slice());
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("c", "complement", "use the complement of SET1"),
|
||||
getopts::optflag("C", "", "same as -c"),
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
pub fn uumain(_: Vec<String>) -> int {
|
||||
pub fn uumain(_: Vec<String>) -> isize {
|
||||
0
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ enum TruncateMode {
|
|||
|
||||
static NAME: &'static str = "truncate";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
|
||||
let opts = [
|
||||
|
|
|
@ -23,7 +23,7 @@ mod util;
|
|||
static NAME: &'static str = "tsort";
|
||||
static VERSION: &'static str = "1.0.0";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
getopts::optflag("V", "version", "output version information and exit"),
|
||||
|
|
|
@ -33,7 +33,7 @@ extern {
|
|||
|
||||
static NAME: &'static str = "tty";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let options = [
|
||||
optflag("s", "silent", "print nothing, only return an exit status")
|
||||
];
|
||||
|
|
|
@ -55,7 +55,7 @@ unsafe fn getuname() -> utsrust {
|
|||
|
||||
static NAME: &'static str = "uname";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
|
@ -72,7 +72,7 @@ impl Options {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let opts = [
|
||||
getopts::optflag("a", "all", "convert all blanks, instead of just initial blanks"),
|
||||
getopts::optflag("", "first-only", "convert only leading sequences of blanks (overrides -a)"),
|
||||
|
|
|
@ -117,7 +117,7 @@ fn opt_parsed<T: FromStr>(opt_name: &str, matches: &getopts::Matches) -> Option<
|
|||
})
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program_path = Path::new(args[0].clone());
|
||||
let program = program_path.filename_str().unwrap_or(NAME);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ mod util;
|
|||
|
||||
static NAME: &'static str = "unlink";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
|
@ -53,7 +53,7 @@ unsafe extern fn utmpxname(_file: *const c_char) -> c_int {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("v", "version", "output version information and exit"),
|
||||
|
|
|
@ -51,7 +51,7 @@ unsafe extern fn utmpxname(_file: *const libc::c_char) -> libc::c_int {
|
|||
|
||||
static NAME: &'static str = "users";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
|
@ -35,7 +35,7 @@ struct Result {
|
|||
|
||||
static NAME: &'static str = "wc";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("c", "bytes", "print the byte counts"),
|
||||
|
|
|
@ -62,7 +62,7 @@ mod platform {
|
|||
|
||||
static NAME: &'static str = "whoami";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].as_slice();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
|
@ -22,7 +22,7 @@ mod util;
|
|||
|
||||
static NAME: &'static str = "yes";
|
||||
|
||||
pub fn uumain(args: Vec<String>) -> int {
|
||||
pub fn uumain(args: Vec<String>) -> isize {
|
||||
let program = args[0].clone();
|
||||
let opts = [
|
||||
getopts::optflag("h", "help", "display this help and exit"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue