Clean up headers by using 'static' whenever possible.

Reduces resulting code size.
This commit is contained in:
Hisham Muhammad
2008-03-09 08:58:38 +00:00
parent 12f4f09e6e
commit da23c8c5a1
64 changed files with 687 additions and 934 deletions

View File

@ -16,6 +16,13 @@ int ClockMeter_attributes[] = {
CLOCK
};
static void ClockMeter_setValues(Meter* this, char* buffer, int size) {
time_t t = time(NULL);
struct tm *lt = localtime(&t);
this->values[0] = lt->tm_hour * 60 + lt->tm_min;
strftime(buffer, size, "%H:%M:%S", lt);
}
MeterType ClockMeter = {
.setValues = ClockMeter_setValues,
.display = NULL,
@ -27,10 +34,3 @@ MeterType ClockMeter = {
.uiName = "Clock",
.caption = "Time: ",
};
void ClockMeter_setValues(Meter* this, char* buffer, int size) {
time_t t = time(NULL);
struct tm *lt = localtime(&t);
this->values[0] = lt->tm_hour * 60 + lt->tm_min;
strftime(buffer, size, "%H:%M:%S", lt);
}