From 958f318881b11d5715a3ca7d6f8c52ee91def273 Mon Sep 17 00:00:00 2001 From: wangmengc Date: Mon, 14 Aug 2023 10:18:47 +0800 Subject: [PATCH] Merge modify transfile path into rustdev --- bash-5.1/Cargo.toml | 2 +- bash-5.1/Makefile.in | 6 ++++++ bash-5.1/builtins_rust/alias/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/bind/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/break_1/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/builtin/Cargo.toml | 2 +- bash-5.1/builtins_rust/caller/Cargo.toml | 2 +- bash-5.1/builtins_rust/cd/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/colon/Cargo.toml | 2 +- bash-5.1/builtins_rust/common/src/lib.rs | 1 - bash-5.1/builtins_rust/complete/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/declare/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/echo/Cargo.toml | 2 +- bash-5.1/builtins_rust/enable/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/exec/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/exec_cmd/Cargo.toml | 2 +- bash-5.1/builtins_rust/fc/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/fg_bg/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/getopts/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/help/src/lib.rs | 12 ++++-------- bash-5.1/builtins_rust/history/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/kill/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/mapfile/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/printf/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/pushd/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/read/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/rlet/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/rreturn/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/set/Cargo.toml | 2 +- bash-5.1/builtins_rust/setattr/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/shift/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/shopt/src/lib.rs | 2 +- bash-5.1/builtins_rust/source/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/suspend/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/test/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/times/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/trap/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/type/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/ulimit/Cargo.toml | 6 +++--- bash-5.1/builtins_rust/umask/Cargo.toml | 3 --- bash-5.1/builtins_rust/wait/Cargo.toml | 4 ++-- bash-5.1/builtins_rust/wait/src/lib.rs | 2 +- bash-5.1/configure | 2 +- bash-5.1/execute_cmd.c | 2 +- record.txt | 1 + 45 files changed, 93 insertions(+), 94 deletions(-) diff --git a/bash-5.1/Cargo.toml b/bash-5.1/Cargo.toml index 0c96767..87ccd3a 100644 --- a/bash-5.1/Cargo.toml +++ b/bash-5.1/Cargo.toml @@ -65,7 +65,7 @@ members=[ ] [dependencies] - libc = "0.2" + libc = "*" rread = {path = "./builtins_rust/read"} rhistory = {path = "./builtins_rust/history"} rkill = {path = "./builtins_rust/kill"} diff --git a/bash-5.1/Makefile.in b/bash-5.1/Makefile.in index f17ec7b..75e657d 100644 --- a/bash-5.1/Makefile.in +++ b/bash-5.1/Makefile.in @@ -566,6 +566,8 @@ OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/COMPAT $(srcdir)/NEWS $(srcdir)/POSIX \ $(srcdir)/RBASH OTHER_INSTALLED_DOCS = CHANGES COMPAT NEWS POSIX RBASH README +LANGSUBDIR = resources +LANGSRC = $(srcdir)/$(LANGSUBDIR) RUST_DIR = $(top_builddir)/builtins_rust #RUST_TARGET_LIB = $(top_builddir)/target/debug/librjobs.a $(top_builddir)/target/debug/librread.a @@ -821,6 +823,9 @@ install: .made installdirs $(INSTALL_SCRIPT) $(INSTALLMODE2) rashbug $(DESTDIR)$(bindir)/rashbug -( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + -($(INSTALL_DATA) -D $(INSTALLMODE2) $(LANGSRC)/zh-CN/* -t $(DESTDIR)$(datadir)/utshell/${LANGSRC}/zh-CN ) + -($(INSTALL_DATA) -D $(INSTALLMODE2) $(LANGSRC)/zh-HK/* -t $(DESTDIR)$(datadir)/utshell/${LANGSRC}/zh-HK ) + -($(INSTALL_DATA) -D $(INSTALLMODE2) $(LANGSRC)/en-US/* -t $(DESTDIR)$(datadir)/utshell/${LANGSRC}/en-US ) install-strip: $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ @@ -862,6 +867,7 @@ uninstall-headers: uninstall: .made $(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/rashbug -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) + $(RM) -r $(DESTDIR)$(datadir)/utshell .PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean diff --git a/bash-5.1/builtins_rust/alias/Cargo.toml b/bash-5.1/builtins_rust/alias/Cargo.toml index 9669a4d..a77df03 100644 --- a/bash-5.1/builtins_rust/alias/Cargo.toml +++ b/bash-5.1/builtins_rust/alias/Cargo.toml @@ -10,7 +10,7 @@ name = "ralias" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" +libc = "*" rcmd = {path="../cmd"} rcommon= {path="../common"} -# nix = "0.23" +# nix = "*" diff --git a/bash-5.1/builtins_rust/bind/Cargo.toml b/bash-5.1/builtins_rust/bind/Cargo.toml index fca9b51..deb8ab7 100644 --- a/bash-5.1/builtins_rust/bind/Cargo.toml +++ b/bash-5.1/builtins_rust/bind/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.24.1" +libc = "*" +nix = "*" rcommon = {path = "../common"} [lib] diff --git a/bash-5.1/builtins_rust/break_1/Cargo.toml b/bash-5.1/builtins_rust/break_1/Cargo.toml index 085d195..cbdf261 100644 --- a/bash-5.1/builtins_rust/break_1/Cargo.toml +++ b/bash-5.1/builtins_rust/break_1/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.23.0" +libc = "*" +nix = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/builtin/Cargo.toml b/bash-5.1/builtins_rust/builtin/Cargo.toml index 9301c7d..4304dde 100644 --- a/bash-5.1/builtins_rust/builtin/Cargo.toml +++ b/bash-5.1/builtins_rust/builtin/Cargo.toml @@ -9,7 +9,7 @@ name = "rbuiltin" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" +libc = "*" rcmd = {path="../cmd"} rcommon = {path="../common"} diff --git a/bash-5.1/builtins_rust/caller/Cargo.toml b/bash-5.1/builtins_rust/caller/Cargo.toml index fe503dc..4811682 100644 --- a/bash-5.1/builtins_rust/caller/Cargo.toml +++ b/bash-5.1/builtins_rust/caller/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" +libc = "*" rread = {path="../read"} rcommon = {path="../common"} diff --git a/bash-5.1/builtins_rust/cd/Cargo.toml b/bash-5.1/builtins_rust/cd/Cargo.toml index 56ccd74..2d92dc8 100644 --- a/bash-5.1/builtins_rust/cd/Cargo.toml +++ b/bash-5.1/builtins_rust/cd/Cargo.toml @@ -7,10 +7,10 @@ build = "../build.rs" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" +lazy_static = "*" +libc = "*" rcommon = {path="../common"} -nix = "0.23.0" +nix = "*" [lib] crate-type = ["staticlib","rlib"] diff --git a/bash-5.1/builtins_rust/colon/Cargo.toml b/bash-5.1/builtins_rust/colon/Cargo.toml index dea395c..a6c28aa 100644 --- a/bash-5.1/builtins_rust/colon/Cargo.toml +++ b/bash-5.1/builtins_rust/colon/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["staticlib","rlib"] name = "rcolon" [dependencies] -libc = "0.2" +libc = "*" rcommon = {path ="../common"} diff --git a/bash-5.1/builtins_rust/common/src/lib.rs b/bash-5.1/builtins_rust/common/src/lib.rs index d3387d3..696f3bc 100644 --- a/bash-5.1/builtins_rust/common/src/lib.rs +++ b/bash-5.1/builtins_rust/common/src/lib.rs @@ -663,7 +663,6 @@ extern "C"{ fn builtin_help(); fn builtin_error(format:*const c_char,...); - } unsafe fn ISOPTION(s:* const c_char, c:c_char)->bool diff --git a/bash-5.1/builtins_rust/complete/Cargo.toml b/bash-5.1/builtins_rust/complete/Cargo.toml index 58cadc6..d08f34a 100644 --- a/bash-5.1/builtins_rust/complete/Cargo.toml +++ b/bash-5.1/builtins_rust/complete/Cargo.toml @@ -7,9 +7,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/declare/Cargo.toml b/bash-5.1/builtins_rust/declare/Cargo.toml index 68cfd0b..f8f4e21 100644 --- a/bash-5.1/builtins_rust/declare/Cargo.toml +++ b/bash-5.1/builtins_rust/declare/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path = "../common"} [lib] diff --git a/bash-5.1/builtins_rust/echo/Cargo.toml b/bash-5.1/builtins_rust/echo/Cargo.toml index 31720c0..cbbe87e 100644 --- a/bash-5.1/builtins_rust/echo/Cargo.toml +++ b/bash-5.1/builtins_rust/echo/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" +libc = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/enable/Cargo.toml b/bash-5.1/builtins_rust/enable/Cargo.toml index 99eea4b..14ec094 100644 --- a/bash-5.1/builtins_rust/enable/Cargo.toml +++ b/bash-5.1/builtins_rust/enable/Cargo.toml @@ -9,7 +9,7 @@ name = "renable" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -libloading = "0.7" +libc = "*" +libloading = "*" rcmd = {path="../cmd"} rcommon = {path="../common"} diff --git a/bash-5.1/builtins_rust/exec/Cargo.toml b/bash-5.1/builtins_rust/exec/Cargo.toml index 605d335..47a86be 100644 --- a/bash-5.1/builtins_rust/exec/Cargo.toml +++ b/bash-5.1/builtins_rust/exec/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.24.1" +libc = "*" +nix = "*" rcommon = {path = "../common"} [lib] diff --git a/bash-5.1/builtins_rust/exec_cmd/Cargo.toml b/bash-5.1/builtins_rust/exec_cmd/Cargo.toml index f44bc7e..a84e76d 100644 --- a/bash-5.1/builtins_rust/exec_cmd/Cargo.toml +++ b/bash-5.1/builtins_rust/exec_cmd/Cargo.toml @@ -50,7 +50,7 @@ rtype = {path="../type"} rulimit = {path="../ulimit"} rumask = {path="../umask"} rwait = {path="../wait"} -libc = "0.2" +libc = "*" [lib] crate-type = ["staticlib","rlib"] name = "rexec_cmd" diff --git a/bash-5.1/builtins_rust/fc/Cargo.toml b/bash-5.1/builtins_rust/fc/Cargo.toml index 70adc42..5e9a024 100644 --- a/bash-5.1/builtins_rust/fc/Cargo.toml +++ b/bash-5.1/builtins_rust/fc/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/fg_bg/Cargo.toml b/bash-5.1/builtins_rust/fg_bg/Cargo.toml index f054950..886c7c3 100644 --- a/bash-5.1/builtins_rust/fg_bg/Cargo.toml +++ b/bash-5.1/builtins_rust/fg_bg/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/getopts/Cargo.toml b/bash-5.1/builtins_rust/getopts/Cargo.toml index 07044a6..025be6c 100644 --- a/bash-5.1/builtins_rust/getopts/Cargo.toml +++ b/bash-5.1/builtins_rust/getopts/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path="../common"} [lib] diff --git a/bash-5.1/builtins_rust/help/src/lib.rs b/bash-5.1/builtins_rust/help/src/lib.rs index 2df677f..c3fea4b 100644 --- a/bash-5.1/builtins_rust/help/src/lib.rs +++ b/bash-5.1/builtins_rust/help/src/lib.rs @@ -209,7 +209,7 @@ pub extern "C" fn r_help_builtin(mut list:*mut WordList)->i32 { continue; } let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("./resources/{locale}/{res_id}".into()); + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); let resources = vec![ "message.ftl".into()]; let mut args = FluentArgs::new(); @@ -319,7 +319,7 @@ fn open_helpfile(name :*mut c_char) -> i32{ fn show_longdoc(i : i32){ let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("./resources/{locale}/{res_id}".into()); + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); let resources = vec![ "message.ftl".into()]; let mut args = FluentArgs::new(); let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; @@ -335,7 +335,7 @@ fn show_longdoc(i : i32){ fn show_desc (name : *mut c_char, i :i32){ let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("./resources/{locale}/{res_id}".into()); + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); let resources = vec![ "message.ftl".into()]; let mut args = FluentArgs::new(); @@ -357,7 +357,7 @@ fn show_manpage (name : *mut c_char, i : i32){ let mut fd: i32; let mut usefile : bool; let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("./resources/{locale}/{res_id}".into()); + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); let resources = vec![ "message.ftl".into()]; unsafe { doc = builtin1.long_doc; @@ -504,9 +504,6 @@ fn show_builtin_command_help (){ if width <= 3{ width = 40; } - // unsafe { - // height = (num_shell_builtins + 1) / 2; /* number of rows */ - // } for i in 0..height{ unsafe { QUIT(); @@ -557,4 +554,3 @@ unsafe { // } // len // } - diff --git a/bash-5.1/builtins_rust/history/Cargo.toml b/bash-5.1/builtins_rust/history/Cargo.toml index ac14d3d..8bb8f51 100644 --- a/bash-5.1/builtins_rust/history/Cargo.toml +++ b/bash-5.1/builtins_rust/history/Cargo.toml @@ -12,6 +12,6 @@ name = "rhistory" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/kill/Cargo.toml b/bash-5.1/builtins_rust/kill/Cargo.toml index e28c4b8..484a325 100644 --- a/bash-5.1/builtins_rust/kill/Cargo.toml +++ b/bash-5.1/builtins_rust/kill/Cargo.toml @@ -12,6 +12,6 @@ name = "rkill" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/mapfile/Cargo.toml b/bash-5.1/builtins_rust/mapfile/Cargo.toml index 5d8d8f7..6c79fbb 100644 --- a/bash-5.1/builtins_rust/mapfile/Cargo.toml +++ b/bash-5.1/builtins_rust/mapfile/Cargo.toml @@ -13,6 +13,6 @@ name = "rmapfile" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/printf/Cargo.toml b/bash-5.1/builtins_rust/printf/Cargo.toml index 2ed0bdf..09eb471 100644 --- a/bash-5.1/builtins_rust/printf/Cargo.toml +++ b/bash-5.1/builtins_rust/printf/Cargo.toml @@ -11,6 +11,6 @@ name = "rprintf" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/pushd/Cargo.toml b/bash-5.1/builtins_rust/pushd/Cargo.toml index 51804e8..52119df 100644 --- a/bash-5.1/builtins_rust/pushd/Cargo.toml +++ b/bash-5.1/builtins_rust/pushd/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path ="../common"} [lib] diff --git a/bash-5.1/builtins_rust/read/Cargo.toml b/bash-5.1/builtins_rust/read/Cargo.toml index ca0e990..b13cb8c 100644 --- a/bash-5.1/builtins_rust/read/Cargo.toml +++ b/bash-5.1/builtins_rust/read/Cargo.toml @@ -11,6 +11,6 @@ name = "rread" crate-type = ["staticlib", "rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/rlet/Cargo.toml b/bash-5.1/builtins_rust/rlet/Cargo.toml index b52101c..1365a55 100644 --- a/bash-5.1/builtins_rust/rlet/Cargo.toml +++ b/bash-5.1/builtins_rust/rlet/Cargo.toml @@ -12,6 +12,6 @@ name = "rlet" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" -rcommon = {path = "../common"} \ No newline at end of file +libc = "*" +nix = "*" +rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/rreturn/Cargo.toml b/bash-5.1/builtins_rust/rreturn/Cargo.toml index 6b8575a..5968cac 100644 --- a/bash-5.1/builtins_rust/rreturn/Cargo.toml +++ b/bash-5.1/builtins_rust/rreturn/Cargo.toml @@ -12,6 +12,6 @@ name = "rreturn" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" -rcommon = {path = "../common"} \ No newline at end of file +libc = "*" +nix = "*" +rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/set/Cargo.toml b/bash-5.1/builtins_rust/set/Cargo.toml index a437a26..33c1629 100644 --- a/bash-5.1/builtins_rust/set/Cargo.toml +++ b/bash-5.1/builtins_rust/set/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] libc="*" nix="*" -lazy_static = "1.4.0" +lazy_static = "*" rcommon = {path ="../common"} [lib] crate-type = ["staticlib","rlib"] diff --git a/bash-5.1/builtins_rust/setattr/Cargo.toml b/bash-5.1/builtins_rust/setattr/Cargo.toml index 90004e4..e6ca0fe 100644 --- a/bash-5.1/builtins_rust/setattr/Cargo.toml +++ b/bash-5.1/builtins_rust/setattr/Cargo.toml @@ -15,7 +15,7 @@ crate-type = ["staticlib","rlib"] rdeclare = {path = "../declare"} [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rdeclare = {path = "../declare"} -rcommon = {path = "../common"} \ No newline at end of file +rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/shift/Cargo.toml b/bash-5.1/builtins_rust/shift/Cargo.toml index c72aedb..f9a623d 100644 --- a/bash-5.1/builtins_rust/shift/Cargo.toml +++ b/bash-5.1/builtins_rust/shift/Cargo.toml @@ -12,6 +12,6 @@ name = "rshift" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/shopt/src/lib.rs b/bash-5.1/builtins_rust/shopt/src/lib.rs index 5bf35b1..583437e 100644 --- a/bash-5.1/builtins_rust/shopt/src/lib.rs +++ b/bash-5.1/builtins_rust/shopt/src/lib.rs @@ -1082,7 +1082,7 @@ unsafe extern "C" fn toggle_shopts( list: *mut WordList, _quiet: i32, ) -> i32 { - //printf(CString::new(" set command: %s mode=%d").expect("").as_ptr() ,(*(*list).word).word, mode); + // printf(CString::new(" set command: %s mode=%d").expect("").as_ptr() ,(*(*list).word).word, mode); let mut l: *mut WordList; let mut ind:i32; let mut rval: i32; diff --git a/bash-5.1/builtins_rust/source/Cargo.toml b/bash-5.1/builtins_rust/source/Cargo.toml index 8057a26..4c5eb60 100644 --- a/bash-5.1/builtins_rust/source/Cargo.toml +++ b/bash-5.1/builtins_rust/source/Cargo.toml @@ -6,9 +6,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path ="../common"} [lib] diff --git a/bash-5.1/builtins_rust/suspend/Cargo.toml b/bash-5.1/builtins_rust/suspend/Cargo.toml index 41ba9da..b8ca888 100644 --- a/bash-5.1/builtins_rust/suspend/Cargo.toml +++ b/bash-5.1/builtins_rust/suspend/Cargo.toml @@ -12,6 +12,6 @@ name = "rsuspend" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/test/Cargo.toml b/bash-5.1/builtins_rust/test/Cargo.toml index 896228e..b4162c5 100644 --- a/bash-5.1/builtins_rust/test/Cargo.toml +++ b/bash-5.1/builtins_rust/test/Cargo.toml @@ -12,6 +12,6 @@ name = "rtest" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/times/Cargo.toml b/bash-5.1/builtins_rust/times/Cargo.toml index 3591b5a..e9e8836 100644 --- a/bash-5.1/builtins_rust/times/Cargo.toml +++ b/bash-5.1/builtins_rust/times/Cargo.toml @@ -12,6 +12,6 @@ name = "rtimes" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/trap/Cargo.toml b/bash-5.1/builtins_rust/trap/Cargo.toml index 815f91a..2405fb7 100644 --- a/bash-5.1/builtins_rust/trap/Cargo.toml +++ b/bash-5.1/builtins_rust/trap/Cargo.toml @@ -12,6 +12,6 @@ name = "rtrap" crate-type = ["staticlib","rlib"] [dependencies] -libc = "0.2" -nix = "0.23" +libc = "*" +nix = "*" rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/type/Cargo.toml b/bash-5.1/builtins_rust/type/Cargo.toml index 01ab1e9..8b98ea3 100644 --- a/bash-5.1/builtins_rust/type/Cargo.toml +++ b/bash-5.1/builtins_rust/type/Cargo.toml @@ -1,15 +1,15 @@ [package] authors = ["zhanghuanhuan"] name = "rtype" -version = "0.0.1" edition = "2018" +version = "0.0.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.23.0" +libc = "*" +nix = "*" rcommon = {path ="../common"} [lib] diff --git a/bash-5.1/builtins_rust/ulimit/Cargo.toml b/bash-5.1/builtins_rust/ulimit/Cargo.toml index 0e03d96..fd642b1 100644 --- a/bash-5.1/builtins_rust/ulimit/Cargo.toml +++ b/bash-5.1/builtins_rust/ulimit/Cargo.toml @@ -8,9 +8,9 @@ edition = "2018" [dependencies] -lazy_static = "1.4.0" -libc = "0.2" -nix = "0.23.0" +lazy_static = "*" +libc = "*" +nix = "*" rcommon = {path = "../common"} [lib] diff --git a/bash-5.1/builtins_rust/umask/Cargo.toml b/bash-5.1/builtins_rust/umask/Cargo.toml index 882c0d8..6c80951 100644 --- a/bash-5.1/builtins_rust/umask/Cargo.toml +++ b/bash-5.1/builtins_rust/umask/Cargo.toml @@ -10,9 +10,6 @@ edition = "2018" libc = "*" rcommon = {path = "../common"} - - - [lib] crate-type = ["staticlib","rlib"] name = "rumask" diff --git a/bash-5.1/builtins_rust/wait/Cargo.toml b/bash-5.1/builtins_rust/wait/Cargo.toml index f0dad29..ce4f668 100644 --- a/bash-5.1/builtins_rust/wait/Cargo.toml +++ b/bash-5.1/builtins_rust/wait/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.23.0" +libc = "*" +nix = "*" rjobs = {path = "../jobs"} rread = {path = "../read"} rcommon = {path = "../common"} diff --git a/bash-5.1/builtins_rust/wait/src/lib.rs b/bash-5.1/builtins_rust/wait/src/lib.rs index 6cf0626..d48e5d7 100644 --- a/bash-5.1/builtins_rust/wait/src/lib.rs +++ b/bash-5.1/builtins_rust/wait/src/lib.rs @@ -15,7 +15,7 @@ use rcommon::{r_builtin_unbind_variable,r_builtin_usage,r_get_job_spec,WordList} use rcommon::{ WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN}; -//结构体 +// 结构体 #[repr(C)] pub struct procstat{ pub pid:pid_t, diff --git a/bash-5.1/configure b/bash-5.1/configure index 60033ad..79ce290 100755 --- a/bash-5.1/configure +++ b/bash-5.1/configure @@ -20510,7 +20510,7 @@ fi # this should be packaged into a script accessible via ${srcdir}/support case "$srcdir" in .) ;; -*) for d in doc tests support lib examples; do # dirs +*) for d in doc tests support lib ; do # dirs test -d $d || mkdir $d done for ld in readline glob tilde malloc sh termcap; do # libdirs diff --git a/bash-5.1/execute_cmd.c b/bash-5.1/execute_cmd.c index 4325518..d1a9f1b 100644 --- a/bash-5.1/execute_cmd.c +++ b/bash-5.1/execute_cmd.c @@ -4840,7 +4840,7 @@ execute_builtin (builtin, words, flags, subshell) executing_builtin++; executing_command_builtin |= builtin == command_builtin; //result = ((*builtin) (words->next)); - result = r_exec_cmd(this_command_name,words->next); + result = r_exec_cmd(words->word->word, words->next); //r_execute_cmd2(words->next); /* This shouldn't happen, but in case `return' comes back instead of diff --git a/record.txt b/record.txt index 05996ab..e4ab3b6 100644 --- a/record.txt +++ b/record.txt @@ -72,3 +72,4 @@ 71 72 73 +74 -- Gitee