Prototypes | |
| static void | reduce_houghFstat_toplist_precision (toplist_t *l) |
| static int | _atomic_write_houghFstat_toplist_to_file (toplist_t *l, const char *filename, UINT4 *checksum, int write_done) |
| static int | print_houghFstatline_to_str (HoughFstatOutputEntry fline, char *buf, int buflen) |
| static int | houghFstat_toplist_qsort_function (const void *a, const void *b) |
| static int | houghFstat_smaller (const void *a, const void *b) |
| int | create_houghFstat_toplist (toplist_t **tl, UINT8 length) |
| creates a toplist with length elements, returns -1 on error (usually out of memory), else 0 More... | |
| void | free_houghFstat_toplist (toplist_t **l) |
| frees the space occupied by the toplist More... | |
| int | insert_into_houghFstat_toplist (toplist_t *tl, HoughFstatOutputEntry elem) |
| Inserts an element in to the toplist either if there is space left or the element is larger than the smallest element in the toplist. More... | |
| void | sort_houghFstat_toplist (toplist_t *l) |
| sorts the toplist with an internal sorting function, used before finally writing it More... | |
| int | read_houghFstat_toplist_from_fp (toplist_t *l, FILE *fp, UINT4 *checksum, UINT4 maxbytes) |
| reads a (created!) toplist from an open filepointer sets the checksum if non-NULL reads maximum maxbytes, all that is there if maxbytes is 0 returns the number of bytes read, 0 if we found a DONE marker at the end, -1 if the file contained a syntax error, -2 if given an improper toplist More... | |
| int | write_houghFstat_toplist_item_to_fp (HoughFstatOutputEntry fline, FILE *fp, UINT4 *checksum) |
| File IO. More... | |
| static void | reduce_houghFstatline_precision (void *line) |
| int | write_houghFstat_toplist_to_fp (toplist_t *tl, FILE *fp, UINT4 *checksum) |
| Writes the toplist to an (already open) filepointer Returns the number of written charactes sets the checksum if non-NULL Returns something <0 on error. More... | |
| int | atomic_write_houghFstat_toplist_to_file (toplist_t *l, const char *filename, UINT4 *checksum) |
| writes the given toplitst to a temporary file, then renames the temporary file to filename. More... | |
| int | final_write_houghFstat_toplist_to_file (toplist_t *l, const char *filename, UINT4 *checksum) |
| meant for the final writing of the toplist More... | |
| int | write_hfs_checkpoint (const char *filename, toplist_t *tl, UINT4 counter, BOOLEAN do_sync) |
| new, simpler checkpointing for HierarchicalSearch More... | |
| int | read_hfs_checkpoint (const char *filename, toplist_t *tl, UINT4 *counter) |
| tries to read a checkpoint More... | |
| int | write_hfs_oputput (const char *filename, toplist_t *tl) |
| write the final output file: More... | |
Go to the source code of this file.
Macros | |
| #define | min(a, b) ((a)<(b)?(a):(b)) |
| #define | SYNC_FAIL_LIMIT 5 |
| #define | TEMP_EXT ".tmp" |
| #define | __func__ "" |
| log an I/O error, i.e. More... | |
| #define | LOGIOERROR(mess, filename) |
| #define | TMP_EXT ".tmp" |
Definition at line 61 of file HoughFstatToplist.c.
| #define SYNC_FAIL_LIMIT 5 |
Definition at line 65 of file HoughFstatToplist.c.
| #define TEMP_EXT ".tmp" |
| #define __func__ "" |
log an I/O error, i.e.
source code line no., ferror, errno and strerror, and doserrno on Windows, too
Definition at line 515 of file HoughFstatToplist.c.
| #define LOGIOERROR | ( | mess, | |
| filename | |||
| ) |
Definition at line 524 of file HoughFstatToplist.c.
| #define TMP_EXT ".tmp" |
|
static |
Definition at line 381 of file HoughFstatToplist.c.
|
static |
Definition at line 424 of file HoughFstatToplist.c.
|
static |
Definition at line 294 of file HoughFstatToplist.c.
Definition at line 74 of file HoughFstatToplist.c.
Definition at line 98 of file HoughFstatToplist.c.
creates a toplist with length elements, returns -1 on error (usually out of memory), else 0
Definition at line 112 of file HoughFstatToplist.c.
| void free_houghFstat_toplist | ( | toplist_t ** | l | ) |
frees the space occupied by the toplist
Definition at line 119 of file HoughFstatToplist.c.
| int insert_into_houghFstat_toplist | ( | toplist_t * | list, |
| HoughFstatOutputEntry | line | ||
| ) |
Inserts an element in to the toplist either if there is space left or the element is larger than the smallest element in the toplist.
In the latter case, remove the smallest element from the toplist Returns 1 if the element was actually inserted, 0 if not.
Definition at line 141 of file HoughFstatToplist.c.
| void sort_houghFstat_toplist | ( | toplist_t * | l | ) |
sorts the toplist with an internal sorting function, used before finally writing it
Definition at line 152 of file HoughFstatToplist.c.
reads a (created!) toplist from an open filepointer sets the checksum if non-NULL reads maximum maxbytes, all that is there if maxbytes is 0 returns the number of bytes read, 0 if we found a DONE marker at the end, -1 if the file contained a syntax error, -2 if given an improper toplist
Definition at line 163 of file HoughFstatToplist.c.
| int write_houghFstat_toplist_item_to_fp | ( | HoughFstatOutputEntry | line, |
| FILE * | fp, | ||
| UINT4 * | checksum | ||
| ) |
File IO.
writes an HoughFstatOutputEntry line to an open filepointer. Returns the number of chars written, -1 if in error Updates checksum if given (i.e. not NULL)
Definition at line 341 of file HoughFstatToplist.c.
|
static |
Definition at line 365 of file HoughFstatToplist.c.
Writes the toplist to an (already open) filepointer Returns the number of written charactes sets the checksum if non-NULL Returns something <0 on error.
Definition at line 390 of file HoughFstatToplist.c.
| int atomic_write_houghFstat_toplist_to_file | ( | toplist_t * | list, |
| const char * | filename, | ||
| UINT4 * | checksum | ||
| ) |
writes the given toplitst to a temporary file, then renames the temporary file to filename.
The name of the temporary file is derived from the filename by appending ".tmp". Returns the number of chars written or -1 if the temp file could not be opened.
Definition at line 416 of file HoughFstatToplist.c.
| int final_write_houghFstat_toplist_to_file | ( | toplist_t * | list, |
| const char * | filename, | ||
| UINT4 * | checksum | ||
| ) |
meant for the final writing of the toplist
Definition at line 494 of file HoughFstatToplist.c.
new, simpler checkpointing for HierarchicalSearch
writes a checkpoint:
Definition at line 530 of file HoughFstatToplist.c.
tries to read a checkpoint
Definition at line 642 of file HoughFstatToplist.c.
write the final output file:
Definition at line 758 of file HoughFstatToplist.c.