1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

printf: intf: change warning and exit code

This commit is contained in:
ALXD 2023-11-15 17:40:54 +01:00
parent c8b8509b00
commit b3eae16fad

View file

@ -8,10 +8,11 @@
//! formatter for unsigned and signed int subs //! formatter for unsigned and signed int subs
//! unsigned int: %X %x (hex u64) %o (octal u64) %u (base ten u64) //! unsigned int: %X %x (hex u64) %o (octal u64) %u (base ten u64)
//! signed int: %i %d (both base ten i64) //! signed int: %i %d (both base ten i64)
use crate::error::set_exit_code;
use crate::features::tokenize::num_format::num_format::warn_expected_numeric;
use super::super::format_field::FormatField; use super::super::format_field::FormatField;
use super::super::formatter::{ use super::super::formatter::{get_it_at, Base, FormatPrimitive, Formatter, InitialPrefix};
get_it_at, warn_incomplete_conv, Base, FormatPrimitive, Formatter, InitialPrefix,
};
use std::i64; use std::i64;
use std::u64; use std::u64;
@ -112,7 +113,8 @@ impl Intf {
} }
} }
_ => { _ => {
warn_incomplete_conv(str_in); warn_expected_numeric(str_in);
set_exit_code(1);
break; break;
} }
} }