-#endif
- if (best_indxp)
- { /* there was a hole big enough for a sub entry */
- char *info = (char*) p + *best_indxp;
- short *indxp1;
-
- *--indxp = - *best_indxp;
- DICT_type(p) = 1;
- DICT_nodir (p) -= (best_no-1);
- indxp1 = (short*)((char*)p+DICT_PAGESIZE-DICT_nodir(p)*sizeof(short));
- while (indxp != indxp1)
- {
- --indxp;
- *indxp = indxp[1-best_no];
- }
- memcpy (info, &subptr, sizeof(Dict_ptr)); /* store subptr */
- info += sizeof(Dict_ptr);
- memcpy (info, &best_char, sizeof(Dict_char)); /* store sub char */
- info += sizeof(Dict_char);
- if (info_here)
- memcpy (info, info_here, *info_here+1); /* with information */
- else
- *info = 0; /* without info */
-#if CHECK
- best_indxp = NULL;
- prev_char = 0;
- indxp = (short*) ((char*) p+DICT_PAGESIZE-sizeof(short));
- for (i = DICT_nodir (p); --i >= 0; --indxp)
- {
- if (*indxp > 0) /* tail string here! */
- {
- Dict_char dc;
-
- memcpy (&dc, (char*) p + *indxp, sizeof(dc));
- assert (dc != best_char);
- assert (dc >= prev_char);
- prev_char = dc;
- }
- else
- {
- Dict_char dc;
- memcpy (&dc, (char*)p - *indxp+sizeof(Dict_ptr),
- sizeof(dc));
- assert (dc > prev_char);
- if (dc == best_char)
- {
- assert (best_indxp == NULL);
- best_indxp = indxp;
- }
- prev_char = dc;
- }
- }
- assert (best_indxp);
-#endif
- }
- else
- {
- short *indxp1, *indxp2;
- assert (0);
- DICT_type(p) = 1;
- DICT_nodir(p) -= best_no;
- indxp2 = indxp;
- indxp1 = (short*)((char*) p+DICT_PAGESIZE-DICT_nodir(p)*sizeof(short));
- do
- {
- --indxp2;
- indxp2[0] = indxp2[-best_no];
- } while (indxp2 != indxp1);
- }
- return 0;