diff --git a/utshell-0.5/r_error/src/lib.rs b/utshell-0.5/r_error/src/lib.rs index 532c3777530fe98e255fa91091fc87ba82189311..4bc13c12133d249da0ddc5b0985acd2b8bd6e1ff 100644 --- a/utshell-0.5/r_error/src/lib.rs +++ b/utshell-0.5/r_error/src/lib.rs @@ -153,4 +153,32 @@ pub unsafe extern "C" fn fatal_error(mut format: *const libc::c_char, mut args: vfprintf(stderr, format, args_0.as_va_list()); fprintf(stderr, b"\n\0" as *const u8 as *const libc::c_char); sh_exit(2 as libc::c_int); +} + +#[no_mangle] +pub unsafe extern "C" fn internal_error(mut format: *const libc::c_char, mut args: ...) { + let mut args_0: ::std::ffi::VaListImpl; + error_prolog(1 as libc::c_int); + args_0 = args.clone(); + vfprintf(stderr, format, args_0.as_va_list()); + fprintf(stderr, b"\n\0" as *const u8 as *const libc::c_char); +} +#[no_mangle] +pub unsafe extern "C" fn internal_warning( + mut format: *const libc::c_char, + mut args: ... +) { + let mut args_0: ::std::ffi::VaListImpl; + error_prolog(1 as libc::c_int); + fprintf( + stderr, + dcgettext( + 0 as *const libc::c_char, + b"warning: \0" as *const u8 as *const libc::c_char, + 5 as libc::c_int, + ), + ); + args_0 = args.clone(); + vfprintf(stderr, format, args_0.as_va_list()); + fprintf(stderr, b"\n\0" as *const u8 as *const libc::c_char); } \ No newline at end of file