From 2c10ae2b213b6eb35ce9ceb879721a08e7470064 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Thu, 17 Feb 2022 21:14:36 +0100 Subject: [PATCH] [dialogs] const separator in progress --- src/dialogs/progress.c | 6 +++--- src/dialogs/progress.h | 4 ++-- src/dialogs/status.c | 2 +- src/dialogs/status.h | 2 +- src/protocol/bittorrent/dialogs.c | 2 +- src/protocol/bittorrent/dialogs.h | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dialogs/progress.c b/src/dialogs/progress.c index ecee5c04f..90d759999 100644 --- a/src/dialogs/progress.c +++ b/src/dialogs/progress.c @@ -18,7 +18,7 @@ static char * get_progress_msg_2(struct progress *progress, struct terminal *term, - int wide, int full, char *separator, char *type) + int wide, int full, const char *separator, char *type) { struct string msg; int newlines = separator[strlen(separator) - 1] == '\n'; @@ -92,14 +92,14 @@ get_progress_msg_2(struct progress *progress, struct terminal *term, char * get_upload_progress_msg(struct progress *progress, struct terminal *term, - int wide, int full, char *separator) + int wide, int full, const char *separator) { return get_progress_msg_2(progress, term, wide, full, separator, _("Sent", term)); } char * get_progress_msg(struct progress *progress, struct terminal *term, - int wide, int full, char *separator) + int wide, int full, const char *separator) { return get_progress_msg_2(progress, term, wide, full, separator, _("Received", term)); } diff --git a/src/dialogs/progress.h b/src/dialogs/progress.h index c1199a5bc..8b7e26226 100644 --- a/src/dialogs/progress.h +++ b/src/dialogs/progress.h @@ -10,12 +10,12 @@ struct terminal; char * get_progress_msg(struct progress *progress, struct terminal *term, - int wide, int full, char *separator); + int wide, int full, const char *separator); char * get_upload_progress_msg(struct progress *progress, struct terminal *term, - int wide, int full, char *separator); + int wide, int full, const char *separator); /* Draws a progress bar meter or progress coloured text depending on whether * @text is NULL. If @meter_color is NULL dialog.meter color is used. */ diff --git a/src/dialogs/status.c b/src/dialogs/status.c index 036a13777..d218aca10 100644 --- a/src/dialogs/status.c +++ b/src/dialogs/status.c @@ -43,7 +43,7 @@ char * get_download_msg(struct download *download, struct terminal *term, - int wide, int full, char *separator) + int wide, int full, const char *separator) { if (!download_is_progressing(download)) { /* DBG("%d -> %s", download->state, _(get_err_msg(download->state), term)); */ diff --git a/src/dialogs/status.h b/src/dialogs/status.h index 7448a8505..326576a39 100644 --- a/src/dialogs/status.h +++ b/src/dialogs/status.h @@ -15,7 +15,7 @@ void update_status(void); char * get_download_msg(struct download *download, struct terminal *term, - int wide, int full, char *separator); + int wide, int full, const char *separator); #ifdef __cplusplus } diff --git a/src/protocol/bittorrent/dialogs.c b/src/protocol/bittorrent/dialogs.c index e31a77d37..4f6334920 100644 --- a/src/protocol/bittorrent/dialogs.c +++ b/src/protocol/bittorrent/dialogs.c @@ -275,7 +275,7 @@ dlg_show_bittorrent_info(struct dialog_data *dlg_data, struct widget_data *widge * should be easily accessible. */ char * get_bittorrent_message(struct download *download, struct terminal *term, - int wide, int full, char *separator) + int wide, int full, const char *separator) { /* Cooresponds to the connection mode enum. */ static char *modes_text[] = { diff --git a/src/protocol/bittorrent/dialogs.h b/src/protocol/bittorrent/dialogs.h index d0ddbdc05..a5c2fcc7e 100644 --- a/src/protocol/bittorrent/dialogs.h +++ b/src/protocol/bittorrent/dialogs.h @@ -17,7 +17,7 @@ struct type_query; char * get_bittorrent_message(struct download *download, struct terminal *term, - int wide, int full, char *separator); + int wide, int full, const char *separator); void draw_bittorrent_piece_progress(struct download *download, struct terminal *term,