/********************************************************************* * * GUI_DispSDecShift */ void GUI_DispSDecShift(I32 v, U8 Len, U8 Shift) { char ac[12]; char* s = ac; v = GUI_AddSign(v, &s); GUI_AddDecShift(v, --Len, Shift, &s); GUI_DispString(ac); }
static void _UpdateBuffer(EDIT_Obj* pObj) { char * s = (char*) WM_HMEM2Ptr(pObj->hpText); if (pObj->Flags == GUI_EDIT_SIGNED) { I32 Result = GUI_AddSign(pObj->CurrentValue, &s); GUI_AddDecShift(Result, pObj->MaxLen - 1, pObj->NumDecs, &s); } else { GUI_AddDecShift(pObj->CurrentValue, pObj->MaxLen, pObj->NumDecs, &s); } }
/********************************************************************* * * _UpdateBuffer */ static void _UpdateBuffer(EDIT_Handle hObj) { char * s; EDIT_Obj * pObj; pObj = EDIT_H2P(hObj); /* The GUI needs not to be locked here. This function is called only from EDIT_AddKey which has already locked the GUI */ s = (char*) GUI_ALLOC_h2p(pObj->hpText); if (pObj->Flags == GUI_EDIT_SIGNED) { I32 Result = GUI_AddSign(pObj->CurrentValue, &s); GUI_AddDecShift(Result, pObj->MaxLen - 1, pObj->NumDecs, &s); } else { GUI_AddDecShift(pObj->CurrentValue, pObj->MaxLen, pObj->NumDecs, &s); } }
/********************************************************************* * * GUI_DispDecSpace */ void GUI_DispDecSpace(I32 v, U8 MaxDigits) { char ac[12]; char* s = ac; U8 Len; if (v < 0) { v = GUI_AddSign(v, &s); MaxDigits--; } Len = GUI_Long2Len(v); while (Len++ < MaxDigits) { *s++ = ' '; } GUI_AddDecMin(v, &s); GUI_DispString(ac); }