Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for libplaton/platon/str/strmmx.c between version 1.11 and 1.12

version 1.11, 2002/10/11 20:21:37 version 1.12, 2003/02/25 11:17:03
Line 1 
Line 1 
 /* @file platon/str/strmmx.c  
  * @author Lynx <mizon@centrum.sk>  
  * String functions based on mmx instructions  
  */  
 #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
 #  include "config.h"  #  include "config.h"
 #endif  #endif
Line 12 
Line 8 
 #include <unistd.h>  #include <unistd.h>
   
 #include <platon/str/strmmx.h>  #include <platon/str/strmmx.h>
   
 /* Function for align string length to multiple of 8  /* Function for align string length to multiple of 8
  */   */
 static int align(const int n)  static int align(const int n)
Line 22  static int align(const int n)
Line 19  static int align(const int n)
 char *PLATON_FUNC(strcpymmx)(void *dest, const void *src)  char *PLATON_FUNC(strcpymmx)(void *dest, const void *src)
 {  {
         int len = strlen(src);          int len = strlen(src);
         char *ret = memcpymmx(dest, src, len);          char *ret = PLATON_FUNC(memcpymmx)(dest, src, len);
         ret[len] = '\0';          ret[len] = '\0';
         return ret;          return ret;
 }  }
   
 char *PLATON_FUNC(strncpymmx)(void *dest, const void *src, size_t n)  char *PLATON_FUNC(strncpymmx)(void *dest, const void *src, size_t n)
 {  {
         char *ret = memcpymmx(dest, src, n);          char *ret = PLATON_FUNC(memcpymmx)(dest, src, n);
         ret[n] = '\0';          ret[n] = '\0';
         return ret;          return ret;
 }  }
Line 109  int main(int argc, char *argv[])
Line 106  int main(int argc, char *argv[])
         pole1 = (char *) malloc(bsize);          pole1 = (char *) malloc(bsize);
         pole2 = (char *) malloc(bsize);          pole2 = (char *) malloc(bsize);
         n = atoi(argv[2]) / bsize;          n = atoi(argv[2]) / bsize;
         memsetmmx(pole1, 'A', bsize);          PLATON_FUNC(memsetmmx)(pole1, 'A', bsize);
         for (i = 0; i <= n; i++)          for (i = 0; i <= n; i++)
                 memcpymmx(pole2, pole1, bsize);                  PLATON_FUNC(memcpymmx)(pole2, pole1, bsize);
   
         return 0;          return 0;
 }  }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top