Lines 73-79
Link Here
|
73 |
date[8] = '\0'; |
73 |
date[8] = '\0'; |
74 |
strncpy(time, &buffer[53], 8); |
74 |
strncpy(time, &buffer[53], 8); |
75 |
time[8] = '\0'; |
75 |
time[8] = '\0'; |
76 |
if (date[0] == '1') { |
76 |
if (date[3] == '-') { |
77 |
for(int i=1; i<8; i++) { |
77 |
for(int i=1; i<8; i++) { |
78 |
date[i-1] = date[i]; |
78 |
date[i-1] = date[i]; |
79 |
} |
79 |
} |
Lines 372-383
Link Here
|
372 |
time_t t; |
372 |
time_t t; |
373 |
struct tm *tp; |
373 |
struct tm *tp; |
374 |
struct passwd *pw; |
374 |
struct passwd *pw; |
375 |
char namebuf[128], myname[NAMELEN+1], gecos[128], *po; |
375 |
char namebuf[NBUFLEN+1], myname[NAMELEN+1], gecos[GECOSLEN+1], *po; |
376 |
|
376 |
|
377 |
s1 = scoreToRegister / 1000; |
377 |
s1 = scoreToRegister / 1000; |
378 |
ms_to_hms(scoreToRegister, h, m, s); |
378 |
ms_to_hms(scoreToRegister, h, m, s); |
379 |
pw = getpwuid(getuid()); |
379 |
pw = getpwuid(getuid()); |
380 |
strcpy(gecos, pw->pw_gecos); |
380 |
strncpy(gecos, pw->pw_gecos, GECOSLEN); |
381 |
if ((po = strchr(gecos, ',')) != NULL) |
381 |
if ((po = strchr(gecos, ',')) != NULL) |
382 |
*po = 0; |
382 |
*po = 0; |
383 |
sprintf(namebuf, "%-8.8s (%s)", pw->pw_name, gecos); |
383 |
sprintf(namebuf, "%-8.8s (%s)", pw->pw_name, gecos); |