Debugging functions, enable by running configure –enable-debug.
More...
#include <stdlib.h>
#include "debug.h"
#include "index.h"
|
void | debug_free (void *ptr, const char *file, const int line) |
| Debugging wrapper for free(void *ptr) More...
|
|
void * | debug_malloc (const size_t size, const char *file, const int line) |
| Debugging wrapper for malloc(size_t size) More...
|
|
void * | debug_realloc (void *ptr, const size_t size, const char *file, const int line) |
| Debugging wrapper for realloc(void* ptr, size_t size) More...
|
|
void * | debug_calloc (const size_t num, const size_t size, const char *file, const int line) |
| Debugging wrapper for calloc(size_t num, size_t size) More...
|
|
void | print_indx (const MOBIIndx *indx) |
| Dump index values. More...
|
|
void | print_indx_infl_old (const MOBIIndx *indx) |
| Dump inflections index (old version) More...
|
|
void | print_indx_orth_old (const MOBIIndx *indx) |
| Dump orthographic index (old version) More...
|
|
Debugging functions, enable by running configure –enable-debug.
Copyright (c) 2014 Bartek Fabiszewski http://www.fabiszewski.net
This file is part of libmobi. Licensed under LGPL, either version 3, or any later. See http://www.gnu.org/licenses/
◆ debug_calloc()
void* debug_calloc |
( |
const size_t |
num, |
|
|
const size_t |
size, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
Debugging wrapper for calloc(size_t num, size_t size)
- Parameters
-
[in] | num | Number of elements to allocate |
[in] | size | Size of each element |
[in] | file | Calling file |
[in] | line | Calling line |
- Returns
- A pointer to the allocated memory block on success, NULL on failure
◆ debug_free()
void debug_free |
( |
void * |
ptr, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
Debugging wrapper for free(void *ptr)
- Parameters
-
[in] | ptr | Pointer |
[in] | file | Calling file |
[in] | line | Calling line |
◆ debug_malloc()
void* debug_malloc |
( |
const size_t |
size, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
Debugging wrapper for malloc(size_t size)
- Parameters
-
[in] | size | Size of memory |
[in] | file | Calling file |
[in] | line | Calling line |
- Returns
- A pointer to the allocated memory block on success, NULL on failure
◆ debug_realloc()
void* debug_realloc |
( |
void * |
ptr, |
|
|
const size_t |
size, |
|
|
const char * |
file, |
|
|
const int |
line |
|
) |
| |
Debugging wrapper for realloc(void* ptr, size_t size)
- Parameters
-
[in] | ptr | Pointer |
[in] | size | Size of memory |
[in] | file | Calling file |
[in] | line | Calling line |
- Returns
- A pointer to the reallocated memory block on success, NULL on failure
◆ print_indx()
void print_indx |
( |
const MOBIIndx * |
indx | ) |
|
Dump index values.
- Parameters
-
◆ print_indx_infl_old()
void print_indx_infl_old |
( |
const MOBIIndx * |
indx | ) |
|
Dump inflections index (old version)
- Parameters
-
◆ print_indx_orth_old()
void print_indx_orth_old |
( |
const MOBIIndx * |
indx | ) |
|
Dump orthographic index (old version)
- Parameters
-