The routine SetClockMessage() now copies the message of the other clock
when it gets passed an empty string. To erase a message, we must pass
a NULL argument.
void
SetClockMessage (int n, char *msg)
{
- safeStrCpy(clockMsg[n], msg, MSG_SIZ);
+ safeStrCpy(clockMsg[n], !msg ? "" : *msg ? msg : clockMsg[!n], MSG_SIZ);
}
//---------------------------------------------
void\r
SetClockMessage (int color, char *msg)\r
{\r
- safeStrCpy(clockMsg[n], msg, MSG_SIZ);\r
+ safeStrCpy(clockMsg[n], !msg ? "" : *msg ? msg : clockMsg[!n], MSG_SIZ);\r
}\r
\r
int\r