| Index: courgette/third_party/divsufsort/divsufsort_private.h
|
| diff --git a/courgette/third_party/divsufsort/divsufsort_private.h b/courgette/third_party/divsufsort/divsufsort_private.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..33c53f1072211fd859b4f18fcc224868ef3beaf7
|
| --- /dev/null
|
| +++ b/courgette/third_party/divsufsort/divsufsort_private.h
|
| @@ -0,0 +1,57 @@
|
| +// Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
|
| +//
|
| +// For the terms under which this work may be distributed, please see
|
| +// the adjoining file "LICENSE".
|
| +//
|
| +// ChangeLog:
|
| +// 2016-07-22 - Initial commit and adaption to use PagedArray.
|
| +// --Samuel Huang <huangs@chromium.org>
|
| +
|
| +#ifndef COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
|
| +#define COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
|
| +
|
| +#include <assert.h>
|
| +#include <stdint.h>
|
| +#include <stdio.h>
|
| +
|
| +#include "courgette/third_party/divsufsort/divsufsort.h"
|
| +
|
| +namespace divsuf {
|
| +
|
| +/*- Constants -*/
|
| +#if !defined(UINT8_MAX)
|
| +# define UINT8_MAX (255)
|
| +#endif /* UINT8_MAX */
|
| +#if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1)
|
| +# undef ALPHABET_SIZE
|
| +#endif
|
| +#if !defined(ALPHABET_SIZE)
|
| +# define ALPHABET_SIZE (UINT8_MAX + 1)
|
| +#endif
|
| +
|
| +/*- Macros -*/
|
| +#ifndef SWAP
|
| +# define SWAP(_a, _b) do { t = (_a); (_a) = (_b); (_b) = t; } while(0)
|
| +#endif /* SWAP */
|
| +#ifndef MIN
|
| +# define MIN(_a, _b) (((_a) < (_b)) ? (_a) : (_b))
|
| +#endif /* MIN */
|
| +#ifndef MAX
|
| +# define MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
|
| +#endif /* MAX */
|
| +
|
| +/*- Private Prototypes -*/
|
| +/* sssort.c */
|
| +void
|
| +sssort(const sauchar_t *T, const_saidx_it PA,
|
| + saidx_it first, saidx_it last,
|
| + saidx_it buf, saidx_t bufsize,
|
| + saidx_t depth, saidx_t n, saint_t lastsuffix);
|
| +
|
| +/* trsort.c */
|
| +void
|
| +trsort(saidx_it ISA, saidx_it SA, saidx_t n, saidx_t depth);
|
| +
|
| +} // namespace divsuf
|
| +
|
| +#endif // COURGETTE_BSDIFF_THIRD_PARTY_DIVSUFSORT_PRIVATE_H_
|
|
|