+ {
+ int xlen;
+
+ xlen = info[sizeof(Dict_ptr)+sizeof(Dict_char)];
+ if (xlen == userlen)
+ {
+ if (memcmp (info+sizeof(Dict_ptr)+sizeof(Dict_char)+1,
+ userinfo, userlen))
+ {
+ dict_bf_touch (dict->dbf, ptr);
+ memcpy (info+sizeof(Dict_ptr)+sizeof(Dict_char)+1,
+ userinfo, userlen);
+ return 1;
+ }
+ return 2;
+ }
+ else if (xlen > userlen)
+ {
+ DICT_type(p) = 1;
+ info[sizeof(Dict_ptr)+sizeof(Dict_char)] = userlen;
+ memcpy (info+sizeof(Dict_ptr)+sizeof(Dict_char)+1,
+ userinfo, userlen);
+ dict_bf_touch (dict->dbf, ptr);
+ return 1;
+ }
+ if (DICT_size(p)+sizeof(Dict_char)+sizeof(Dict_ptr)+
+ userlen >=
+ DICT_PAGESIZE - (1+DICT_nodir(p))*sizeof(short))
+ {
+ if (DICT_type(p) == 1)
+ {
+ clean_page (dict, ptr, p, NULL);
+ dict_bf_touch (dict->dbf, ptr);
+ return dict_ins (dict, str-1, ptr,
+ userlen, userinfo);
+ }
+ if (split_page (dict, ptr, p))
+ {
+ log (LOG_FATAL, "Unable to split page %d\n", ptr);
+ abort ();
+ }
+ return dict_ins (dict, str-1, ptr, userlen, userinfo);
+ }
+ else