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

Jörg Sommer joerg at alea.gnuu.de
Mon Jun 16 15:48:28 UTC 2008


The following commit has been merged in the jo-upstream-fixes branch:
commit 965520d16867516db1ca79e02ffce882b29d96f2
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