Commit 31fcf857 31fcf857134ba4ccd32d68b84064b5b86546894a by Jakob Kaivo

Added 'F'/'f' to test mbox_get_header()

1 parent 100fe99c
......@@ -2,4 +2,5 @@ CPPFLAGS = -I$(top_srcdir)/libmailbox
bin_PROGRAMS = mail
mail_DEPENDENCIES = ../libmailbox/libmailbox.la
mail_LDADD = ../libmailbox/libmailbox.la
......
......@@ -46,7 +46,7 @@ main (int argc, char **argv)
fgets (bar, 80, stdin);
c = bar[0];
if (c == 'd' || c == 'D' || c == 'b' || c == 'B' || c == 'h' ||
c == 'H' || c == 'r' || c == 'R')
c == 'H' || c == 'r' || c == 'R' || c == 'f' || c == 'F')
{
printf ("# ");
fgets (bar, 80, stdin);
......@@ -58,6 +58,12 @@ main (int argc, char **argv)
mbox_close (mbox);
return 0;
break;
case 'f':
case 'F':
foo = mbox_header_line (mbox, atoi (bar) - 1, "from");
printf ("%s\n", foo);
free (foo);
break;
case 'r':
case 'R':
foo = mbox_get_header (mbox, atoi (bar) - 1);
......