Commits

adrian  committed a505a07

packages: Emergency (:-) fixes for gamegrid and tetris

-------------------- ChangeLog entries follow: --------------------

xemacs-packages/games/ChangeLog addition:

2005-11-12 Adrian Aichner <adrian@xemacs.org>

* Makefile (MAINTAINER): Update email address.
* gamegrid.el: Ditto.
* tetris.el: Ditto.
* gamegrid.el (gamegrid-add-score): Fix loss of scores with
non-octal digits.
* tetris.el (tetris-score-file): Default to user-init-directory.

  • Participants
  • Parent commits b4bec0c

Comments (0)

Files changed (4)

+2005-11-12  Adrian Aichner  <adrian@xemacs.org>
+
+	* Makefile (MAINTAINER): Update email address.
+	* gamegrid.el: Ditto.
+	* tetris.el: Ditto.
+	* gamegrid.el (gamegrid-add-score): Fix loss of scores with
+	non-octal digits.
+	* tetris.el (tetris-score-file): Default to user-init-directory.
+
 2005-11-07  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.16 released.
 
 	* Makefile (MAINTAINER): Update email address.
 
-2005-11-06  Adrian Aichner  <adrian@xemacs.org>
-
-	* gamegrid.el (gamegrid-add-score): Fix loss of scores with
-	non-octal digits.
-	* tetris.el (tetris-score-file): Default to (temp-directory), not
-	"/tmp".
-
 2003-10-31  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.15 released.
 
 VERSION = 1.16
 AUTHOR_VERSION = 1.04
-MAINTAINER = Glynn Clements <glynn.clements@virgin.net>
+MAINTAINER = Glynn Clements <glynn@gclements.plus.com>
 PACKAGE = xemacs-base
 PACKAGE = games
 PKG_TYPE = regular
 
 ;; Copyright (C) 1998 Free Software Foundation, Inc.
 
-;; Author: Glynn Clements <glynn.clements@virgin.net>
+;; Author: Glynn Clements <glynn@gclements.plus.com>
 ;; Version: 1.03
 ;; Created: 1997-08-13
 ;; Keywords: games
 			((boundp 'user-mail-address)
 			 user-mail-address)
 			(t ""))))
-  (sort-numeric-fields 1 (point-min) (point-max))
-    (reverse-region (point-min) (point-max))
+  ;; Prefixing numbers 0's will make `sort-numeric-fields' sort with
+  ;; sort-numeric-base of 8.
+  ;; One workaround is to use `sort-regexp-fields-numerically',
+  ;; on the number, excluding leading 0's.
+  (sort-regexp-fields-numerically
+   nil
+   "^[0]*\\([1-9][0-9]+\\)\\>.+$" "\\1" (point-min) (point-max))
+  (reverse-region (point-min) (point-max))
   (goto-line (1+ gamegrid-score-file-length))
   (delete-region (point) (point-max))
   (setq buffer-read-only t)
 
 ;; Copyright (C) 1998 Free Software Foundation, Inc.
 
-;; Author: Glynn Clements <glynn.clements@virgin.net>
+;; Author: Glynn Clements <glynn@gclements.plus.com>
 ;; Version: 2.03
 ;; Created: 1997-08-13
 ;; Keywords: games
 (defvar tetris-score-y (+ tetris-next-y 6)
   "Y position of score")
 
-(defvar tetris-score-file "/tmp/tetris-scores"
+(defvar tetris-score-file
+  (expand-file-name "tetris-scores" user-init-directory)
 ;; anybody with a well-connected server want to host this?
 ;(defvar tetris-score-file "/anonymous@ftp.pgt.com:/pub/cgw/tetris-scores"
   "File for holding high scores")