From de7571414b9249ca3bc8553af81e3840e5c4c354 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 23 Apr 2000 04:13:53 +0000 Subject: [PATCH] Tweak response representation slightly to clean it up. --- v7/src/imail/imap-response.scm | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/v7/src/imail/imap-response.scm b/v7/src/imail/imap-response.scm index 58cb75066..670d4ad80 100644 --- a/v7/src/imail/imap-response.scm +++ b/v7/src/imail/imap-response.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imap-response.scm,v 1.3 2000/04/23 03:04:55 cph Exp $ +;;; $Id: imap-response.scm,v 1.4 2000/04/23 04:13:53 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -122,26 +122,27 @@ (discard-known-char #\[ port) (let ((code (let ((x (intern (read-resp-text-atom port)))) - (case x - ((ALERT PARSE READ-ONLY READ-WRITE TRYCREATE) - x) - ((NEWNAME) - (discard-known-char #\space port) - (let ((old (read-xstring port))) - (discard-known-char #\space port) - (list x old (read-xstring port)))) - ((UIDVALIDITY UNSEEN) - (discard-known-char #\space port) - (list x (read-nz-number port))) - ((PERMANENTFLAGS) - (discard-known-char #\space port) - (cons x (read-list port read-pflag))) - (else - (if (char=? #\space (peek-char-no-eof port)) - (begin - (read-char port) - (list x (read-resp-text-tail port))) - x)))))) + (cons x + (case x + ((ALERT PARSE READ-ONLY READ-WRITE TRYCREATE) + '()) + ((NEWNAME) + (discard-known-char #\space port) + (let ((old (read-xstring port))) + (discard-known-char #\space port) + (list old (read-xstring port)))) + ((UIDVALIDITY UNSEEN) + (discard-known-char #\space port) + (list (read-nz-number port))) + ((PERMANENTFLAGS) + (discard-known-char #\space port) + (read-list port read-pflag)) + (else + (if (char=? #\space (peek-char-no-eof port)) + (begin + (read-char port) + (read-resp-text-tail port)) + '()))))))) (discard-known-char #\] port) (discard-known-char #\space port) code)) -- 2.25.1