+
+ stack->perror_flag = perror_flag;
+}
+
+static void op_stack_set_error(op_stack_t *stack) {
+ *(stack->perror_flag) = true;
+#if BC_ESCAPE_VERBOSE
+ printf("%s: error.\n", __FUNCTION__);
+#endif
+}
+
+static bool op_stack_test_position(op_stack_t *stack, op_stack_slot_t *pos) {
+ if (!(stack->elements <= pos)) {
+ op_stack_set_error(stack);
+ return false;
+ } else if (!(pos < stack->end)) {
+ op_stack_set_error(stack);
+ return false;
+ } else {
+ return true;
+ }