+ return 1;
+ }
+ /* xlen < userlen, expanding needed ... */
+ if (DICT_size(p)+sizeof(Dict_char)+sizeof(Dict_ptr)+
+ userlen >=
+ DICT_bsize(p) - (1+DICT_nodir(p))*sizeof(short))
+ {
+ /* not enough room - split needed ... */
+ if (DICT_type(p) == 1)
+ {
+ clean_page (dict, ptr, p, NULL, 0, NULL);
+ return dict_ins (dict, str-1, ptr,
+ userlen, userinfo);
+ }
+ if (split_page (dict, ptr, p))
+ {
+ yaz_log (YLOG_FATAL, "Unable to split page %d\n", ptr);
+ abort ();
+ }
+ return dict_ins (dict, str-1, ptr, userlen, userinfo);