diff --git a/utshell-0.5/r_expr/src/lib.rs b/utshell-0.5/r_expr/src/lib.rs index 68462352b6b68f139051653fa05af96484e97e80..a640b557acc9f81bded122288a970c270c6c7b60 100644 --- a/utshell-0.5/r_expr/src/lib.rs +++ b/utshell-0.5/r_expr/src/lib.rs @@ -1205,4 +1205,34 @@ unsafe extern "C" fn pushexp() { expr_depth = expr_depth + 1; let ref mut fresh5 = *expr_stack.offset(fresh4 as isize); *fresh5 = context; +} + +#[no_mangle] +unsafe extern "C" fn popexp() { + let mut context: *mut EXPR_CONTEXT = 0 as *mut EXPR_CONTEXT; + if expr_depth <= 0 as libc::c_int { + lasttp = 0 as *mut libc::c_char; + expression = lasttp; + evalerror(dcgettext( + 0 as *const libc::c_char, + b"recursion stack underflow\0" as *const u8 as *const libc::c_char, + 5 as libc::c_int, + )); + } + expr_depth -= 1; + context = *expr_stack.offset(expr_depth as isize); + expression = (*context).expression; + curtok = (*context).curtok; + lasttok = (*context).lasttok; + tp = (*context).tp; + lasttp = (*context).lasttp; + tokval = (*context).tokval; + tokstr = (*context).tokstr; + noeval = (*context).noeval; + curlval = (*context).lval; + sh_xfree( + context as *mut libc::c_void, + b"../expr.c\0" as *const u8 as *const libc::c_char, + 299 as libc::c_int, + ); } \ No newline at end of file