Added some code to use a hash table for duplicates. Commented also.
[selector.git] / selector.cc
index 2a6a4f3..53b65bb 100644 (file)
@@ -58,6 +58,24 @@ int remove_duplicates = 0;
 
 //////////////////////////////////////////////////////////////////////
 
 
 //////////////////////////////////////////////////////////////////////
 
+// int test_and_set_hash(char *s, char **hashed, int hash_size) {
+  // uint32_t code = 0, mask;
+  // int result;
+
+  // for(int k = 0; s[k]; k++) {
+    // code += ((uint32_t) (s[k])) << (8 * k%4);
+  // }
+
+  // code = code%hash_table_size;
+
+  // if(hashed[code]) {
+  // } else {
+    
+  // }
+// }
+
+//////////////////////////////////////////////////////////////////////
+
 // This looks severely Linux-only ...
 
 void inject_into_tty_buffer(char *line) {
 // This looks severely Linux-only ...
 
 void inject_into_tty_buffer(char *line) {