From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <024301c10e32$85ca8400$3cf7c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <20010716195334.36D2F19A32@mail.cse.psu.edu> Subject: Re: [9fans] I still dont understand... MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Mon, 16 Jul 2001 22:04:29 +0200 Topicbox-Message-UUID: cf54df2a-eac9-11e9-9e20-41e7f4b1d025 From: "David Gordon Hogan" > Note that there is another bug -- upas/fs > will die if your POP mbox has 0 messages. I haven't got > around to fixing that. can't be too hard to fix. i assume it issues a STAT. this is how you do it in limbo: - (e, s) = request(CMD_STAT, nil); - case e { - ERR => - return(s, big 0); - OK => - if (debug) - sys->print("%s\n", s); - } - - messages := big 0; - size := big 0; - (n, l) := sys->tokenize(s, " "); - case n { - 1 => - sys->print("%d message%s for '%s@%s', maildrop size unknown.\n", int messages, plural(messages), user, host); - messages = big hd l; - - 2 => - messages = big hd l; - size = big hd tl l; - - * => - return (sys->sprint("unknown number of messages for '%s@%s'.\n", user, host), big 0); - } then loop over messages.