From dc82c6f2df0aacb1d27f08256add286a8c20d8ae Mon Sep 17 00:00:00 2001 From: wangmengc Date: Fri, 30 Jun 2023 11:00:51 +0800 Subject: [PATCH] modify transfile path --- 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 0c967670..87ccd3a0 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 f17ec7bc..75e657d0 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 9669a4d2..a77df038 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 fca9b517..deb8ab73 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 085d195e..cbdf261c 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 9301c7dc..4304ddee 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 fe503dc2..4811682b 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 56ccd745..2d92dc87 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 dea395cb..a6c28aa2 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 a40a9d12..34f16a47 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 58cadc61..d08f34ae 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 68cfd0b1..f8f4e21a 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 31720c0d..cbbe87e6 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 99eea4b4..14ec0946 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 605d3354..47a86be6 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 f44bc7e6..a84e76dc 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 70adc426..5e9a0244 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 f054950a..886c7c3c 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 07044a6d..025be6ce 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 2df677f2..c3fea4bd 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 ac14d3d0..8bb8f51a 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 e28c4b8c..484a3256 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 5d8d8f77..6c79fbb6 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 2ed0bdfa..09eb4713 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 51804e82..52119df6 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 ca0e9909..b13cb8c5 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 b52101ca..1365a552 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 6b8575a8..5968cac3 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 a437a262..33c1629d 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 90004e4d..e6ca0fe5 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 c72aedb3..f9a623de 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 5bf35b1e..583437e0 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 8057a26f..4c5eb608 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 41ba9da7..b8ca8887 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 896228ee..b4162c5c 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 3591b5ac..e9e88365 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 815f91ac..2405fb78 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 01ab1e93..8b98ea33 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 0e03d966..fd642b19 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 882c0d87..6c809514 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 f0dad29f..ce4f668d 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 6cf0626b..d48e5d7d 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 60033ad7..79ce2902 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 4325518d..d1a9f1b5 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 a20a15e7..6836ce75 100644 --- a/record.txt +++ b/record.txt @@ -48,3 +48,4 @@ 70 71 72 +73 -- Gitee