-/* $OpenBSD: bcode.c,v 1.52 2017/11/27 21:32:33 tom Exp $ */
+/* $OpenBSD: bcode.c,v 1.53 2017/11/28 08:03:01 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
static void less_numbers(void);
static void lesseq_numbers(void);
static void equal(void);
-static void not_equal(void);
static void less(void);
-static void not_less(void);
static void greater(void);
-static void not_greater(void);
static void not_compare(void);
static bool compare_numbers(enum bcode_compare, struct number *,
struct number *);
negate(p);
rscale = bmachine.scale;
} else {
- /* Posix bc says min(a.scale * b, max(a.scale, scale) */
+ /* Posix bc says min(a.scale * b, max(a.scale, scale)) */
u_long b;
u_int m;
push_number(r);
}
-static void
-not_equal(void)
-{
- compare(BCODE_NOT_EQUAL);
-}
-
static void
less(void)
{
{
switch (readch()) {
case '<':
- not_less();
+ compare(BCODE_NOT_LESS);
break;
case '>':
- not_greater();
+ compare(BCODE_NOT_GREATER);
break;
case '=':
- not_equal();
+ compare(BCODE_NOT_EQUAL);
break;
default:
unreadch();
- (void)fprintf(stderr, "! command is deprecated\n");
+ warnx("! command is deprecated\n");
break;
}
}
-static void
-not_less(void)
-{
- compare(BCODE_NOT_LESS);
-}
-
static void
greater(void)
{
compare(BCODE_GREATER);
}
-static void
-not_greater(void)
-{
- compare(BCODE_NOT_GREATER);
-}
-
static bool
compare_numbers(enum bcode_compare type, struct number *a, struct number *b)
{