1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

Merge pull request #415 from ebfe/fix-build-master

Fix build with rust master
This commit is contained in:
I'm Blood Elf ... And What !? 2014-10-11 00:08:44 +04:00
commit a6f6b04b8a
3 changed files with 48 additions and 48 deletions

View file

@ -159,9 +159,9 @@ fn encode(input: &mut Reader, line_wrap: uint) {
// However, since GNU base64 outputs only LF (presumably because that is
// the standard UNIX line ending), we strip CRs from the output to maintain
// compatibility.
let final = encoded.replace("\r", "");
let output = encoded.replace("\r", "");
println(final.as_slice());
println(output.as_slice());
}
fn help(progname: &str, usage: &str) {

View file

@ -10,21 +10,21 @@ mod utmpx {
pub static DEFAULT_FILE: &'static str = "/var/run/utmp";
pub static UT_LINESIZE: uint = 32;
pub static UT_NAMESIZE: uint = 32;
pub static UT_IDSIZE: uint = 4;
pub static UT_HOSTSIZE: uint = 256;
pub const UT_LINESIZE: uint = 32;
pub const UT_NAMESIZE: uint = 32;
pub const UT_IDSIZE: uint = 4;
pub const UT_HOSTSIZE: uint = 256;
pub static EMPTY: libc::c_short = 0;
pub static RUN_LVL: libc::c_short = 1;
pub static BOOT_TIME: libc::c_short = 2;
pub static NEW_TIME: libc::c_short = 3;
pub static OLD_TIME: libc::c_short = 4;
pub static INIT_PROCESS: libc::c_short = 5;
pub static LOGIN_PROCESS: libc::c_short = 6;
pub static USER_PROCESS: libc::c_short = 7;
pub static DEAD_PROCESS: libc::c_short = 8;
pub static ACCOUNTING: libc::c_short = 9;
pub const EMPTY: libc::c_short = 0;
pub const RUN_LVL: libc::c_short = 1;
pub const BOOT_TIME: libc::c_short = 2;
pub const NEW_TIME: libc::c_short = 3;
pub const OLD_TIME: libc::c_short = 4;
pub const INIT_PROCESS: libc::c_short = 5;
pub const LOGIN_PROCESS: libc::c_short = 6;
pub const USER_PROCESS: libc::c_short = 7;
pub const DEAD_PROCESS: libc::c_short = 8;
pub const ACCOUNTING: libc::c_short = 9;
#[repr(C)]
pub struct c_exit_status {
@ -56,21 +56,21 @@ mod utmpx {
pub static DEFAULT_FILE: &'static str = "/var/run/utmpx";
pub static UT_LINESIZE: uint = 32;
pub static UT_NAMESIZE: uint = 256;
pub static UT_IDSIZE: uint = 4;
pub static UT_HOSTSIZE: uint = 256;
pub const UT_LINESIZE: uint = 32;
pub const UT_NAMESIZE: uint = 256;
pub const UT_IDSIZE: uint = 4;
pub const UT_HOSTSIZE: uint = 256;
pub static EMPTY: libc::c_short = 0;
pub static RUN_LVL: libc::c_short = 1;
pub static BOOT_TIME: libc::c_short = 2;
pub static OLD_TIME: libc::c_short = 3;
pub static NEW_TIME: libc::c_short = 4;
pub static INIT_PROCESS: libc::c_short = 5;
pub static LOGIN_PROCESS: libc::c_short = 6;
pub static USER_PROCESS: libc::c_short = 7;
pub static DEAD_PROCESS: libc::c_short = 8;
pub static ACCOUNTING: libc::c_short = 9;
pub const EMPTY: libc::c_short = 0;
pub const RUN_LVL: libc::c_short = 1;
pub const BOOT_TIME: libc::c_short = 2;
pub const OLD_TIME: libc::c_short = 3;
pub const NEW_TIME: libc::c_short = 4;
pub const INIT_PROCESS: libc::c_short = 5;
pub const LOGIN_PROCESS: libc::c_short = 6;
pub const USER_PROCESS: libc::c_short = 7;
pub const DEAD_PROCESS: libc::c_short = 8;
pub const ACCOUNTING: libc::c_short = 9;
#[repr(C)]
pub struct c_exit_status {
@ -97,20 +97,20 @@ mod utmpx {
pub static DEFAULT_FILE : &'static str = "";
pub static UT_LINESIZE : uint = 16;
pub static UT_NAMESIZE : uint = 32;
pub static UT_IDSIZE : uint = 8;
pub static UT_HOSTSIZE : uint = 128;
pub const UT_LINESIZE : uint = 16;
pub const UT_NAMESIZE : uint = 32;
pub const UT_IDSIZE : uint = 8;
pub const UT_HOSTSIZE : uint = 128;
pub static EMPTY : libc::c_short = 0;
pub static BOOT_TIME : libc::c_short = 1;
pub static OLD_TIME : libc::c_short = 2;
pub static NEW_TIME : libc::c_short = 3;
pub static USER_PROCESS : libc::c_short = 4;
pub static INIT_PROCESS : libc::c_short = 5;
pub static LOGIN_PROCESS : libc::c_short = 6;
pub static DEAD_PROCESS : libc::c_short = 7;
pub static SHUTDOWN_TIME : libc::c_short = 8;
pub const EMPTY : libc::c_short = 0;
pub const BOOT_TIME : libc::c_short = 1;
pub const OLD_TIME : libc::c_short = 2;
pub const NEW_TIME : libc::c_short = 3;
pub const USER_PROCESS : libc::c_short = 4;
pub const INIT_PROCESS : libc::c_short = 5;
pub const LOGIN_PROCESS : libc::c_short = 6;
pub const DEAD_PROCESS : libc::c_short = 7;
pub const SHUTDOWN_TIME : libc::c_short = 8;
#[repr(C)]
pub struct c_utmp {

View file

@ -334,14 +334,14 @@ fn build_best_path<'a>(paths: &Vec<LineBreak<'a>>, active: &Vec<uint>) -> Vec<(&
}
// "infinite" badness is more like (1+BAD_INFTY)^2 because of how demerits are computed
static BAD_INFTY: i64 = 10000000;
static BAD_INFTY_SQ: i64 = BAD_INFTY * BAD_INFTY;
const BAD_INFTY: i64 = 10000000;
const BAD_INFTY_SQ: i64 = BAD_INFTY * BAD_INFTY;
// badness = BAD_MULT * abs(r) ^ 3
static BAD_MULT: f32 = 100.0;
const BAD_MULT: f32 = 100.0;
// DR_MULT is multiplier for delta-R between lines
static DR_MULT: f32 = 600.0;
const DR_MULT: f32 = 600.0;
// DL_MULT is penalty multiplier for short words at end of line
static DL_MULT: f32 = 300.0;
const DL_MULT: f32 = 300.0;
#[inline(always)]
fn compute_demerits(delta_len: int, stretch: int, wlen: int, prev_rat: f32) -> (i64, f32) {