[Pkg-jed-commit] [SCM] Debian packaging of JED branch, jo-upstream-fixes, updated. 3bb27317d2e41070ee40080b18e63f569c2ac79e

Jörg Sommer joerg at alea.gnuu.de
Thu May 29 19:51:20 UTC 2008


The following commit has been merged in the jo-upstream-fixes branch:
commit d9043a192d328d71630fd6a86d9ee2c51847c953
Author: Jörg Sommer <joerg at alea.gnuu.de>
Date:   Thu May 29 16:49:55 2008 +0200

    Use memmove instead of for loop
    
    memmove is a function from the standards C89 and C99. It might be faster
    than the selfmade code, because it might be optimized for some
    architectures.

diff --git a/src/sysdep.c b/src/sysdep.c
index e400b80..77e5c06 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -225,13 +225,9 @@ int my_getkey() /*{{{*/
 #endif
      
      Input_Buffer_Len--;
-   imax = Input_Buffer_Len;
 
-   for (i = 0; i < imax; i++)
-     Input_Buffer[i] = Input_Buffer[i+1];
+   memmove(Input_Buffer, &Input_Buffer[1], Input_Buffer_Len);
 
-   /* SLMEMCPY ((char *) Input_Buffer, (char *) (Input_Buffer + 1), imax); */
-   
 #ifdef DONE_WITH_INPUT_BUFFER
    DONE_WITH_INPUT_BUFFER
 #endif     

-- 
Debian packaging of JED



More information about the Pkg-jed-commit mailing list