diff --git a/utshell-0.5/r_input/Cargo.toml b/utshell-0.5/r_input/Cargo.toml index 34a6bdf7cbab224fea0b85d00e6100aa4e814a69..60505d414886c22a1e24110082b2e24296fe3818 100644 --- a/utshell-0.5/r_input/Cargo.toml +++ b/utshell-0.5/r_input/Cargo.toml @@ -13,3 +13,4 @@ r_bash = {path = "../r_bash"} [lib] name = "r_input" crate-type = ["staticlib","rlib"] + diff --git a/utshell-0.5/r_input/src/lib.rs b/utshell-0.5/r_input/src/lib.rs index b76063114e8eb46cbffd0cc362ff4833bc219baa..085684641ef6b91f6ad25f40489f13346d780850 100644 --- a/utshell-0.5/r_input/src/lib.rs +++ b/utshell-0.5/r_input/src/lib.rs @@ -11,3 +11,41 @@ unused_assignments, unused_mut )] +use libc::FILE; +use r_bash::*; +extern "C" { + fn fcntl(__fd: libc::c_int, __cmd: libc::c_int, _: ...) -> libc::c_int; + fn open(__file: *const libc::c_char, __oflag: libc::c_int, _: ...) -> libc::c_int; + fn __fxstat(__ver: libc::c_int, __fildes: libc::c_int, __stat_buf: *mut stat) -> libc::c_int; + fn fileno(__stream: *mut FILE) -> libc::c_int; + fn __errno_location() -> *mut libc::c_int; + fn lseek(__fd: libc::c_int, __offset: __off_t, __whence: libc::c_int) -> __off_t; + fn close(__fd: libc::c_int) -> libc::c_int; + fn read(__fd: libc::c_int, __buf: *mut libc::c_void, __nbytes: size_t) -> ssize_t; + fn dcgettext( + __domainname: *const libc::c_char, + __msgid: *const libc::c_char, + __category: libc::c_int, + ) -> *mut libc::c_char; + fn sh_unset_nodelay_mode(_: libc::c_int) -> libc::c_int; + fn sys_error(_: *const libc::c_char, _: ...); + fn internal_error(_: *const libc::c_char, _: ...); + fn termsig_handler(_: libc::c_int); + fn throw_to_top_level(); + static mut interrupt_state: sig_atomic_t; + static mut terminating_signal: sig_atomic_t; + fn return_EOF() -> libc::c_int; + fn xbcopy(_: *mut libc::c_char, _: *mut libc::c_char, _: libc::c_int); + fn zread(_: libc::c_int, _: *mut libc::c_char, _: size_t) -> ssize_t; + static mut interactive_shell: libc::c_int; + static mut default_buffered_input: libc::c_int; + static mut bash_input: BASH_INPUT; + fn init_yy_io( + _: Option, + _: Option, + _: stream_type, + _: *const libc::c_char, + _: INPUT_STREAM, + ); + fn run_pending_traps(); +} \ No newline at end of file