;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: USER; Base: 10; Patch-File: T -*-
;;; Patch file for WEATHER-SERVER version 407.2
;;; Reason: Command D,#TD1PsT[Begin using 006 escapes](1 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB")weather::com-reset-weather-server0:  New CP command for resetting the weather server.
;;; Written by ESC, 11/09/90 16:42:36
;;; while running on Djinn from FEP0:>ESC-433-55-from-dWriter-SCRC-etc.ilod.1
;;; with Experimental System 433.58, Experimental CLOS 417.17, Experimental RPC 423.2,
;;; Experimental Embedding Support 415.0, Experimental MacIvory Support 429.7,
;;; Experimental UX Support 424.0, Experimental Development Utilities 418.3,
;;; Experimental Old TV 416.0, Experimental Zwei 416.2, Experimental Utilities 427.3,
;;; Experimental RPC Development 418.0, Experimental MacIvory Development 417.0,
;;; Experimental UX Development 423.0, Experimental Server Utilities 425.0,
;;; Experimental Serial 418.0, Experimental Hardcopy 428.0, Experimental Zmail 425.5,
;;; Experimental LMFS Defstorage 401.0, Experimental SCSI 414.2,
;;; Experimental Tape 427.1, Experimental LMFS 426.0, Experimental Nsage 423.11,
;;; Experimental Extended Help 424.0, Experimental CL Developer 411.0,
;;; Experimental Documentation Database 425.93, Experimental IP-TCP 430.5,
;;; Experimental IP-TCP Documentation 407.1, Experimental DNA 422.0,
;;; Experimental CLX 428.0, Experimental X Remote Screen 426.1,
;;; Experimental X Documentation 406.1, Experimental NFS Client 423.1,
;;; Experimental NFS Documentation 408.0, Experimental Metering 427.0,
;;; Experimental Metering Substrate 427.0, Experimental Conversion Tools 417.1,
;;; Experimental Hacks 423.0, Experimental Mac Dex 416.0,
;;; Experimental HyperCard/MacIvory 416.0, Experimental Statice 422.0,
;;; Experimental Statice Packages 11.0, Experimental Unique-ID 419.0,
;;; Experimental UFS 421.0, Experimental DBFS Kernel 414.1, Experimental DBFS 422.3,
;;; Experimental Statice-Index 420.0, Experimental Statice-Record 419.0,
;;; Experimental Statice Model Runtime 414.2, Experimental Statice-Model 425.0,
;;; Experimental DBFS-DIR 419.0, Experimental Statice Runtime Utilities 414.0,
;;; Experimental Statice-Utilities 421.0, Experimental Statice Examples NEWEST,
;;; Experimental Statice Documentation 411.0, Experimental Symbolics Concordia 427.1,
;;; Experimental Essential Image Substrate 415.0, Experimental Image Substrate 423.0,
;;; Experimental Graphic Editing Documentation 417.21,
;;; Experimental Graphic Editing 424.0, Experimental Graphic Editor 423.0,
;;; Experimental Bitmap Editor 424.0, Experimental Postscript 419.0,
;;; Experimental Concordia Documentation 417.47, Experimental Lock Simple 420.0,
;;; Experimental Producer 4.0, Version Control 404.3, Compare Merge 403.0,
;;; VC Documentation 401.0, Bug Tracking 403.15, Symbolics In-House 425.0,
;;; Symbolics In-House Documentation 409.3, SCRC 424.1, Weather User 408.0,
;;; Logical Pathnames Translation Files NEWEST, Weather Server 407.1,
;;; Experimental NFS Server 423.0, cold load 4, Ivory Revision 4 (FPA enabled),
;;; FEP 322, FEP0:>I322-loaders.flod(222), FEP0:>I322-info.flod(157),
;;; FEP0:>I322-debug.flod(158), FEP0:>I322-lisp.flod(145), , Boot ROM version 318,
;;; Device PROM version 318, 1067x748 B&W Screen, Machine serial number 395,
;;; Electric Character Style Lock enhancements (from S:>hacks>electric-character-style-lock-7-2.lisp.19),
;;; State-of-the-ir-link (from R:>ESC>hacks>state-of-IR-link-source.lisp.23),
;;; Split system and application processes in Peek. (from S:>greenwald>work>scheduler>peek-real-estate.lisp.1),
;;; Decorate Hack (from S:>hacks>decorate-rel8.lisp.1),
;;; 1Styles From Keyboard0 (from S:>hacks>styles-from-keyboard.lisp.1),
;;; Show Picture Hack (from S:>hacks>show-picture.lisp.14),
;;; Remind Hack (from S:>hacks>remind-rel8.lisp.7).



(SYSTEM-INTERNALS:FILES-PATCHED-IN-THIS-PATCH-FILE 
  "SYS:WEATHER;WEATHER-REPORT-SERVER.LISP.42")


;=====================================
(SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
(SYSTEM-INTERNALS:PATCH-SECTION-SOURCE-FILE "SYS:WEATHER;WEATHER-REPORT-SERVER.LISP.42")
(SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
  "-*- Base: 10; Mode: LISP; Package: weather; Syntax: Common-lisp; Lowercase: T; Patch-File: Yes -*-")

(cp:define-command 1(com-reset-weather-server :command-table "Weather"
0					     :provide-output-destination-keyword nil)
    (&key (flush-data 'boolean :default nil :mentioned-default t
		      :documentation "Flush any historical data"))
   (if (not (weather-server-p))
       (format *error-output* "~&Sorry, this command only works on a Weather Server.")
       (let ((check-proc (find *name-of-weather-timer* sys:all-processes :key #'process-name)))
	 (when check-proc (process:kill check-proc)))
       (when flush-data
	 (flush-weather-data))
       (set-up-periodic-weather-checks)))

