diff --git a/bash-5.1/Cargo.toml b/bash-5.1/Cargo.toml index 0c967670afade1c367ba5e87fb5f37d845513d73..87ccd3a0269ba34196c9eb01287cb92d0d552724 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 f17ec7bc7ccdd782a69ed1e1576323af65410484..75e657d0b40b89a5bcc47076bb4339e1117c74ed 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 9669a4d24c97587fd3247ddf9363184d2ae6761e..a77df038a1a33ddfed9bc6875b7b4b42588eee9c 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 fca9b51799b3b99849988d7419c20ab10b87f0c3..deb8ab73a7373247f8be1415c40231f9517f1bbd 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 085d195ef9744a42dd817b5640401c107e756e1a..cbdf261c26fa9b3066938b47a33b3ad94edfa3eb 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 9301c7dcd009457302aecbbd303f57108b28af44..4304ddeedbaee7f115c400195bac1a5930b2d153 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 fe503dc2606224a8ce54bde544d86a1f3678b4a7..4811682b59310cb60631ff6b304fb59fb3b48cd2 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 56ccd74535501fa2928fcedfe648cd6c4844f322..2d92dc876cabfc2af756ae5b00e5584b38c84052 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 dea395cb1e76818296846d5df4879168459a2ebf..a6c28aa2ca663a9dd3bbd7750a8887b79e464a91 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 a40a9d122725a3b659a401b104b5885ca847819c..34f16a47c134f5b6771bccaee4715784be2cdd03 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 58cadc61ad0fe38c3f24970e3db1b71c1547f779..d08f34aed9cda5335e45735d3e672f5f21db7973 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 68cfd0b1429c69bd82cbf68b15302c9e4f8e3a35..f8f4e21a9e319efd758d7c10cb50741aa237a371 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 31720c0d70bb621d272e1c95ec14127a5a2409a6..cbbe87e6bd083eab7b1a34b65679f181f2e13e5e 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 99eea4b48a118a854ce5cf192719308c5ec03094..14ec0946031567d4846a464dbb23992d3b32b425 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 605d33545c2b0138b6862251db45e62983a729e1..47a86be61eb7d1787b77185b6856431c752d2733 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 f44bc7e663a183e069bb1968dc1db43e78633f55..a84e76dcd39ea0ca11fb3271fe77b83c0b426696 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 70adc426c5f91082b9ff482832455a387cb88615..5e9a0244b41277f1d96d296b3aa1ed8ab84ccfe0 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 f054950a21edec34b603af084ca97ce030396c01..886c7c3c15cf1aea74387ea172a75369abb08586 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 07044a6db5506a590511a5bebacd6e1607c72e6d..025be6ceca2b6155434e390f566d6264c881f341 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 2df677f23edfcb68a26f143b39699c834a3968c6..c3fea4bde4ddd2780ac95d52f94cff8bd56d718d 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 ac14d3d0a927bfc09553a6bf07b06c20eb68ddcc..8bb8f51a205d33984c3c69d88ea540b82dd05b73 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 e28c4b8ce1fe226516ca045ba494ffc453b1f887..484a3256b215325f612623436575a9e71c38e121 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 5d8d8f77669adb2eb9783c1290955eed901f42b4..6c79fbb6e19cb82d7f52f251d50c90f4ac7379bd 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 2ed0bdfafee90fc97a52f81d6c3a116b069e2ce9..09eb47134d19e0d319fd27f87a6e8e30fcb3b16c 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 51804e8276869208463dd1bd909ba1f634b97dda..52119df6ec14bace7ea2634f16f7e2fd44701c1f 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 ca0e9909841698840e002aebd7733eb99e987345..b13cb8c54e35abdac56d5ad70baf65b80192005f 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 b52101cab52d92ce7b9ddb1a90791237124ba2a3..1365a55247a938be4ff0575acb81d94fa0cf9ff3 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 6b8575a8e8694d8d8b2280914374c42f646e8b2e..5968cac365fa37dcf5e4bf9047257fe1775923ab 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 a437a2628cf64df7f2f97f6a8de50e845c9dc751..33c1629de190ce1b91c86af9c83ce55f17f56e62 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 90004e4d728755daf4f9b44e5dc3c405edc7d9ad..e6ca0fe5659c3a71b5d26e2b8d4c5705118d9d73 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 c72aedb3f71d757455401d72a53503e12c874731..f9a623de147e2376fc1861004c6af34ac772d6e8 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 5bf35b1e379d328b325a5eef606d3efb649bba2a..583437e06a5fa881eaced378e9810bdd9228d71b 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 8057a26f1cf24c6ac5234872cfda8f05b185dd84..4c5eb608a35e465da59e6861758f8b292a39a15d 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 41ba9da7633cfbc8238eda01e21536c8b941aec7..b8ca88879f8cf99844d2143b43d29e6ccaaaaf1b 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 896228eeb95fe81414bd845dc12637701c8e0e8a..b4162c5c51b96c49c7b9f7d38c6dd79546ebe0af 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 3591b5ac4924e9a503ce5516493505a855f071a8..e9e88365913ec6c2da98f091a4bd15406a639911 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 815f91ac89cf19e48667be9c90724a0177535e03..2405fb780be55fdecbb10a3d75b549255d416087 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 01ab1e935ed02420cc68410c9e3c1359a8db177c..8b98ea33e5d27d8a7321244f05cf14c8108e6c3e 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 0e03d966d164e20d4ae41f9ada30774a16fe745d..fd642b1932b2c45d874af2297d5432a6b9bf0ea9 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 882c0d870835922fc0baa17a53043786d28d3a64..6c809514a88c3d42007ca5c63b5d0bc728c5931f 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 f0dad29f5ccf3302dd27a63b08aa4558a1254a82..ce4f668da1789135b7f7a575c09885f68fe3b9e1 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 6cf0626b7657b72ecaa7e6c093ecd93427ac3186..d48e5d7d8f6a44ab1a6401d6ae2d6e1d9c887013 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 60033ad767675212e04926c7d22de1b97909c38b..79ce29024eb765402cd99b22a8c77ae87e7755d8 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 4325518d75bbfc9ac604349b870632d486444c41..d1a9f1b5d217d7be3e2faf44e54866bafba1b223 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 a20a15e75eb969e1bd5b52f656c0bdbfc3db2d3d..6836ce751ccadca70261c8dd20204b5932d15bef 100644 --- a/record.txt +++ b/record.txt @@ -48,3 +48,4 @@ 70 71 72 +73