代码拉取完成,页面将自动刷新
From d4b94557da630e74bf4128d82b5cc6942225456e Mon Sep 17 00:00:00 2001
From: wangmengc <wangmengc@uniontech.com>
Date: Mon, 8 Apr 2024 15:02:35 +0800
Subject: [PATCH 1/8] =?UTF-8?q?fix=20utshell=20continue=20--help=20?=
=?UTF-8?q?=E5=92=8Ccountine=20=E5=AD=98=E5=9C=A8=E5=A4=9A=E4=BD=99?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
builtins_rust/break_1/src/lib.rs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/builtins_rust/break_1/src/lib.rs b/builtins_rust/break_1/src/lib.rs
index 9da3f71..d333247 100644
--- a/builtins_rust/break_1/src/lib.rs
+++ b/builtins_rust/break_1/src/lib.rs
@@ -13,7 +13,7 @@ use rcommon::{WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE};
use rhelp::r_builtin_help;
type intmax_t = c_long;
-/*
+
#[macro_export]
macro_rules! ISHELP {
($s:expr) => {
@@ -25,12 +25,12 @@ macro_rules! ISHELP {
macro_rules! CHECK_HELPOPT {
($l:expr) => {
if $l !=std::ptr::null_mut() && (*$l).word !=std::ptr::null_mut() && ISHELP!((*(*$l).word).word) ==0 {
- builtin_help ();
+ r_builtin_help ();
return EX_USAGE;
}
}
}
-*/
+
fn checkhelp(l: *mut WordList) -> i32 {
unsafe {
let tmp = CString::new("--help").unwrap();
@@ -64,8 +64,8 @@ pub extern "C" fn r_break_builtin(list: *mut WordList) -> i32 {
//println!("enter r_break_builtin");
let mut newbreak: intmax_t = 1 as intmax_t;
unsafe {
- checkhelp(list);
- //CHECK_HELPOPT! (list);
+ //checkhelp(list);
+ CHECK_HELPOPT! (list);
if check_loop_level() == 0 {
return EXECUTION_SUCCESS!();
}
@@ -92,8 +92,8 @@ pub extern "C" fn r_break_builtin(list: *mut WordList) -> i32 {
pub extern "C" fn r_continue_builtin(list: *mut WordList) -> i32 {
let mut newcont: intmax_t = 0 as intmax_t;
unsafe {
- //CHECK_HELPOPT! (list);
- checkhelp(list);
+ CHECK_HELPOPT! (list);
+ //checkhelp(list);
}
if check_loop_level() == 0 {
return EXECUTION_SUCCESS!();
--
2.43.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。