LMFL#!C(:HOST "SYS" :BACKUP-DATE 2760031602. :SYSTEM-TYPE :LOGICAL :VERSION 7. :TYPE "LISP" :NAME "BANDY" :DIRECTORY ("REL3-SOURCE" "MAIL-READER") :SOURCE-PATTERN "( :DIRECTORY (\"REL3-SOURCE\") :NAME :WILD :TYPE :WILD :VERSION :NEWEST)" :VERSION-LIMIT 0. :CHARACTERS T :NOT-BACKED-UP T :CREATION-DATE 2758716201. :AUTHOR "REL3" :LENGTH-IN-BYTES 5446. :LENGTH-IN-BLOCKS 6. :BYTE-SIZE 8.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ;;; -*- Mode:Common-Lisp; Package:ZWEI; Base:10 -*-;;;                           RESTRICTED RIGHTS LEGEND;;;Use, duplication, or disclosure by the Government is subject to;;;restrictions as set forth in subdivision (b)(3)(ii) of the Rights in;;;Technical Data and Computer Software clause at 52.227-7013.;;;                     TEXAS INSTRUMENTS INCORPORATED.;;;                              P.O. BOX 2909;;;                           AUSTIN, TEXAS 78769;;;                                 MS 2151;;; Copyright (C) 1985,1987 Texas Instruments Incorporated. All rights reserved.;;; The following should be "wrapped" around anything in the mail comtab.(defmacro IN-MAIL-CONTEXT ((&optional &key require-message require-buffer) &body body)  "Execute BODY with variables *msg* and *mail-buffer* set to the currentmessage and mail buffer respectively.  Two values may be returned byBODY indicating the redisplay degree required for the sequence bufferand summary buffer respectively."    ;;Need to bind *mini-buffer-dont-record* or find a way to prevent  ;; history yanks from barfing.    `(progn     (setq *current-command-type* :mail)     (multiple-value-setq (*mail-buffer* *msg*) (sync-mail-buffers ,require-buffer))     (when (and ,require-message(null *msg*))       (barf "No message currently selected."))     (multiple-value-bind (sequence-degree summary-degree) (progn   . ,body)       (when *mail-buffer* (must-redisplay-mail-buffer *mail-buffer* sequence-degree summary-degree))       dis-none)))(defun SYNC-MAIL-BUFFERS (&optional (error t))    (cond ((not (boundp '*interval*)) (if error     (barf "Not within a mail buffer.")   nil))((message-sequence-p *interval*) (values *interval* (current-message *interval*)))((mail-summary-p *interval*) (multiple-value-bind (msg seq) (summary-current-message *interval* nil)   (cond ((and msg seq)  (select-message msg seq)) (seq  (select-message 0 seq)))   (when (and seq      (neq seq *mail-buffer*))     (make-mail-buffer-current seq))   (when (mail-file-buffer-p seq)     ;; set summary's file id to nil (so ZMACS won't offer to save)     ;; keep pathnames in sync so defaults and mode line will be right     (setf (buffer-file-id *interval*) nil   (buffer-file-tick *interval*) *tick*;don't want the summary to appear to need saving.   (buffer-pathname *interval*) (buffer-pathname seq)   (buffer-version-string *interval*) (buffer-version-string seq)))   (values seq msg)))(t  (if error     (barf "Not within a mail buffer.")   nil))))(defun SUMMARY-CURRENT-MESSAGE (summary-buffer &optional (error t))    (let* ((window (mail-buffer-window summary-buffer)) (bp (if window (window-point window) (buffer-point summary-buffer))) (line (bp-line bp)) (msg (getf (line-plist line) :summary-message)) (seq (or (getf (line-plist line) :summary-sequence)  (let ((filter (getf (line-plist line) :filter-summary-filter)))    (and filter (get filter :message-sequence)))  (message-sequence-of summary-buffer))))    (unless (bp-= bp (buffer-saved-point summary-buffer))      (move-bp (buffer-saved-point summary-buffer) bp))    (when (and (null msg) (> (total-messages seq) 0))      (setq msg (if (eq line (bp-line (interval-last-bp summary-buffer)))    (last-message seq))))    (if (and (null msg) error)(barf "Summary line does not describe a message.")      (values msg seq))))(defun CURRENT-MESSAGE-SEQUENCE (&optional (error t))    (cond ((not (boundp '*mail-buffer*)) (if error     (barf "Not within a mail buffer.")     nil))(t *mail-buffer*)))(defun CURRENT-MAIL-FILE-BUFFER (&optional (error t))  (cond ((not (boundp '*mail-buffer*)) (if error     (barf "Not within a mail buffer.")     nil))(t (buffer-mail-file-buffer *mail-buffer*))))(defun CURRENT-MAIL-SUMMARY (&optional (error t))    (cond ((not (boundp '*mail-buffer*)) (if error     (barf "Not within a mail buffer.")     nil))(t (mail-summary-of *mail-buffer*))))(defmacro NUMERIC-ARG-LOOP ((counter-variable &optional last-loop-variable) &body body)    (let ((let-list  `((,counter-variable (signum *numeric-arg*) (+ ,counter-variable (signum *numeric-arg*)))))(rtn-val (gensym)))    (if last-loop-variable(push last-loop-variable let-list))    (push rtn-val let-list)    `(do ,let-list ((> (abs ,counter-variable) (abs *numeric-arg*)) ,rtn-val)       ,(if last-loop-variable    `(setq ,last-loop-variable (= ,counter-variable *numeric-arg*)))       (setq ,rtn-val     (progn       . ,body)))))   (defmacro DOMSGS ((message-var buffer &optional index-var start-index) &body body)    (unless index-var    (setq index-var '.i.))  `(do ((,index-var ,(or start-index 0) (1+ ,index-var))(.nmsgs. (total-messages ,buffer)),message-var)       ((>= ,index-var .nmsgs.))     (setq ,message-var (aref (buffer-message-array ,buffer) ,index-var))     . ,body))     (defmacro WITH-BUFFER-LOCK ((buffer) &body body)  "Execute BODY with a lock on BUFFER."    `(with-lock ((get ,buffer :buffer-lock))     . ,body))(defmacro WITH-MESSAGE-READ-ONLY-SUPPRESSED ((message) &body body)  `(with-read-only-suppressed (,message)     (with-lock ((get ,message :message-lock))       . ,body)))(defmacro WITH-MESSAGE-LOCK ((message) &body body)  `(with-lock ((get ,message :message-lock))     . ,body)) (get-null-address)))      (setq result (enqueue-message message)))    (setq final-ack-state t)    (cond ((errorp result)   (format mail-stream "-~A~%" (sanitize-string (send result :report-string)))   (log-debug :chaos-mail-server "-> -~A  (error from ENQUEUE-MESSAGE)" result))  (t   (write-line "+Mail successfully sent" mail-stream)   (log-debug :chaos-mail-server "-> +Mail successfully sent")))    (send mail-stream :force-output))))        ;; condition-call clauses    ((handle-condition-p condition)     (unless (ignored-network-condition-p condition)       (mailer-error :chaos-mail-server "Chaos mail error while serving ~A~%~A" foreign-host cond