1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

Merge pull request #468 from Arcterus/fix-build

Fix build for latest Rust
This commit is contained in:
Cynede 2014-12-09 16:04:44 +03:00
commit baa7eccd4d
6 changed files with 13 additions and 12 deletions

View file

@ -14,7 +14,7 @@ extern crate getopts;
use std::cmp::Ord;
use std::io::{BufferedReader, IoResult, print};
use std::io::fs::File;
use std::io::stdio::{stdin, StdReader};
use std::io::stdio::{stdin, StdinReader};
use std::path::Path;
static NAME : &'static str = "comm";
@ -45,7 +45,7 @@ fn ensure_nl(line: String) -> String {
}
enum LineReader {
Stdin(BufferedReader<StdReader>),
Stdin(StdinReader),
FileIn(BufferedReader<File>)
}

View file

@ -13,8 +13,9 @@
extern crate getopts;
extern crate libc;
use std::vec::{Vec};
use std::io::{stdin};
use std::vec::Vec;
use std::io::BufferedReader;
use std::io::stdio::stdin_raw;
#[path="../common/util.rs"]
mod util;
@ -91,7 +92,7 @@ pub fn uumain(args: Vec<String>) -> int {
}
if matches.free.is_empty() {
for line in stdin().lines() {
for line in BufferedReader::new(stdin_raw()).lines() {
print_factors_str(line.unwrap().as_slice().trim());
}
} else {

View file

@ -10,7 +10,7 @@
* that was distributed with this source code.
*/
#![feature(macro_rules, if_let)]
#![feature(macro_rules)]
extern crate getopts;

View file

@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
#![feature(if_let, macro_rules)]
#![feature(macro_rules)]
extern crate getopts;
extern crate libc;

View file

@ -9,7 +9,7 @@
*
*/
#![feature(if_let, macro_rules)]
#![feature(macro_rules)]
extern crate getopts;

View file

@ -16,8 +16,8 @@ extern crate getopts;
use getopts::OptGroup;
use std::char::from_u32;
use std::collections::{BitvSet, VecMap};
use std::io::print;
use std::io::stdio::{stdin,stdout};
use std::io::{BufferedReader, print};
use std::io::stdio::{stdin_raw, stdout};
use std::iter::FromIterator;
use std::vec::Vec;
@ -101,7 +101,7 @@ fn delete(set: Vec<char>, complement: bool) {
|c: char| !bset.contains(&(c as uint))
};
for c in stdin().chars() {
for c in BufferedReader::new(stdin_raw()).chars() {
match c {
Ok(c) if is_allowed(c) => out.write_char(c).unwrap(),
Ok(_) => (),
@ -126,7 +126,7 @@ fn tr(set1: &[char], set2: &[char]) {
}
}
for c in stdin().chars() {
for c in BufferedReader::new(stdin_raw()).chars() {
match c {
Ok(inc) => {
let trc = match map.get(&(inc as uint)) {