Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/divsufsort_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ sssort(const sauchar_t *Td, const saidx_t *PA,
saidx_t depth, saidx_t n, saint_t lastsuffix);
/* trsort.c */
void
trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth);
trsort(saidx_t *ISA, saidx_t *SA, saidx_t n, saidx_t depth, saidx_t *buf, saidx_t bufsize);


#ifdef __cplusplus
Expand Down
5 changes: 3 additions & 2 deletions lib/divsufsort.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,10 @@ sort_typeBstar(const sauchar_t *T, saidx_t *SA,
}

/* Construct the inverse suffix array of type B* suffixes using trsort. */
trsort(ISAb, SA, m, 1);
buf = ISAb + m, bufsize = n - (2 * m);
trsort(ISAb, SA, m, 1, buf, bufsize);

/* Set the sorted order of tyoe B* suffixes. */
/* Set the sorted order of type B* suffixes. */
for(i = n - 1, j = m, c0 = T[n - 1]; 0 <= i;) {
for(--i, c1 = c0; (0 <= i) && ((c0 = T[i]) >= c1); --i, c1 = c0) { }
if(0 <= i) {
Expand Down
Loading