Trailing-Edge
-
PDP-10 Archives
-
-
There are no other files named in the archive.
(FILECREATED " 2-Jan-79 10:37:32" <LISPUSERS>DATEFORMAT..3 3990
changes to: DATEFORMATCOMS
previous date: "29-Dec-78 16:51:22" <LISPUSERS>DATEFORMAT..2)
(PRETTYCOMPRINT DATEFORMATCOMS)
(RPAQQ DATEFORMATCOMS [(FNS DATEFORMAT)
(VARS * DATEFORMATVARS)
(DECLARE: EVAL@COMPILE DONTCOPY
(P (RESETSAVE DWIMIFYCOMPFLG T)))
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY
COMPILERVARS (ADDVARS (NLAMA DATEFORMAT)
(NLAML)
(LAMA])
(DEFINEQ
(DATEFORMAT
[NLAMBDA KEYWORDS
(DECLARE (LOCALVARS . T)) (* Edited by M.Yonke on
29-Dec-78.)
(* * DATEFORMAT returns a number that can be used to call DATE
or GDATE. The arguments to DATEFORMAT are taken as what kinds
of things you want ODTIM to print -- see the jsys manual
section eight. The default is found in DATEFORMAT.DEFAULT and
is initially zero. DATEFORMAT will print the arguments it did
not use. The DATEFORMAT.ON.KEYS turn on the bit number stored
in the CDR. The DATEFORMAT.OFF.KEYS turn off their bit number.
DATEFORMAT.KEYS is a list of all possible keys and is used for
spelling correction.)
(PROG (notUsedKeys (value DATEFORMAT.DEFAULT))
(if KEYWORDS=NIL or KEYWORDS:1=NIL
then (RETURN value))
(if 'DASHES MEMB KEYWORDS
then (* Add DASHES2 to listOfKeys,
since DASHES was there.)
KEYWORDS_ <'DASHES2 ! KEYWORDS>)
[for command in KEYWORDS bind key
do (PROG NIL
lp (if key_(FASSOC command DATEFORMAT.ON.KEYS)
then value_(LOGOR value (LLSH 1 35-key::1))
elseif key_(FASSOC command DATEFORMAT.OFF.KEYS)
then value_(LOGAND value (LOGXOR -1
(LLSH 1
35-key::1)))
else (PROG ((FAULTFN ('DATEFORMAT))
(TYPE-IN?)
(oldCommand command))
(command_(FIXSPELL oldCommand
FIXSPELLREL
DATEFORMAT.KEYS NIL
$$LST1 NIL T
(CHCON oldCommand)
'MUSTAPPROVE))
(if command
then (GO lp)
else notUsedKeys_ <oldCommand
! notUsedKeys>]
(if notUsedKeys
then (TERPRI T)
(PRIN1 "Unknown keys {in DATEFORMAT} are " T)
(MAPRINT notUsedKeys T "" "" ", ")
(TERPRI T))
(RETURN value])
)
(RPAQQ DATEFORMATVARS (DATEFORMAT.KEYS DATEFORMAT.ON.KEYS
DATEFORMAT.OFF.KEYS (
DATEFORMAT.DEFAULT 0)))
(RPAQQ DATEFORMAT.KEYS (CIVILIAN.TIME DASHES DATE DAY.LONG DAY.OF.WEEK
DAY.SHORT EUROPE.FORMAT
LEADING.SPACES MILITARY.TIME
MONTH.LONG MONTH.SHORT NAME.OF.MONTH
NO.DATE NO.DAY.OF.WEEK
NO.LEADING.SPACES NO.SECONDS NO.TIME
NO.TIME.ZONE NUMBER.OF.MONTH SECONDS
SLASHES SPACES TIME TIME.ZONE
USA.FORMAT YEAR.LONG YEAR.SHORT))
(RPAQQ DATEFORMAT.ON.KEYS ((NO.DATE . 0)
(DAY.OF.WEEK . 1)
(DAY.LONG . 2)
(NUMBER.OF.MONTH . 3)
(MONTH.LONG . 4)
(YEAR.LONG . 5)
(USA.FORMAT . 6)
(SPACES . 7)
(SLASHES . 8)
(NO.TIME . 9)
(NO.SECONDS . 10)
(CIVILIAN.TIME . 11)
(TIME.ZONE . 13)
(NO.LEADING.SPACES . 17)))
(RPAQQ DATEFORMAT.OFF.KEYS ((DATE . 0)
(NO.DAY.OF.WEEK . 1)
(DAY.SHORT . 2)
(NAME.OF.MONTH . 3)
(MONTH.SHORT . 4)
(YEAR.SHORT . 5)
(EUROPE.FORMAT . 6)
(DASHES . 7)
(DASHES2 . 8)
(TIME . 9)
(SECONDS . 10)
(MILITARY.TIME . 11)
(NO.TIME.ZONE . 13)
(LEADING.SPACES . 17)))
(RPAQ DATEFORMAT.DEFAULT 0)
(DECLARE: EVAL@COMPILE DONTCOPY
(RESETSAVE DWIMIFYCOMPFLG T)
)
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
(ADDTOVAR NLAMA DATEFORMAT)
(ADDTOVAR NLAML )
(ADDTOVAR LAMA )
)
(DECLARE: DONTCOPY
(FILEMAP (NIL (522 2442 (DATEFORMAT 534 . 2439)))))
STOP