diff options
author | Sean 'Shaleh' Perry <shaleh@debian.org> | 2000-05-19 01:52:21 +0000 |
---|---|---|
committer | Sean 'Shaleh' Perry <shaleh@debian.org> | 2000-05-19 01:52:21 +0000 |
commit | e429b2b6ef80b1ffd204c797ef065868001a7697 (patch) | |
tree | bc9701f0bb839f4570a5eb52c787d7336cb5cde2 /libmailbox | |
parent | 1a1d7c51fb8bbefe37ef87e8091742f146a55e53 (diff) | |
download | mailutils-e429b2b6ef80b1ffd204c797ef065868001a7697.tar.gz mailutils-e429b2b6ef80b1ffd204c797ef065868001a7697.tar.bz2 |
fleshed out mh.c some more
Diffstat (limited to 'libmailbox')
-rw-r--r-- | libmailbox/mh.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/libmailbox/mh.c b/libmailbox/mh.c index 923883983..90eca4a83 100644 --- a/libmailbox/mh.c +++ b/libmailbox/mh.c @@ -45,19 +45,29 @@ mh_open (mailbox * mbox) return errno; /* set by opendir() */ /* process directory */ - while ((entry = readdir (data->dir)) && (entry != NULL)) + while (entry = readdir (data->dir)) { - /* TODO: deal with mh dot files */ + unsigned long seq_num; + char *foo = NULL; if (entry->d_name[0] == '.') - continue; + { + if (strcmp(entry->d_name, ".mh_sequences" == 0)) + /* TODO: deal with mh sequence files */; + continue; + } if (entry->d_name[0] == ',') /* file marked for deletion */; + /* TODO: handle ERANGE */ + seq_num = strtoul (entry->d_name, &foo, 10); + if (*foo != '\0') /* invalid sequence number */ + continue; /* TODO: handle this better? */ + printf ("message: %ld\r", seq_num); mbox->messages++; } -#if 0 mbox->_data = data; +#if 0 mbox->_close = mh_close; mbox->_delete = mh_delete; mbox->_undelete = mh_undelete; |