diff options
author | Eric Anderson <ejona86@gmail.com> | 2010-12-27 22:52:25 -0600 |
---|---|---|
committer | Eric Anderson <ejona86@gmail.com> | 2010-12-27 22:52:25 -0600 |
commit | d29aa371dc07b8118ec664a1ad26bb380559ab26 (patch) | |
tree | a35fdf163d26d536b8dd87a61d2c59519c556608 /lcs.c | |
parent | 1389d0e5a3c4299064d0464bdb48cc459693e8cb (diff) | |
download | md5game-d29aa371dc07b8118ec664a1ad26bb380559ab26.tar.gz md5game-d29aa371dc07b8118ec664a1ad26bb380559ab26.zip |
Reorganize structure and defines so that things are more understandable
Most things are always "compiled" now, but testing did show that gcc's
dead code elimination successfully removes them from the executable.
Testing did not show any performance impact.
Diffstat (limited to 'lcs.c')
-rw-r--r-- | lcs.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -3,7 +3,7 @@ */ #include <stdlib.h> #include <string.h> - +#include "arpa/inet.h" unsigned char tbuf[32] __attribute__((aligned(32))); #if 0 @@ -106,8 +106,7 @@ LCS(uint32, 32, 32) LCS(uint32, 32, 28) -#ifdef USE_LCS4 -int lcs_32_rough(unsigned char *str1, unsigned char *str2) { +int lcs_32_rough_4(unsigned char *str1, unsigned char *str2) { int max_length = 0; int max_length_next = 0; int offset; @@ -119,7 +118,6 @@ int lcs_32_rough(unsigned char *str1, unsigned char *str2) { } return max_length; } -#endif #endif @@ -157,9 +155,6 @@ int lcs_32_rough(unsigned char *str1, unsigned char *str2) { } #endif -#ifdef USE_PRE_LCS -#include "arpa/inet.h" - int lcs_upper_bound(const uint32_t * const str1_int, const uint32_t * const str2_int) { static char contains[256] = {0}; const unsigned char * const str1 = (const unsigned char * const)str1_int; @@ -217,7 +212,6 @@ int lcs_upper_bound(const uint32_t * const str1_int, const uint32_t * const str2 return ret; } -#endif /* Exact lcs implementation */ typedef unsigned char uchar; |