rem: pos = sprintf(buf, " %2d:%02d%s  ", realtime->tm_hour%12 ? realtime->tm_hour%12 : 12, realtime->tm_min, realtime->tm_hour > 11 ? "pm" : "am");
add: pos = sprintf(buf, " %02d:%02d:%02d ", realtime->tm_hour, realtime->tm_min, realtime->tm_sec);
context: char *sprint_uptime(void) {  struct utmp *utmpstruct;  int upminutes, uphours, updays;  int pos;  struct tm *realtime;  time_t realseconds;  int numuser;  double uptime_secs, idle_secs;/* first get the current time */  time(&realseconds);  realtime = localtime(&realseconds);  pos = sprintf(buf, " %2d:%02d%s  ",		realtime->tm_hour%12 ? realtime->tm_hour%12 : 12,		realtime->tm_min, realtime->tm_hour > 11 ? "pm" : "am");/* read and calculate the amount of uptime */  uptime(&uptime_secs, &idle_secs);  updays = (int) uptime_secs / (60*60*24);  strcat (buf, "up ");  pos += 3;  if (updays)    pos += sprintf(buf + pos, "%d day%s, ", updays, (updays != 1) ? "s" : "");  upminutes = (int) uptime_secs / 60;  uphours = upminutes / 60;  uphours = uphours % 24;  upminutes = upminutes % 60;  if(uphours)    pos += sprintf(buf + pos, "%2d:%02d, ", uphours, upminutes);  else    pos += sprintf(buf + pos, "%d min, ", upminutes);/* count the number of users */  numuser = 0;  setutent();  while ((utmpstruct = getutent())) {    if ((utmpstruct->ut_type == USER_PROCESS) &&       (utmpstruct->ut_name[0] != '\0'))      numuser++;  }  endutent();  pos += sprintf(buf + pos, "%2d user%s, ", numuser, numuser == 1 ? "" : "s");  loadavg(&av[0], &av[1], &av[2]);  pos += sprintf(buf + pos, " load average: %.2f, %.2f, %.2f",		 av[0], av[1], av[2]);  return buf;}