From 1653e5866296d162f05320e025dd3af0abd97b77 Mon Sep 17 00:00:00 2001 From: Tim Daly Date: Tue, 14 Apr 2015 01:37:18 -0400 Subject: [PATCH] books/bookvol5 KeyedMsg functions no longer use s2-us.msgs The file s2-us.msgs was removed. All functions which reference it were removed. --- books/bookvol5.pamphlet | 117 +----------------------------------- changelog | 4 + patch | 11 ++-- src/axiom-website/patches.html | 2 + src/input/unittest2.input.pamphlet | 2 +- src/interp/util.lisp.pamphlet | 2 +- 6 files changed, 16 insertions(+), 122 deletions(-) diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 5c2cb55..7e7b1a7 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -446,7 +446,6 @@ returns a list of the name of each frame. \Defun{displayFrameNames}{Display the frame name list message} \calls{displayFrameNames}{bright} \calls{displayFrameNames}{framename} -\calls{displayFrameNames}{sayKeyedMsg} \usesdollar{displayFrameNames}{interpreterFrameRing} \begin{chunk}{defun displayFrameNames 0} (defun |displayFrameNames| () @@ -959,16 +958,6 @@ a standard way of printing abbreviated types. and that ``fn'' is to be called on ``args'' to get the text. \end{itemize} -Look in the file with the name defined in \verb|$defaultMsgDatabaseName| -above for examples. - -\defdollar{cacheMessages} -This is used for debugging -\begin{chunk}{initvars} -(defvar |$cacheMessages| t) - -\end{chunk} - \defdollar{msgAlist} \begin{chunk}{initvars} (defvar |$msgAlist| nil) @@ -987,12 +976,6 @@ This is used for debugging \end{chunk} -\defvar{*msghash*} -\begin{chunk}{initvars} -(defvar *msghash* nil "hash table keyed by msg number") - -\end{chunk} - \defdollar{msgdbPrims} \begin{chunk}{initvars} (defvar |$msgdbPrims| @@ -1022,54 +1005,6 @@ This is used for debugging \end{chunk} -\defun{fetchKeyedMsg}{Fetch a message from the message database} -If the {\tt *msghash*} hash table is empty we call {\tt cacheKeyedMsg} -to fill the table, otherwise we do a key lookup in the hash table. -\calls{fetchKeyedMsg}{object2Identifier} -\calls{fetchKeyedMsg}{cacheKeyedMsg} -\usesdollar{fetchKeyedMsg}{defaultMsgDatabaseName} -\uses{fetchKeyedMsg}{*msghash*} -\begin{chunk}{defun fetchKeyedMsg} -(defun |fetchKeyedMsg| (key ignore) - (declare (ignore ignore) (special *msghash* |$defaultMsgDatabaseName|)) - (if (not (stringp key)) - (progn - (format t "~%~%TPDERROR: fetchKeyedMsg called with non-string ~s~%" key) - (setq key (|object2Identifier| key)) - (unless *msghash* - (setq *msghash* (make-hash-table)) - (cacheKeyedMsg |$defaultMsgDatabaseName|)) - (gethash key *msghash*)) - key)) - -\end{chunk} - -\defun{cacheKeyedMsg}{Cache messages read from message database} -\catches{cacheKeyedMsg}{done} -\throws{cacheKeyedMsg}{done} -\uses{cacheKeyedMsg}{*msghash*} -\begin{chunk}{defun cacheKeyedMsg} -(defun cacheKeyedMsg (file) - (let ((line "") (msg "") key) - (declare (special *msghash*)) - (with-open-file (in file) - (catch 'done - (loop - (setq line (read-line in nil nil)) - (cond - ((null line) - (when key (setf (gethash key *msghash*) msg)) - (throw 'done nil)) - ((= (length line) 0)) - ((char= (schar line 0) #\S) - (when key (setf (gethash key *msghash*) msg)) - (setq key (intern line "BOOT")) - (setq msg "")) - ('else - (setq msg (concatenate 'string msg line))))))))) - -\end{chunk} - \defun{sayKeyedMsg}{Say a message using a keyed lookup} \calls{sayKeyedMsg}{sayKeyedMsgLocal} \usesdollar{sayKeyedMsg}{texFormatting} @@ -1096,7 +1031,7 @@ to fill the table, otherwise we do a key lookup in the hash table. (defun |sayKeyedMsgLocal| (key args) (let (msg msgp) (declare (special |$printMsgsToFile| $linelength $margin |$displayMsgNumber|)) - (setq msg (|segmentKeyedMsg| (|fetchKeyedMsg| key nil))) + (setq msg (|segmentKeyedMsg| key)) (setq msg (|substituteSegmentedMsg| msg args)) (when |$displayMsgNumber| (setq msg `("%b" ,key |:| "%d" . ,msg))) (setq msgp (|flowSegmentedMsg| msg $linelength $margin)) @@ -1137,45 +1072,6 @@ to fill the table, otherwise we do a key lookup in the hash table. \end{chunk} -The \verb|$defaultMsgDatabaseName| variable contains the location of the -international message database. This can be changed to use a translated -version of the messages. It defaults to the United States English version. -The relative pathname used as the default is hardcoded in the -\refto{reroot} function. -This value is prefixed with the \verb|$spadroot| to make the path absolute. - -In general, all Axiom message text should be stored in this file to -enable internationalization of messages. - -An example of a runtime value is: -\begin{verbatim} -|$defaultMsgDatabaseName| = - #p"/research/test/mnt/ubuntu/doc/msgs/s2-us.msgs" -\end{verbatim} - -\defdollar{defaultMsgDatabaseName} -\begin{chunk}{initvars} -(defvar |$defaultMsgDatabaseName| nil) - -\end{chunk} - -\begin{verbatim} -|$defaultMsgDatabaseName| = #p"/research/test/mnt/ubuntu/doc/msgs/s2-us.msgs" -\end{verbatim} - -This function is called in {\bf reroot}. It is a temporary function -intended to be removed when the message database is removed. -\usesdollar{setDefaultMsgDatabaseName}{defaultMsgDatabaseName} -\usesdollar{setDefaultMsgDatabaseName}{msgDatabaseName} -\begin{chunk}{defun setDefaultMsgDatabaseName} -(defun setDefaultMsgDatabaseName () - (declare (special |$defaultMsgDatabaseName| |$msgDatabaseName|)) - (setq |$defaultMsgDatabaseName| - (pathname (make-absolute-filename "/doc/msgs/s2-us.msgs"))) - (setq |$msgDatabaseName| ())) - -\end{chunk} - \chapter{The History Mechanism} \defdollar{HiFiAccess} The \verb|$HiFiAccess| is set by initHist to T. It is a flag @@ -10418,8 +10314,6 @@ and the empty string. 13> (|printTypeAndTimeNormal| 1 (|PositiveInteger|)) 14> (|sayKeyedMsg| "%rjon Type: %1p %rjoff" ((|PositiveInteger|))) 15> (|sayKeyedMsgLocal| "%rjon Type: %1p %rjoff" ((|PositiveInteger|))) - 17> (|fetchKeyedMsg| "%rjon Type: %1p %rjoff" NIL) - <17 (|fetchKeyedMsg| " %rjon Type: %1p %rjoff" T) 16> (|segmentKeyedMsg| " %rjon Type: %1p %rjoff") <16 (|segmentKeyedMsg| ("%rjon" "Type:" "%1p" "%rjoff")) 16> (|member| "%rjon" (|%ceon| "%ceon")) @@ -11786,7 +11680,6 @@ $current-directory = "/research/test/" \end{verbatim} \calls{reroot}{make-absolute-filename} -\calls{reroot}{setDefaultMsgDatabaseName} \usesdollar{reroot}{spadroot} \usesdollar{reroot}{directory-list} \usesdollar{reroot}{relative-directory-list} @@ -11803,7 +11696,6 @@ $current-directory = "/research/test/" (mapcar #'make-absolute-filename $relative-directory-list)) (setq $library-directory-list (mapcar #'make-absolute-filename $relative-library-directory-list)) - (setDefaultMsgDatabaseName) (setq $current-directory $spadroot)) \end{chunk} @@ -12687,7 +12579,7 @@ sameUnionBranch(uArg, m) == (defun |msgText| (key args) (let (msg) (declare (special $linelength $margin)) - (setq msg (|segmentKeyedMsg| (|fetchKeyedMsg| key nil))) + (setq msg (|segmentKeyedMsg| key)) (setq msg (|substituteSegmentedMsg| msg args)) (setq msg (|flowSegmentedMsg| msg $linelength $margin)) (apply #'concat (mapcar #'princ-to-string (cdar msg))))) @@ -23487,7 +23379,7 @@ org prints out the word noposition or console (setq msgText (cond ((setq msgKey (|getMsgKey?| msg)) - (|fetchKeyedMsg| msgKey nil)) + msgKey) (t (|getMsgKey| msg)))) (setq msgText (|segmentKeyedMsg| msgText)) (setq tmp (|removeAttributes| msgText)) @@ -60650,7 +60542,6 @@ digits in TechExplorer. Since Saturn is gone we can remove it. \getchunk{defun buildHtMacroTable} \getchunk{defun buttonNames} -\getchunk{defun cacheKeyedMsg} \getchunk{defun canFuncall?} \getchunk{defun categoryopen} \getchunk{defun changeHistListLen} @@ -60828,7 +60719,6 @@ digits in TechExplorer. Since Saturn is gone we can remove it. \getchunk{defun executeQuietCommand} \getchunk{defun explainLinear} -\getchunk{defun fetchKeyedMsg} \getchunk{defun fetchOutput} \getchunk{defun fillerSpaces} \getchunk{defun filterAndFormatConstructors} @@ -61879,7 +61769,6 @@ digits in TechExplorer. Since Saturn is gone we can remove it. \getchunk{defun set} \getchunk{defun set1} \getchunk{defun setdatabase} -\getchunk{defun setDefaultMsgDatabaseName} \getchunk{defun setExpose} \getchunk{defun setExposeAdd} \getchunk{defun setExposeAddConstr} diff --git a/changelog b/changelog index 02ae492..f7a74ea 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,7 @@ +20150414 tpd src/axiom-website/patches.html 20150414.01.tpd.patch +20150414 tpd books/bookvol5 KeyedMsg functions no longer use s2-us.msgs +20150414 tpd src/interp/util.lisp remove $defaultMsgDatabaseName +20150414 tpd src/input/unittest2.input remove $defaultMsgDatabaseName 20150413 tpd src/axiom-website/patches.html 20150413.01.tpd.patch 20150413 tpd books/bookvol10.3 replace code with msg text 20150413 tpd books/bookvol10.4 replace code with msg text diff --git a/patch b/patch index 24bb860..07964da 100644 --- a/patch +++ b/patch @@ -1,8 +1,7 @@ -src/doc/msgs/s2-us.msgs: removed. replace code with msg text +books/bookvol5 KeyedMsg functions no longer use s2-us.msgs + +The file s2-us.msgs was removed. All functions which reference it +were removed. + -s2-us.msgs was intended to allow messages to be translated from -English to other languages. This was never done. In fact, new -messages added after this file was created were never added to -the message file. As a result this file is not needed. The -messages were inserted into the original source files. diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 6cf3f43..6bfdfe2 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -5012,6 +5012,8 @@ readme add Kevlin Henney quote
books/bookvolbib add Bail97
20150413.01.tpd.patch src/doc/msgs/s2-us.msgs: removed. replace code with msg text
+20150414.01.tpd.patch +books/bookvol5 KeyedMsg functions no longer use s2-us.msgs
diff --git a/src/input/unittest2.input.pamphlet b/src/input/unittest2.input.pamphlet index b5c3b3d..0bf90b5 100644 --- a/src/input/unittest2.input.pamphlet +++ b/src/input/unittest2.input.pamphlet @@ -801,7 +801,7 @@ This generates non-printing characters --E 130 --S 131 of 235 -)lisp (identity |$defaultMsgDatabaseName|) +--)lisp (identity |$defaultMsgDatabaseName|) --R --IValue = #p"/research/reference/mnt/ubuntu/doc/msgs/s2-us.msgs" --E 131 diff --git a/src/interp/util.lisp.pamphlet b/src/interp/util.lisp.pamphlet index 96cb4ab..c7136af 100644 --- a/src/interp/util.lisp.pamphlet +++ b/src/interp/util.lisp.pamphlet @@ -1365,7 +1365,7 @@ function assumes that \\ can only appear as first character of name. (in-package "BOOT") (export '($spadroot $directory-list $current-directory reroot - make-absolute-filename |$msgDatabaseName| |$defaultMsgDatabaseName|)) + make-absolute-filename)) \getchunk{our-write-date} \getchunk{make-directory} -- 1.7.5.4