version 1.49.2.15, 2014/03/23 12:37:58 |
version 1.49.2.18, 2014/08/14 04:13:30 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
#include "config.h" |
#endif |
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
|
|
|
|
#if defined(__APPLE__) |
#if defined(__APPLE__) |
# include <libkern/OSByteOrder.h> |
# include <libkern/OSByteOrder.h> |
#elif defined(__linux__) |
#elif defined(__linux__) || defined(__CYGWIN__) |
# include <endian.h> |
# include <endian.h> |
#elif defined(__sun) |
#elif defined(__sun) |
# include <sys/byteorder.h> |
# include <sys/byteorder.h> |
|
|
# include <sys/endian.h> |
# include <sys/endian.h> |
#endif |
#endif |
|
|
#if defined(__linux__) || defined(__sun) |
#if defined(__linux__) || defined(__CYGWIN__) || defined(__sun) |
# include <db_185.h> |
# include <db_185.h> |
#else |
#else |
# include <db.h> |
# include <db.h> |
Line 984 index_prune(const struct of *ofile, struct mdb *mdb, s |
|
Line 982 index_prune(const struct of *ofile, struct mdb *mdb, s |
|
cont: |
cont: |
if (recs->cur >= recs->size) { |
if (recs->cur >= recs->size) { |
recs->size += MANDOC_SLOP; |
recs->size += MANDOC_SLOP; |
recs->stack = mandoc_realloc(recs->stack, |
recs->stack = mandoc_reallocarray(recs->stack, |
recs->size * sizeof(recno_t)); |
recs->size, sizeof(recno_t)); |
} |
} |
|
|
recs->stack[(int)recs->cur] = recs->last; |
recs->stack[(int)recs->cur] = recs->last; |