diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-08-11 07:28:51 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-08-11 07:28:51 +0000 |
commit | d8081b101dcd358a853d5f277940942666e7998c (patch) | |
tree | 7c8b79bf9c9204d43a5975ee8f98a9c58a92a7fe | |
parent | 7d6020bcf8a63eb1430f32bec4002f4a03b692c1 (diff) | |
download | mailutils-d8081b101dcd358a853d5f277940942666e7998c.tar.gz mailutils-d8081b101dcd358a853d5f277940942666e7998c.tar.bz2 |
(mail_list): Use mail_command_list()
-rw-r--r-- | mail/list.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/mail/list.c b/mail/list.c index c91270e1c..0620cc942 100644 --- a/mail/list.c +++ b/mail/list.c @@ -1,5 +1,5 @@ /* GNU Mailutils -- a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1999, 2001, 2005 Free Software Foundation, Inc. GNU Mailutils is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,31 +26,6 @@ int mail_list (int argc ARG_UNUSED, char **argv ARG_UNUSED) { - const char *cmd = NULL; - int i = 0, pos = 0, len = 0; - int cols = util_getcols (); - - for (i=0; mail_command_table[i].shortname != 0; i++) - { - len = strlen (mail_command_table[i].longname); - if (len < 1) - { - cmd = mail_command_table[i].shortname; - len = strlen (cmd); - } - else - cmd = mail_command_table[i].longname; - - pos += len + 1; - - if (pos >= cols) - { - pos = len + 1; - fprintf (ofile, "\n%s ", cmd); - } - else - fprintf (ofile, "%s ", cmd); - } - fprintf (ofile, "\n"); + mail_command_list (); return 0; } |