mirror of
https://github.com/jeremysrand/abCalc.git
synced 2024-12-27 21:29:22 +00:00
48 lines
646 B
C
48 lines
646 B
C
/*
|
|
abCMode.c
|
|
By: Jeremy Rand
|
|
*/
|
|
|
|
|
|
#include "abCMode.h"
|
|
|
|
|
|
|
|
static abCalcModeIntBase gBase = abCalcModeDecBase;
|
|
static int gIntWidth = AB_CALC_EXPR_MAX_INT_WIDTH;
|
|
|
|
|
|
void abCalcModeInit(void)
|
|
{
|
|
}
|
|
|
|
|
|
abCalcModeIntBase abCalcModeGetBase(void)
|
|
{
|
|
return gBase;
|
|
}
|
|
|
|
|
|
void abCalcModeSetBase(abCalcModeIntBase base)
|
|
{
|
|
if ((base >= abCalcModeIntBaseMin) &&
|
|
(base < abCalcModeIntBaseMax)) {
|
|
gBase = base;
|
|
}
|
|
}
|
|
|
|
|
|
int abCalcModeGetIntWidth(void)
|
|
{
|
|
return gIntWidth;
|
|
}
|
|
|
|
|
|
void abCalcModeSetIntWidth(int width)
|
|
{
|
|
if ((width > 0) &&
|
|
(width <= AB_CALC_EXPR_MAX_INT_WIDTH)) {
|
|
gIntWidth = width;
|
|
}
|
|
}
|