/[emacs]/emacs/lisp/play/gamegrid.el
ViewVC logotype

Diff of /emacs/lisp/play/gamegrid.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by walters, Tue Apr 23 20:24:40 2002 UTC revision 1.10 by walters, Mon Apr 29 22:53:44 2002 UTC
# Line 413  static char *noname[] = { Line 413  static char *noname[] = {
413       (gamegrid-add-score-with-update-game-score file score))))       (gamegrid-add-score-with-update-game-score file score))))
414    
415  (defun gamegrid-add-score-with-update-game-score (file score)  (defun gamegrid-add-score-with-update-game-score (file score)
416    (let ((result nil)    (let* ((result nil)
417          (errbuf (generate-new-buffer " *update-game-score loss*"))           (errbuf (generate-new-buffer " *update-game-score loss*"))
418          (target (if game-score-directory           (have-shared-game-dir
419                      file            (not (zerop (logand (file-modes
420                    (let ((f (expand-file-name "~/.emacs.d/games")))                                 (expand-file-name "update-game-score"
421                      (unless (eq (car-safe (file-attributes f))                                                   exec-directory))
422                                  t)                                #o4000))))
423                        (make-directory f))           (target (if have-shared-game-dir
424                      (setq f (expand-file-name file f))                       (expand-file-name file game-score-directory)
425                      (unless (file-exists-p f)                     (let ((f (expand-file-name game-score-directory)))
426                        (write-region "" nil f nil 'silent nil 'excl))                       (when (file-writable-p f)
427                      f))))                         (unless (eq (car-safe (file-attributes f))
428                                       t)
429                             (make-directory f))
430                           (setq f (expand-file-name file f))
431                           (unless (file-exists-p f)
432                             (write-region "" nil f nil 'silent nil 'excl)))
433                         f))))
434      (let ((default-directory "/"))      (let ((default-directory "/"))
435        (apply        (apply
436         'call-process         'call-process
# Line 432  static char *noname[] = { Line 438  static char *noname[] = {
438          (list          (list
439           (expand-file-name "update-game-score" exec-directory)           (expand-file-name "update-game-score" exec-directory)
440           nil errbuf nil           nil errbuf nil
441           "-m" (int-to-string gamegrid-score-file-length) file           "-m" (int-to-string gamegrid-score-file-length)
442             "-d" (expand-file-name game-score-directory) file
443           (int-to-string score)           (int-to-string score)
444           (concat           (concat
445            (user-full-name)            (user-full-name)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26