X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Findex.h;h=bab49b952dcaca54ecbcb43058eecfb494f91e09;hb=5bb0345810e5d0097488fffd1216b9ed0b4b9d05;hp=b3489683e3bdf55bc42f5d70568bce52c3289d7b;hpb=acf9a9cad0fecde738ccea5a6005a7e87dfcadc9;p=libucw.git diff --git a/lib/index.h b/lib/index.h index b3489683..bab49b95 100644 --- a/lib/index.h +++ b/lib/index.h @@ -1,7 +1,7 @@ /* * Sherlock: Data structures used in indices * - * (c) 2001--2003 Martin Mares + * (c) 2001--2004 Martin Mares */ #ifndef _SHERLOCK_INDEX_H @@ -9,7 +9,7 @@ #include "custom/lib/custom.h" -#define INDEX_VERSION (0x32300100+sizeof(struct card_attr)) /* Increase with each incompatible change in index format */ +#define INDEX_VERSION (0x32260200+sizeof(struct card_attr)) /* Increase with each incompatible change in index format */ /* * Words @@ -79,6 +79,7 @@ enum card_flag { CARD_FLAG_MERGED = 8, /* Destination of a merge [merger] */ CARD_FLAG_IMAGE = 16, /* Is an image object [scanner] */ CARD_FLAG_FRAMESET = 32, /* Contains a frameset to be ignored [scanner] */ + CARD_FLAG_OVERRIDEN = 64, /* Overriden by another index [sherlockd] */ }; #define CARD_POS_SHIFT 5 /* Card positions are shifted this # of bits to the right */ @@ -99,6 +100,7 @@ enum card_flag { #define CA_GET_FILE_LANG(a) ((a)->type_flags & 0x80 ? 0 : CA_GET_FILE_INFO(a)) #define FILETYPE_ATTRS SMALL_SET_ATTR(ftype, FILETYPE, CA_GET_FILE_TYPE, ext_ft_parse) #define MAX_FILE_TYPES 8 +#define FILETYPE_IS_TEXT(f) ((f) < 4) byte *ext_ft_parse(u32 *dest, byte *value, uns intval); extern byte *custom_file_type_names[MAX_FILE_TYPES]; #else @@ -126,10 +128,16 @@ void fingerprint(byte *string, struct fingerprint *fp); static inline u32 fp_hash(struct fingerprint *fp) { - /* This hash is expected to be monotonic wrt. fpsort's order by fprecog */ return (fp->hash[0] << 24) | (fp->hash[1] << 16) | (fp->hash[2] << 8) | fp->hash[3]; } +/* The card fingerprints */ + +struct card_print { + struct fingerprint fp; + u32 cardid; +}; + /* URL keys */ #define URL_KEY_BUF_SIZE (3*MAX_URL_SIZE)