DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Opencpn-1.3.2 S52plib.cpp.patch

08.28.2009
| 2718 views |
  • submit to reddit
        // description of your code here

--- s52plib.cpp.org	2009-08-28 18:41:34.000000000 -0400
+++ s52plib.cpp	2009-08-24 00:58:52.000000000 -0400
@@ -5387,31 +5387,6 @@
 
                               else                    // No Pattern
                               {
-#ifdef __WXGTK__
-#define memset3(dest, value, count) \
-__asm__ __volatile__ ( \
-"cmp $0,%2\n\t" \
-"jg l0\n\t" \
-"je l1\n\t" \
-"jmp l2\n\t" \
-"l0:\n\t" \
-"movl  %0,(%1)\n\t" \
-"add $3,%1\n\t" \
-"dec %2\n\t" \
-"jnz l0\n\t" \
-"l1:\n\t" \
-"movb %b0,(%1)\n\t" \
-"inc %1\n\t" \
-"movb %h0,(%1)\n\t" \
-"inc %1\n\t" \
-"shr $16,%0\n\t" \
-"movb %b0,(%1)\n\t" \
-"l2:\n\t" \
-: : "a"(value), "D"(dest), "r"(count) :  );
-
-                                    int count = ixm-ix;
-                                    memset3 ( px, color_int, count )
-#else
 
                                     while ( ix <= ixm )
                                     {
@@ -5421,7 +5396,6 @@
 
                                           ix++;
                                     }
-#endif
                               }
                         }
                   }
@@ -5815,30 +5789,6 @@
 
                               else                    // No Pattern
                               {
-#ifdef __WXGTK__
-#define memset3d(dest, value, count) \
-                                    __asm__ __volatile__ ( \
-                                    "cmp $0,%2\n\t" \
-                                    "jg ld0\n\t" \
-                                    "je ld1\n\t" \
-                                    "jmp ld2\n\t" \
-                                    "ld0:\n\t" \
-                                    "movl  %0,(%1)\n\t" \
-                                    "add $3,%1\n\t" \
-                                    "dec %2\n\t" \
-                                    "jnz ld0\n\t" \
-                                    "ld1:\n\t" \
-                                    "movb %b0,(%1)\n\t" \
-                                    "inc %1\n\t" \
-                                    "movb %h0,(%1)\n\t" \
-                                    "inc %1\n\t" \
-                                    "shr $16,%0\n\t" \
-                                    "movb %b0,(%1)\n\t" \
-                                    "ld2:\n\t" \
-                                          : : "a"(value), "D"(dest), "r"(count) :  );
-                                    int count = ixm-ix;
-                                    memset3d ( px, color_int, count )
-#else
 
                                     while ( ix <= ixm )
                                     {
@@ -5848,7 +5798,6 @@
 
                                           ix++;
                                     }
-#endif
                               }
                         }
                   }