From 99daab96f932309995188ee7f7618c036994eb46 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 1 Nov 2007 21:50:18 +0100 Subject: [PATCH] Always print a space after each status item identifier. --- audiod_command.c | 12 ++++++------ command.c | 18 +++++++++--------- gui.c | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/audiod_command.c b/audiod_command.c index d424cf2e..a225b76b 100644 --- a/audiod_command.c +++ b/audiod_command.c @@ -70,7 +70,7 @@ static char *get_time_string(struct timeval *newest_stime) total = 0; out: return make_message( - "%s:%s%d:%02d [%d:%02d] (%d%%/%d:%02d)\n", + "%s: %s%d:%02d [%d:%02d] (%d%%/%d:%02d)\n", status_item_list[SI_PLAY_TIME], use_server_time? "~" : "", total / 60, @@ -88,7 +88,7 @@ __malloc static char *audiod_status_string(void) { const char *status = (audiod_status == AUDIOD_ON)? "on" : (audiod_status == AUDIOD_OFF)? "off": "sb"; - return make_message("%s:%s\n", status_item_list[SI_AUDIOD_STATUS], status); + return make_message("%s: %s\n", status_item_list[SI_AUDIOD_STATUS], status); } static struct timeval *wstime(void) @@ -120,7 +120,7 @@ __malloc static char *decoder_flags(void) flags[i] = flag; } flags[MAX_STREAM_SLOTS] = '\0'; - return make_message("%s:%s\n", status_item_list[SI_DECODER_FLAGS], + return make_message("%s: %s\n", status_item_list[SI_DECODER_FLAGS], flags); } @@ -237,7 +237,7 @@ int com_stat(int fd, __a_unused int argc, __a_unused char **argv) } if (mask & (1 << SI_AUDIOD_UPTIME)) { char *tmp, *us = uptime_str(); - tmp = make_message("%s:%s\n", + tmp = make_message("%s: %s\n", status_item_list[SI_AUDIOD_UPTIME], us); free(us); ret = client_write(fd, tmp); @@ -253,7 +253,7 @@ int com_stat(int fd, __a_unused int argc, __a_unused char **argv) free(s); } if (mask & (1 << SI_DECODER_FLAGS)) { - char *df =decoder_flags(); + char *df = decoder_flags(); ret = client_write(fd, df); if (ret < 0) goto out; @@ -492,7 +492,7 @@ void audiod_status_dump(void) old = stat_task->stat_item_values[SI_AUDIOD_UPTIME]; if (!old || strcmp(old, new)) { free(old); - tmp = make_message("%s:%s\n", + tmp = make_message("%s: %s\n", status_item_list[SI_AUDIOD_UPTIME], new); stat_client_write(tmp, SI_AUDIOD_UPTIME); free(tmp); diff --git a/command.c b/command.c index 219e19a5..6c60ef97 100644 --- a/command.c +++ b/command.c @@ -113,15 +113,15 @@ static char *get_status(struct misc_meta_data *nmmd) } gettimeofday(&now, NULL); ret = make_message( - "%s:%zu\n" /* file size */ - "%s:%s\n" /* mtime */ - "%s:%s\n" /* status */ - "%s:%s\n" /* status flags */ - "%s:%li\n" /* offset */ - "%s:%s\n" /* afs mode */ - "%s:%s\n" /* server uptime */ - "%s:%lu.%lu\n" /* stream start */ - "%s:%lu.%lu\n" /* current server time */ + "%s: %zu\n" /* file size */ + "%s: %s\n" /* mtime */ + "%s: %s\n" /* status */ + "%s: %s\n" /* status flags */ + "%s: %li\n" /* offset */ + "%s: %s\n" /* afs mode */ + "%s: %s\n" /* server uptime */ + "%s: %lu.%lu\n" /* stream start */ + "%s: %lu.%lu\n" /* current server time */ "%s\n", /* afs status info */ status_item_list[SI_FILE_SIZE], nmmd->size / 1024, status_item_list[SI_MTIME], mtime, diff --git a/gui.c b/gui.c index f33fa7c8..e60e6f54 100644 --- a/gui.c +++ b/gui.c @@ -749,7 +749,7 @@ static int check_stat_line(char *line, __a_unused void *data) // PARA_INFO_LOG("%s: checking: %s\n", __func__, line); i = stat_line_valid(line); if (i >= 0) { - line += strlen(status_item_list[i]) + 1; + line += strlen(status_item_list[i]) + 2; free(stat_content[i]); stat_content[i] = para_strdup(line); print_stat_item(i); -- 2.39.2