From d30ef8d57ecf1a80bb0c02d23c53bf137c9594d9 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 17 Oct 1996 19:37:30 +0000 Subject: [PATCH] New command "HELP". git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@852 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/popper/pop_get_command.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/appl/popper/pop_get_command.c b/appl/popper/pop_get_command.c index c32dcb846..d9f83a731 100644 --- a/appl/popper/pop_get_command.c +++ b/appl/popper/pop_get_command.c @@ -18,7 +18,7 @@ RCSID("$Id$"); static state_table states[] = { auth1, "user", 1, 1, pop_user, {auth1, auth2}, - auth2, "pass", 1, 1, pop_pass, {auth1, trans}, + auth2, "pass", 1, 99, pop_pass, {auth1, trans}, #ifdef RPOP auth2, "rpop", 1, 1, pop_rpop, {auth1, trans}, #endif /* RPOP */ @@ -34,6 +34,7 @@ static state_table states[] = { trans, "last", 0, 0, pop_last, {trans, trans}, trans, "xtnd", 1, 99, pop_xtnd, {trans, trans}, trans, "quit", 0, 0, pop_updt, {halt, halt}, + trans, "help", 0, 0, pop_help, {trans, trans}, #ifdef UIDL trans, "uidl", 0, 1, pop_uidl, {trans, trans}, #endif @@ -100,3 +101,18 @@ pop_get_command(POP *p, char *mp) "Unknown command: \"%s\".",p->pop_command); return NULL; } + +int +pop_help (POP *p) +{ + state_table *s; + + pop_msg(p, POP_SUCCESS, "help"); + + for (s = states; s->command; s++) { + fprintf (p->output, "%s\r\n", s->command); + } + fprintf (p->output, ".\r\n"); + fflush (p->output); + return POP_SUCCESS; +}