4 const char *SecsToStr(unsigned long Secs)
\r
13 sprintf(Str, "%02d:%02d:%02d", hh, mm, ss);
\r
17 const char *BoolToStr(bool b)
\r
19 return b ? "True" : "False";
\r
22 const char *ScoreToStr(SCORE Score)
\r
24 if (MINUS_INFINITY >= Score)
\r
26 // Hack to use "circular" buffer so when called multiple
\r
27 // times in a printf-like argument list it works OK.
\r
28 const int iBufferCount = 16;
\r
29 const int iBufferLength = 16;
\r
30 static char szStr[iBufferCount*iBufferLength];
\r
31 static int iBufferIndex = 0;
\r
32 iBufferIndex = (iBufferIndex + 1)%iBufferCount;
\r
33 char *pStr = szStr + iBufferIndex*iBufferLength;
\r
34 sprintf(pStr, "%8g", Score);
\r
38 // Left-justified version of ScoreToStr
\r
39 const char *ScoreToStrL(SCORE Score)
\r
41 if (MINUS_INFINITY >= Score)
\r
43 // Hack to use "circular" buffer so when called multiple
\r
44 // times in a printf-like argument list it works OK.
\r
45 const int iBufferCount = 16;
\r
46 const int iBufferLength = 16;
\r
47 static char szStr[iBufferCount*iBufferLength];
\r
48 static int iBufferIndex = 0;
\r
49 iBufferIndex = (iBufferIndex + 1)%iBufferCount;
\r
50 char *pStr = szStr + iBufferIndex*iBufferLength;
\r
51 sprintf(pStr, "%.3g", Score);
\r
55 const char *WeightToStr(WEIGHT w)
\r
57 return ScoreToStr(w);
\r