emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lib-src/update-game-score.c [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lib-src/update-game-score.c [lexbind]
Date: Tue, 14 Oct 2003 19:59:26 -0400

Index: emacs/lib-src/update-game-score.c
diff -c emacs/lib-src/update-game-score.c:1.10.2.1 
emacs/lib-src/update-game-score.c:1.10.2.2
*** emacs/lib-src/update-game-score.c:1.10.2.1  Fri Apr  4 01:19:55 2003
--- emacs/lib-src/update-game-score.c   Tue Oct 14 19:59:14 2003
***************
*** 1,5 ****
  /* update-game-score.c --- Update a score file
!    Copyright (C) 2002 Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
--- 1,5 ----
  /* update-game-score.c --- Update a score file
!    Copyright (C) 2002, 2003 Free Software Foundation, Inc.
  
  This file is part of GNU Emacs.
  
***************
*** 68,73 ****
--- 68,78 ----
  #define P_(proto) ()
  #endif
  
+ #ifndef HAVE_DIFFTIME
+ /* OK on POSIX (time_t is arithmetic type) modulo overflow in subtraction.  */
+ #define difftime(t1, t0) (double)((t1) - (t0))
+ #endif
+ 
  int
  usage (err)
       int err;
***************
*** 111,116 ****
--- 116,138 ----
  
  void lose_syserr P_ ((const char *msg)) NO_RETURN;
  
+ /* Taken from sysdep.c.  */
+ #ifndef HAVE_STRERROR
+ #ifndef WINDOWSNT
+ char *
+ strerror (errnum)
+      int errnum;
+ {
+   extern char *sys_errlist[];
+   extern int sys_nerr;
+ 
+   if (errnum >= 0 && errnum < sys_nerr)
+     return sys_errlist[errnum];
+   return (char *) "Unknown error";
+ }
+ #endif /* not WINDOWSNT */
+ #endif /* ! HAVE_STRERROR */
+ 
  void
  lose_syserr (msg)
       const char *msg;
***************
*** 357,363 ****
        scorecount++;
        if (scorecount >= cursize)
        {
!         ret = (struct score_entry *) realloc (ret, cursize *= 2);
          if (!ret)
            return -1;
        }
--- 379,387 ----
        scorecount++;
        if (scorecount >= cursize)
        {
!         cursize *= 2;
!         ret = (struct score_entry *)
!           realloc (ret, (sizeof (struct score_entry) * cursize));
          if (!ret)
            return -1;
        }
***************
*** 504,506 ****
--- 528,533 ----
    errno = saved_errno;
    return ret;
  }
+ 
+ /* arch-tag: 2bf5c52e-4beb-463a-954e-c58b9c64736b
+    (do not change this comment) */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]