summaryrefslogtreecommitdiff
path: root/lcs.c
diff options
context:
space:
mode:
authorEric Anderson <ejona86@gmail.com>2010-12-27 22:52:25 -0600
committerEric Anderson <ejona86@gmail.com>2010-12-27 22:52:25 -0600
commitd29aa371dc07b8118ec664a1ad26bb380559ab26 (patch)
treea35fdf163d26d536b8dd87a61d2c59519c556608 /lcs.c
parent1389d0e5a3c4299064d0464bdb48cc459693e8cb (diff)
downloadmd5game-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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lcs.c b/lcs.c
index 2ea6f87..17d80e9 100644
--- a/lcs.c
+++ b/lcs.c
@@ -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;