(FILECREATED "13-Jan-84 19:57:16" {PHYLUM}<LISP>LIBRARY>MAKEDSKSAVER.;7 3771   

      changes to:  (FNS MAKEDSKSAVER)

      previous date: " 1-NOV-83 19:09:34" {PHYLUM}<LISP>LIBRARY>MAKEDSKSAVER.;6)


(* Copyright (c) 1983, 1984 by Xerox Corporation)

(PRETTYCOMPRINT MAKEDSKSAVERCOMS)

(RPAQQ MAKEDSKSAVERCOMS ((FNS MAKEDSKSAVER)))
(DEFINEQ

(MAKEDSKSAVER
  [LAMBDA (L SAVE.HOST/DIR SAVERF RETRIEVERF)                (* JonL "13-Jan-84 19:55")
    (DECLARE (GLOBALVARS \MAKEDSKSAVERF \MAKEDSKRETRIEVERF))
    (SETQ \MAKEDSKSAVERF)
    (SETQ \MAKEDSKRETRIEVERF)
    (OR SAVERF (SETQ SAVERF (QUOTE {DSK}FTPSaveDiskFiles.cm)))
    (SETQ RETRIEVERF (PACKFILENAME (QUOTE BODY)
				   RETRIEVERF
				   (QUOTE NAME)
				   (QUOTE FTPRestoreDIskFiles)
				   (QUOTE BODY)
				   SAVERF))
    [if (FMEMB (FILENAMEFIELD SAVERF (QUOTE HOST))
	       (QUOTE (DSK DSK1 DSK2)))
	then (DIRECTORY (PACKFILENAME (QUOTE VERSION)
				      (QUOTE *)
				      (QUOTE BODY)
				      SAVERF)
			(QUOTE (DELETE]
    [if (FMEMB (FILENAMEFIELD RETRIEVERF (QUOTE HOST))
	       (QUOTE (DSK DSK1 DSK2)))
	then (DIRECTORY (PACKFILENAME (QUOTE VERSION)
				      (QUOTE *)
				      (QUOTE BODY)
				      RETRIEVERF)
			(QUOTE (DELETE]
    (RESETLST (RESETSAVE (RADIX 10))
	      [RESETSAVE NIL (QUOTE (PROGN (CLOSEF? \MAKEDSKSAVERF)
					   (CLOSEF? \MAKEDSKRETRIEVERF)
					   (COND
					     (RESETSTATE (AND \MAKEDSKSAVERF (DELFILE \MAKEDSKSAVERF))
							 (AND \MAKEDSKRETRIEVERF (DELFILE 
									       \MAKEDSKRETRIEVERF]
	      (SETQ \MAKEDSKSAVERF (OPENFILE SAVERF (QUOTE OUTPUT)))
	      (SETQ \MAKEDSKRETRIEVERF (OPENFILE RETRIEVERF (QUOTE OUTPUT)))
	      (PROG ((SAVEH (OR (FILENAMEFIELD SAVE.HOST/DIR (QUOTE HOST))
				(FILENAMEFIELD (DIRECTORYNAME T)
					       (QUOTE HOST))
				(ERROR SAVE.HOST/DIR "No host specified")))
		     (SAVED (OR (FILENAMEFIELD SAVE.HOST/DIR (QUOTE DIRECTORY))
				(FILENAMEFIELD (DIRECTORYNAME T)
					       (QUOTE DIRECTORY))
				(ERROR SAVE.HOST/DIR "No directory specified")))
		     FUN DSKFNAME SERVERFNAME N E V)
		    (printout \MAKEDSKSAVERF T "// FTP command file to save [DSK] files; Created "
			      (GDATE)
			      T T "FTP " SAVEH " Directory/C " SAVED)
		    (printout \MAKEDSKRETRIEVERF T 
			      "// FTP command file to retrieve [DSK] files; Created "
			      (GDATE)
			      T T "FTP " SAVEH " Directory/C " SAVED)
		    (for F in L
		       do (SETQ FUN (if (OR (LITATOM F)
					    (STRINGP F))
					then (FUNCTION FILENAMEFIELD)
				      elseif (LISTP F)
					then (FUNCTION LISTGET)
				      else (ERROR F "Invalid file specifier")))
			  (SETQ N (OR (APPLY* FUN F (QUOTE NAME))
				      (ERROR F "No file name")))
			  (SETQ E (APPLY* FUN F (QUOTE EXTENSION)))
			  (SETQ V (APPLY* FUN F (QUOTE VERSION)))
			  (SETQ DSKFNAME (CONCAT N (if E
						       then (CONCAT "." E)
						     else "")
						 (if (EQ V 1)
						     then ""
						   elseif V
						     then (CONCAT "!" V)
						   else "")))
			  (SETQ SERVERFNAME (CONCAT N (if E
							  then (CONCAT "." E)
							else "")
						    (if V
							then (CONCAT "!" V)
						      else "!9999")))
			  (printout \MAKEDSKSAVERF " ↑" T "Store/S " DSKFNAME -1 SERVERFNAME)
			  (printout \MAKEDSKRETRIEVERF " ↑" T "Retrieve/S " SERVERFNAME -1 DSKFNAME)))
	      (printout \MAKEDSKSAVERF T T)
	      (printout \MAKEDSKRETRIEVERF T T)
	      (CLOSEF \MAKEDSKSAVERF)
	      (CLOSEF \MAKEDSKRETRIEVERF)
	      (PROG1 (LIST \MAKEDSKSAVERF \MAKEDSKRETRIEVERF)
		     (SETQ \MAKEDSKSAVERF)
		     (SETQ \MAKEDSKRETRIEVERF])
)
(PUTPROPS MAKEDSKSAVER COPYRIGHT ("Xerox Corporation" 1983 1984))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (343 3683 (MAKEDSKSAVER 353 . 3681)))))
STOP