aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/bc.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index ee05cd4b4..7c88a4ba0 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -802,14 +802,14 @@ static BcStatus bc_program_reset(BcStatus s);
802#define BC_MAX(a, b) ((a) > (b) ? (a) : (b)) 802#define BC_MAX(a, b) ((a) > (b) ? (a) : (b))
803#define BC_MIN(a, b) ((a) < (b) ? (a) : (b)) 803#define BC_MIN(a, b) ((a) < (b) ? (a) : (b))
804 804
805#define BC_MAX_OBASE ((unsigned long) 999) 805#define BC_MAX_OBASE ((unsigned) 999)
806#define BC_MAX_DIM ((unsigned long) INT_MAX) 806#define BC_MAX_DIM ((unsigned) INT_MAX)
807#define BC_MAX_SCALE ((unsigned long) UINT_MAX) 807#define BC_MAX_SCALE ((unsigned) UINT_MAX)
808#define BC_MAX_STRING ((unsigned long) UINT_MAX - 1) 808#define BC_MAX_STRING ((unsigned) UINT_MAX - 1)
809#define BC_MAX_NAME BC_MAX_STRING 809#define BC_MAX_NAME BC_MAX_STRING
810#define BC_MAX_NUM BC_MAX_STRING 810#define BC_MAX_NUM BC_MAX_STRING
811#define BC_MAX_EXP ((unsigned long) LONG_MAX) 811#define BC_MAX_EXP ((unsigned long) LONG_MAX)
812#define BC_MAX_VARS ((unsigned long) SIZE_MAX - 1) 812#define BC_MAX_VARS ((unsigned long) SIZE_MAX - 1)
813 813
814struct globals { 814struct globals {
815 char sbgn; 815 char sbgn;
@@ -6956,16 +6956,14 @@ static BcStatus bc_vm_process(const char *text)
6956 6956
6957 if (s == BC_STATUS_LIMITS) { 6957 if (s == BC_STATUS_LIMITS) {
6958 6958
6959 bb_putchar('\n'); 6959 printf("BC_BASE_MAX = %u\n", BC_MAX_OBASE);
6960 printf("BC_BASE_MAX = %lu\n", BC_MAX_OBASE); 6960 printf("BC_DIM_MAX = %u\n", BC_MAX_DIM);
6961 printf("BC_DIM_MAX = %lu\n", BC_MAX_DIM); 6961 printf("BC_SCALE_MAX = %u\n", BC_MAX_SCALE);
6962 printf("BC_SCALE_MAX = %lu\n", BC_MAX_SCALE); 6962 printf("BC_STRING_MAX = %u\n", BC_MAX_STRING);
6963 printf("BC_STRING_MAX = %lu\n", BC_MAX_STRING); 6963 printf("BC_NAME_MAX = %u\n", BC_MAX_NAME);
6964 printf("BC_NAME_MAX = %lu\n", BC_MAX_NAME); 6964 printf("BC_NUM_MAX = %u\n", BC_MAX_NUM);
6965 printf("BC_NUM_MAX = %lu\n", BC_MAX_NUM); 6965 printf("MAX Exponent = %lu\n", BC_MAX_EXP);
6966 printf("Max Exponent = %lu\n", BC_MAX_EXP); 6966 printf("Number of vars = %lu\n", BC_MAX_VARS);
6967 printf("Number of Vars = %lu\n", BC_MAX_VARS);
6968 bb_putchar('\n');
6969 6967
6970 s = BC_STATUS_SUCCESS; 6968 s = BC_STATUS_SUCCESS;
6971 } 6969 }