Changeset 132 for trunk/src/sh_hash.c
- Timestamp:
- Oct 23, 2007, 11:44:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_hash.c
r131 r132 1404 1404 1405 1405 char timestring[81]; 1406 char * timep;1407 1406 1408 1407 #if !defined(__linux__) && !defined(HAVE_STAT_FLAGS) … … 1706 1705 sl_strlen(sh_db_version_string)); 1707 1706 sl_write (pushdata_fd, _(" Date "), 6); 1708 timep = sh_unix_time(0); 1709 sl_strlcpy(timestring, timep, sizeof(timestring)); 1707 (void) sh_unix_time(0, timestring, sizeof(timestring)); 1710 1708 sl_write (pushdata_fd, timestring, sl_strlen(timestring)); 1711 1709 sl_write (pushdata_fd, "\n", 1); … … 1716 1714 printf ("%s", sh_db_version_string); 1717 1715 printf (_(" Date ")); 1718 timep = sh_unix_time(0); 1719 sl_strlcpy(timestring, timep, sizeof(timestring)); 1716 (void) sh_unix_time(0, timestring, sizeof(timestring)); 1720 1717 printf ("%s\n", timestring); 1721 1718 } … … 2343 2340 2344 2341 2345 sl_strlcpy (timstr1c, sh_unix_gmttime (theFile->ctime), 32);2342 (void) sh_unix_gmttime (theFile->ctime, timstr1c, sizeof(timstr1c)); 2346 2343 if (is_new) 2347 2344 sl_snprintf(tmp, SH_BUFSIZE, _("ctime_new=\"%s\" "), timstr1c); … … 2350 2347 sl_strlcat(msg, tmp, SH_BUFSIZE); 2351 2348 2352 sl_strlcpy (timstr1a, sh_unix_gmttime (theFile->atime), 32);2349 (void) sh_unix_gmttime (theFile->atime, timstr1a, sizeof(timstr1a)); 2353 2350 if (is_new) 2354 2351 sl_snprintf(tmp, SH_BUFSIZE, _("atime_new=\"%s\" "), timstr1a); … … 2357 2354 sl_strlcat(msg, tmp, SH_BUFSIZE); 2358 2355 2359 sl_strlcpy (timstr1m, sh_unix_gmttime (theFile->mtime), 32);2356 (void) sh_unix_gmttime (theFile->mtime, timstr1m, sizeof(timstr1m)); 2360 2357 if (is_new) 2361 2358 sl_snprintf(tmp, SH_BUFSIZE, _("mtime_new=\"%s\" "), timstr1m); … … 2509 2506 2510 2507 2511 sl_strlcpy (timstr1c, sh_unix_gmttime (theFile->ctime), 32);2508 (void) sh_unix_gmttime (theFile->ctime, timstr1c, sizeof(timstr1c)); 2512 2509 if (is_new) 2513 2510 sl_snprintf(tmp, SH_BUFSIZE, _("ctime_new=<%s>, "), timstr1c); … … 2516 2513 sl_strlcat(msg, tmp, SH_BUFSIZE); 2517 2514 2518 sl_strlcpy (timstr1a, sh_unix_gmttime (theFile->atime), 32);2515 (void) sh_unix_gmttime (theFile->atime, timstr1a, sizeof(timstr1a)); 2519 2516 if (is_new) 2520 2517 sl_snprintf(tmp, SH_BUFSIZE, _("atime_new=<%s>, "), timstr1a); … … 2523 2520 sl_strlcat(msg, tmp, SH_BUFSIZE); 2524 2521 2525 sl_strlcpy (timstr1m, sh_unix_gmttime (theFile->mtime), 32);2522 (void) sh_unix_gmttime (theFile->mtime, timstr1m, sizeof(timstr1m)); 2526 2523 if (is_new) 2527 2524 sl_snprintf(tmp, SH_BUFSIZE, _("mtime_new=<%s>, "), timstr1m); … … 3145 3142 if ((modi_mask & MODI_CTM) != 0) 3146 3143 { 3147 sl_strlcpy (timstr1c, sh_unix_gmttime (p->theFile.ctime), 32);3148 sl_strlcpy (timstr2c, sh_unix_gmttime (theFile->ctime), 32);3144 (void) sh_unix_gmttime (p->theFile.ctime, timstr1c, sizeof(timstr1c)); 3145 (void) sh_unix_gmttime (theFile->ctime, timstr2c, sizeof(timstr2c)); 3149 3146 #ifdef SH_USE_XML 3150 3147 sl_snprintf(tmp, SH_BUFSIZE, _("ctime_old=\"%s\" ctime_new=\"%s\" "), … … 3163 3160 if ((modi_mask & MODI_ATM) != 0) 3164 3161 { 3165 sl_strlcpy (timstr1a, sh_unix_gmttime (p->theFile.atime), 32);3166 sl_strlcpy (timstr2a, sh_unix_gmttime (theFile->atime), 32);3162 (void) sh_unix_gmttime (p->theFile.atime, timstr1a, sizeof(timstr1a)); 3163 (void) sh_unix_gmttime (theFile->atime, timstr2a, sizeof(timstr2a)); 3167 3164 #ifdef SH_USE_XML 3168 3165 sl_snprintf(tmp, SH_BUFSIZE, _("atime_old=\"%s\" atime_new=\"%s\" "), … … 3181 3178 if ((modi_mask & MODI_MTM) != 0) 3182 3179 { 3183 sl_strlcpy (timstr1m, sh_unix_gmttime (p->theFile.mtime), 32);3184 sl_strlcpy (timstr2m, sh_unix_gmttime (theFile->mtime), 32);3180 (void) sh_unix_gmttime (p->theFile.mtime, timstr1m, sizeof(timstr1m)); 3181 (void) sh_unix_gmttime (theFile->mtime, timstr2m, sizeof(timstr2m)); 3185 3182 #ifdef SH_USE_XML 3186 3183 sl_snprintf(tmp, SH_BUFSIZE, _("mtime_old=\"%s\" mtime_new=\"%s\" "), … … 3579 3576 3580 3577 if ('c' == p->theFile.c_mode[0] || 'b' == p->theFile.c_mode[0]) 3581 sl_snprintf(str, 80, "%"PRIu64, p->theFile.rdev);3582 else 3583 sl_snprintf(str, 80, "%"PRIu64, p->theFile.size);3578 sl_snprintf(str, sizeof(str), "%"PRIu64, p->theFile.rdev); 3579 else 3580 sl_snprintf(str, sizeof(str), "%"PRIu64, p->theFile.size); 3584 3581 3585 3582 printf( _(" %8s"), str); … … 3587 3584 putchar(','); 3588 3585 3589 printf( _(" %s"), sh_unix_gmttime (p->theFile.ctime ));3586 printf( _(" %s"), sh_unix_gmttime (p->theFile.ctime, str, sizeof(str))); 3590 3587 if (ListWithDelimiter == S_TRUE) 3591 3588 putchar(','); 3592 printf( _(" %s"), sh_unix_gmttime (p->theFile.mtime ));3589 printf( _(" %s"), sh_unix_gmttime (p->theFile.mtime, str, sizeof(str))); 3593 3590 if (ListWithDelimiter == S_TRUE) 3594 3591 putchar(','); 3595 printf( _(" %s"), sh_unix_gmttime (p->theFile.atime ));3592 printf( _(" %s"), sh_unix_gmttime (p->theFile.atime, str, sizeof(str))); 3596 3593 if (ListWithDelimiter == S_TRUE) 3597 3594 putchar(',');
Note:
See TracChangeset
for help on using the changeset viewer.