Merge pull request #718 from jbcrail/uucore

Split utility files into separate library.
This commit is contained in:
Heather
2015-11-24 20:46:26 -08:00
153 changed files with 353 additions and 399 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
target/
/src/*/gen_table
/target/
/build/
/tmp/
/busybox/
*~
+1
View File
@@ -85,6 +85,7 @@ all = [
]
[dependencies]
uucore = { path="src/uucore" }
base64 = { optional=true, path="src/base64" }
basename = { optional=true, path="src/basename" }
cat = { optional=true, path="src/cat" }
+1
View File
@@ -11,6 +11,7 @@ path = "base64.rs"
getopts = "*"
libc = "*"
rustc-serialize = "*"
uucore = { path="../uucore" }
[[bin]]
name="base64"
+3 -4
View File
@@ -13,6 +13,9 @@ extern crate rustc_serialize as serialize;
extern crate getopts;
extern crate libc;
#[macro_use]
extern crate uucore;
use getopts::Options;
use serialize::base64::{self, FromBase64, ToBase64};
use std::ascii::AsciiExt;
@@ -21,10 +24,6 @@ use std::fs::File;
use std::io::{BufReader, Read, stdin, stdout, Write};
use std::path::Path;
#[path = "../common/util.rs"]
#[macro_use]
mod util;
enum Mode {
Decode,
Encode,
+1
View File
@@ -10,6 +10,7 @@ path = "basename.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="basename"
+3 -4
View File
@@ -12,14 +12,13 @@
extern crate getopts;
extern crate libc;
#[macro_use]
extern crate uucore;
use getopts::Options;
use std::io::Write;
use std::path::{is_separator, PathBuf};
#[path = "../common/util.rs"]
#[macro_use]
mod util;
static NAME: &'static str = "basename";
static VERSION: &'static str = "1.0.0";
+1
View File
@@ -10,6 +10,7 @@ path = "cat.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="cat"
+5 -6
View File
@@ -14,16 +14,15 @@
extern crate getopts;
extern crate libc;
#[macro_use]
extern crate uucore;
use libc::STDIN_FILENO;
use libc::{c_int, isatty};
use getopts::Options;
use std::fs::File;
use std::intrinsics::{copy_nonoverlapping};
use std::io::{stdout, stdin, stderr, Write, Read, Result};
use libc::STDIN_FILENO;
use libc::{c_int, isatty};
#[path = "../common/util.rs"]
#[macro_use]
mod util;
static NAME: &'static str = "cat";
static VERSION: &'static str = "1.0.0";
+1
View File
@@ -14,6 +14,7 @@ aho-corasick = "*"
memchr = "*"
regex = "*"
regex-syntax = "*"
uucore = { path="../uucore" }
walker = "*"
[[bin]]
+4 -9
View File
@@ -19,23 +19,18 @@ extern crate regex;
extern crate regex_syntax;
extern crate walker;
#[macro_use]
extern crate uucore;
use getopts::Options;
use regex::Regex;
use std::ffi::CString;
use std::io::{Error, Write};
use std::mem;
use std::path::Path;
use uucore::fs::UUPathExt;
use walker::Walker;
#[path = "../common/util.rs"]
#[macro_use]
mod util;
#[path = "../common/filesystem.rs"]
mod filesystem;
use filesystem::UUPathExt;
const NAME: &'static str = "chmod";
const VERSION: &'static str = "1.0.0";
+1
View File
@@ -10,6 +10,7 @@ path = "chroot.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="chroot"
+5 -7
View File
@@ -12,7 +12,9 @@
extern crate getopts;
extern crate libc;
use c_types::{get_pw_from_args, get_group};
#[macro_use]
extern crate uucore;
use getopts::Options;
use libc::{setgid, setuid};
use std::ffi::CString;
@@ -20,12 +22,8 @@ use std::io::{Error, Write};
use std::iter::FromIterator;
use std::path::Path;
use std::process::Command;
#[path = "../common/util.rs"] #[macro_use] mod util;
#[path = "../common/c_types.rs"] mod c_types;
#[path = "../common/filesystem.rs"] mod filesystem;
use filesystem::UUPathExt;
use uucore::c_types::{get_pw_from_args, get_group};
use uucore::fs::UUPathExt;
extern {
fn chroot(path: *const libc::c_char) -> libc::c_int;
+1
View File
@@ -10,6 +10,7 @@ path = "cksum.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="cksum"
+3 -4
View File
@@ -11,6 +11,9 @@
extern crate getopts;
#[macro_use]
extern crate uucore;
use getopts::Options;
use std::fs::File;
use std::io::{self, stdin, Read, Write, BufReader};
@@ -19,10 +22,6 @@ use std::path::Path;
use crc_table::CRC_TABLE;
#[path="../common/util.rs"]
#[macro_use]
mod util;
mod crc_table;
static NAME: &'static str = "cksum";
+1
View File
@@ -10,6 +10,7 @@ path = "cp.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="cp"
+4 -9
View File
@@ -11,19 +11,14 @@
extern crate getopts;
#[macro_use]
extern crate uucore;
use getopts::Options;
use std::fs;
use std::io::{ErrorKind, Result, Write};
use std::path::Path;
#[path = "../common/util.rs"]
#[macro_use]
mod util;
#[path = "../common/filesystem.rs"]
mod filesystem;
use filesystem::{canonicalize, CanonicalizeMode, UUPathExt};
use uucore::fs::{canonicalize, CanonicalizeMode, UUPathExt};
#[derive(Clone, Eq, PartialEq)]
pub enum Mode {
+1
View File
@@ -10,6 +10,7 @@ path = "cut.rs"
[dependencies]
getopts = "*"
libc = "*"
uucore = { path="../uucore" }
[[bin]]
name="cut"
+4 -9
View File
@@ -12,22 +12,17 @@
extern crate getopts;
extern crate libc;
#[macro_use]
extern crate uucore;
use std::fs::File;
use std::io::{stdout, stdin, BufRead, BufReader, Read, Stdout, Write};
use std::path::Path;
use uucore::fs::UUPathExt;
use ranges::Range;
use searcher::Searcher;
#[path = "../common/util.rs"]
#[macro_use]
mod util;
#[path = "../common/filesystem.rs"]
mod filesystem;
use filesystem::UUPathExt;
mod buffer;
mod ranges;
mod searcher;
+1
View File
@@ -11,6 +11,7 @@ path = "du.rs"
getopts = "*"
libc = "*"
time = "*"
uucore = { path="../uucore" }
[[bin]]
name="du"
+3 -4
View File
@@ -15,6 +15,9 @@ extern crate getopts;
extern crate libc;
extern crate time;
#[macro_use]
extern crate uucore;
use std::fs;
use std::io::{stderr, Write};
use std::os::unix::fs::MetadataExt;
@@ -24,10 +27,6 @@ use time::Timespec;
use std::sync::mpsc::channel;
use std::thread;
#[path = "../common/util.rs"]
#[macro_use]
mod util;
static NAME: &'static str = "du";
static VERSION: &'static str = "1.0.0";

Some files were not shown because too many files have changed in this diff Show More