sync code with last improvements from OpenBSD
This commit is contained in:
parent
e5a8beb33e
commit
2ec21d9c19
205 changed files with 4715 additions and 23023 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: bt_parse.y,v 1.53 2023/09/11 19:01:26 mpi Exp $ */
|
||||
/* $OpenBSD: bt_parse.y,v 1.54 2023/10/12 15:16:44 cheloha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019-2023 Martin Pieuchot <mpi@openbsd.org>
|
||||
|
@ -184,7 +184,7 @@ filter : /* empty */ { $$ = NULL; }
|
|||
* Give higher precedence to:
|
||||
* 1. && and ||
|
||||
* 2. ==, !=, <<, <, >=, >, +, =, &, ^, |
|
||||
* 3. * and /
|
||||
* 3. *, /, %
|
||||
*/
|
||||
expr : expr OP_LAND term { $$ = ba_op(B_AT_OP_LAND, $1, $3); }
|
||||
| expr OP_LOR term { $$ = ba_op(B_AT_OP_LOR, $1, $3); }
|
||||
|
@ -207,6 +207,7 @@ term : term OP_EQ fterm { $$ = ba_op(B_AT_OP_EQ, $1, $3); }
|
|||
|
||||
fterm : fterm '*' factor { $$ = ba_op(B_AT_OP_MULT, $1, $3); }
|
||||
| fterm '/' factor { $$ = ba_op(B_AT_OP_DIVIDE, $1, $3); }
|
||||
| fterm '%' factor { $$ = ba_op(B_AT_OP_MODULO, $1, $3); }
|
||||
| factor
|
||||
;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: bt_parser.h,v 1.24 2023/09/11 19:01:26 mpi Exp $ */
|
||||
/* $OpenBSD: bt_parser.h,v 1.25 2023/10/12 15:16:44 cheloha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019-2021 Martin Pieuchot <mpi@openbsd.org>
|
||||
|
@ -163,6 +163,7 @@ struct bt_arg {
|
|||
B_AT_OP_MINUS,
|
||||
B_AT_OP_MULT,
|
||||
B_AT_OP_DIVIDE,
|
||||
B_AT_OP_MODULO,
|
||||
B_AT_OP_BAND,
|
||||
B_AT_OP_XOR,
|
||||
B_AT_OP_BOR,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: btrace.c,v 1.78 2023/09/15 10:59:02 claudio Exp $ */
|
||||
/* $OpenBSD: btrace.c,v 1.79 2023/10/12 15:16:44 cheloha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2019 - 2023 Martin Pieuchot <mpi@openbsd.org>
|
||||
|
@ -1416,6 +1416,9 @@ baexpr2long(struct bt_arg *ba, struct dt_evt *dtev)
|
|||
case B_AT_OP_DIVIDE:
|
||||
result = lval / rval;
|
||||
break;
|
||||
case B_AT_OP_MODULO:
|
||||
result = lval % rval;
|
||||
break;
|
||||
case B_AT_OP_BAND:
|
||||
result = lval & rval;
|
||||
break;
|
||||
|
@ -1526,6 +1529,8 @@ ba_name(struct bt_arg *ba)
|
|||
return "*";
|
||||
case B_AT_OP_DIVIDE:
|
||||
return "/";
|
||||
case B_AT_OP_MODULO:
|
||||
return "%";
|
||||
case B_AT_OP_BAND:
|
||||
return "&";
|
||||
case B_AT_OP_XOR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue