From 537899b8a63adf88d442790b4cf6a38edd9288d9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 6 Sep 2019 21:56:22 +0300 Subject: [PATCH] shell/arithm: strip mrsh_ prefix for static functions The mrsh_ prefix is reserved for exported, public functions. --- shell/arithm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/shell/arithm.c b/shell/arithm.c index 8d78d7f..86ea19a 100644 --- a/shell/arithm.c +++ b/shell/arithm.c @@ -1,7 +1,7 @@ #include #include -static bool mrsh_run_arithm_binop(struct mrsh_state *state, +static bool run_arithm_binop(struct mrsh_state *state, struct mrsh_arithm_binop *binop, long *result) { long left, right; if (!mrsh_run_arithm_expr(state, binop->left, &left)) { @@ -69,7 +69,7 @@ static bool mrsh_run_arithm_binop(struct mrsh_state *state, assert(false); // Unknown binary arithmetic operation } -static bool mrsh_run_arithm_unop(struct mrsh_state *state, +static bool run_arithm_unop(struct mrsh_state *state, struct mrsh_arithm_unop *unop, long *result) { long val; if (!mrsh_run_arithm_expr(state, unop->body, &val)) { @@ -92,7 +92,7 @@ static bool mrsh_run_arithm_unop(struct mrsh_state *state, assert(false); // Unknown unary arithmetic operation } -static bool mrsh_run_arithm_cond(struct mrsh_state *state, +static bool run_arithm_cond(struct mrsh_state *state, struct mrsh_arithm_cond *cond, long *result) { long condition; if (!mrsh_run_arithm_expr(state, cond->condition, &condition)) { @@ -121,15 +121,15 @@ bool mrsh_run_arithm_expr(struct mrsh_state *state, case MRSH_ARITHM_BINOP:; struct mrsh_arithm_binop *binop = (struct mrsh_arithm_binop *)expr; - return mrsh_run_arithm_binop(state, binop, result); + return run_arithm_binop(state, binop, result); case MRSH_ARITHM_UNOP:; struct mrsh_arithm_unop *unop = (struct mrsh_arithm_unop *)expr; - return mrsh_run_arithm_unop(state, unop, result); + return run_arithm_unop(state, unop, result); case MRSH_ARITHM_COND:; struct mrsh_arithm_cond *cond = (struct mrsh_arithm_cond *)expr; - return mrsh_run_arithm_cond(state, cond, result); + return run_arithm_cond(state, cond, result); default: // TODO *result = 42; -- 2.38.5