summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2005-08-11 07:28:51 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2005-08-11 07:28:51 +0000
commitd8081b101dcd358a853d5f277940942666e7998c (patch)
tree7c8b79bf9c9204d43a5975ee8f98a9c58a92a7fe
parent7d6020bcf8a63eb1430f32bec4002f4a03b692c1 (diff)
downloadmailutils-d8081b101dcd358a853d5f277940942666e7998c.tar.gz
mailutils-d8081b101dcd358a853d5f277940942666e7998c.tar.bz2
(mail_list): Use mail_command_list()
-rw-r--r--mail/list.c29
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;
}

Return to:

Send suggestions and report system problems to the System administrator.