2 #include "../constant.h" 8 void FunctionBannerDelegate::reloadBannerViewForCursorOnFunction(
CurveViewCursor * cursor,
Function *
function,
char symbol) {
10 const char * space =
" ";
11 int spaceLength =
strlen(space);
12 const char * legend =
"0=";
13 int legendLength =
strlen(legend);
15 strlcpy(buffer, legend, legendLength+1);
16 numberOfChar += legendLength;
19 strlcpy(buffer+numberOfChar, space, spaceLength+1);
20 buffer[k_maxDigitLegendLength+2] = 0;
21 bannerView()->setLegendAtIndex(buffer, 0);
25 legendLength =
strlen(legend);
26 numberOfChar += legendLength;
27 strlcpy(buffer, legend, legendLength+1);
29 buffer[0] =
function->name()[0];
31 strlcpy(buffer+numberOfChar, space, spaceLength+1);
32 buffer[k_maxDigitLegendLength+5] = 0;
33 bannerView()->setLegendAtIndex(buffer, 1);
static constexpr int MediumNumberOfSignificantDigits
size_t strlcpy(char *dst, const char *src, size_t len)
size_t strlen(const char *s)
static constexpr int LargeNumberOfSignificantDigits