This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/20236 ) Change subject: vty: cosmetic: s/width/cmd_width/g in vty_describe_command() ...................................................................... vty: cosmetic: s/width/cmd_width/g in vty_describe_command() Change-Id: Ifcf5f7be925c5421040d3cac2c4c5e4dd497c0f5 --- M src/vty/vty.c 1 file changed, 10 insertions(+), 10 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/vty/vty.c b/src/vty/vty.c index e335f3a..2b131a4 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1119,7 +1119,7 @@ int ret; vector vline; vector describe; - unsigned int i, width, desc_width; + unsigned int i, cmd_width, desc_width; struct desc *desc, *desc_cr = NULL; vline = cmd_make_strvec(vty->buf); @@ -1152,7 +1152,7 @@ } /* Get width of command string. */ - width = 0; + cmd_width = 0; for (i = 0; i < vector_active(describe); i++) if ((desc = vector_slot(describe, i)) != NULL) { unsigned int len; @@ -1164,12 +1164,12 @@ if (desc->cmd[0] == '.') len--; - if (width < len) - width = len; + if (cmd_width < len) + cmd_width = len; } /* Get width of description string. */ - desc_width = vty->width - (width + 6); + desc_width = vty->width - (cmd_width + 6); /* Print out description. */ for (i = 0; i < vector_active(describe); i++) @@ -1188,15 +1188,15 @@ '.' ? desc->cmd + 1 : desc->cmd, VTY_NEWLINE); else if (desc_width >= strlen(desc->str)) - vty_out(vty, " %-*s %s%s", width, + vty_out(vty, " %-*s %s%s", cmd_width, desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd, desc->str, VTY_NEWLINE); else - vty_describe_fold(vty, width, desc_width, desc); + vty_describe_fold(vty, cmd_width, desc_width, desc); #if 0 - vty_out(vty, " %-*s %s%s", width + vty_out(vty, " %-*s %s%s", cmd_width desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd, desc->str ? desc->str : "", VTY_NEWLINE); #endif /* 0 */ @@ -1208,11 +1208,11 @@ desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd, VTY_NEWLINE); else if (desc_width >= strlen(desc->str)) - vty_out(vty, " %-*s %s%s", width, + vty_out(vty, " %-*s %s%s", cmd_width, desc->cmd[0] == '.' ? desc->cmd + 1 : desc->cmd, desc->str, VTY_NEWLINE); else - vty_describe_fold(vty, width, desc_width, desc); + vty_describe_fold(vty, cmd_width, desc_width, desc); } cmd_free_strvec(vline); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20236 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifcf5f7be925c5421040d3cac2c4c5e4dd497c0f5 Gerrit-Change-Number: 20236 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200922/082dc37d/attachment.htm>