// FtpUserProtMail.bcpl -- User FTP Mail protocol // Copyright Xerox Corporation 1979, 1980 // Last modified December 25, 1980 7:21 PM by Boggs get "FtpProt.decl" external [ // outgoing procedures UserStoreMail; UserRetrieveMail // incoming procedrues UserGetYesNo; UserFlushEOC; UserProtocolError FTPM; GetCommand; GeneratePList // incoming statics CtxRunning ] structure String [ length byte; char^1,1 byte ] //--------------------------------------------------------------------------- let UserRetrieveMail(pList, RetrieveMail) = valof //--------------------------------------------------------------------------- // returns subcode,,mark or 0 if catastrophic error [ compileif false then [ FTPM(markRetrieveMail) GeneratePList(pList) FTPM(markEndOfCommand) let mark = GetCommand() switchon mark<>FtpCtx.getCmdString for i = 1 to getCmdString>>String.length do switchon getCmdString>>String.char^i into [ case $0 to $9: [ index = index*10 + getCmdString>>String.char^i-$0; endcase ] default: [ UserProtocolError(); resultis 0 ] case $*S: break ] ExcpHandler(mark<