X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=0baad5dcfca009ba0261c68e270073d72b277e06;hp=2ef9c5a87b54760ed38fc41e4f3b83391a4aa3f5;hb=780f2f681bccf82024bdb6da2e2cccaa0e084663;hpb=bb92402464a61c03616ff23397e753a9dca98d6d diff --git a/command.c b/command.c index 2ef9c5a8..0baad5dc 100644 --- a/command.c +++ b/command.c @@ -112,21 +112,15 @@ static char *vss_get_status_flags(unsigned int flags) static unsigned get_status(struct misc_meta_data *nmmd, int parser_friendly, char **result) { - char mtime[30] = ""; char *status, *flags; /* vss status info */ /* nobody updates our version of "now" */ long offset = (nmmd->offset + 500) / 1000; struct timeval current_time; - struct tm mtime_tm; struct para_buffer b = {.flags = parser_friendly? PBF_SIZE_PREFIX : 0}; /* report real status */ status = vss_status_tohuman(nmmd->vss_status_flags); flags = vss_get_status_flags(nmmd->vss_status_flags); - if (nmmd->size) { /* parent currently has an audio file open */ - localtime_r(&nmmd->mtime, &mtime_tm); - strftime(mtime, 29, "%b %d %Y", &mtime_tm); - } clock_get_realtime(¤t_time); /* * The calls to WRITE_STATUS_ITEM() below never fail because @@ -134,8 +128,6 @@ static unsigned get_status(struct misc_meta_data *nmmd, int parser_friendly, * is not smart enough to prove this and complains nevertheless. * Casting the return value to void silences clang. */ - (void)WRITE_STATUS_ITEM(&b, SI_FILE_SIZE, "%zu\n", nmmd->size / 1024); - (void)WRITE_STATUS_ITEM(&b, SI_MTIME, "%s\n", mtime); (void)WRITE_STATUS_ITEM(&b, SI_STATUS, "%s\n", status); (void)WRITE_STATUS_ITEM(&b, SI_STATUS_FLAGS, "%s\n", flags); (void)WRITE_STATUS_ITEM(&b, SI_OFFSET, "%li\n", offset);