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 | TEMP_EXT ".tmp" |
#define | __func__ "" |
log an I/O error, i.e. More... | |
#define | LOGIOERROR(mess, filename) |
#define | TMP_EXT ".tmp" |
Definition at line 64 of file CrossCorrToplist.c.
#define SYNC_FAIL_LIMIT 5 |
Definition at line 68 of file CrossCorrToplist.c.
#define TEMP_EXT ".tmp" |
#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 865 of file CrossCorrToplist.c.
#define LOGIOERROR | ( | mess, | |
filename | |||
) |
Definition at line 874 of file CrossCorrToplist.c.
#define TMP_EXT ".tmp" |
|
static |
Definition at line 625 of file CrossCorrToplist.c.
|
static |
Definition at line 701 of file CrossCorrToplist.c.
|
static |
Definition at line 767 of file CrossCorrToplist.c.
|
static |
Definition at line 498 of file CrossCorrToplist.c.
|
static |
Definition at line 518 of file CrossCorrToplist.c.
Definition at line 80 of file CrossCorrToplist.c.
Definition at line 116 of file CrossCorrToplist.c.
Definition at line 152 of file CrossCorrToplist.c.
Definition at line 164 of file CrossCorrToplist.c.
creates a toplist with length elements, returns -1 on error (usually out of memory), else 0
Definition at line 179 of file CrossCorrToplist.c.
Definition at line 184 of file CrossCorrToplist.c.
void free_crossCorr_toplist | ( | toplist_t ** | l | ) |
frees the space occupied by the toplist
Definition at line 191 of file CrossCorrToplist.c.
int insert_into_crossCorr_toplist | ( | toplist_t * | list, |
CrossCorrOutputEntry | 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 202 of file CrossCorrToplist.c.
int insert_into_crossCorrBinary_toplist | ( | toplist_t * | tl, |
CrossCorrBinaryOutputEntry | elem | ||
) |
Definition at line 212 of file CrossCorrToplist.c.
void sort_crossCorr_toplist | ( | toplist_t * | list | ) |
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
sorts the toplist with an internal sorting function, used before finally writing it
Definition at line 225 of file CrossCorrToplist.c.
void sort_crossCorrBinary_toplist | ( | toplist_t * | l | ) |
Definition at line 231 of file CrossCorrToplist.c.
int write_crossCorr_toplist_item_to_fp | ( | CrossCorrOutputEntry | line, |
FILE * | fp, | ||
UINT4 * | checksum | ||
) |
File IO.
writes a CrossCorrOutputEntry 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 539 of file CrossCorrToplist.c.
int write_crossCorrBinary_toplist_item_to_fp | ( | CrossCorrBinaryOutputEntry | fline, |
FILE * | fp, | ||
UINT4 * | checksum | ||
) |
Definition at line 561 of file CrossCorrToplist.c.
|
static |
Definition at line 584 of file CrossCorrToplist.c.
|
static |
Definition at line 604 of file CrossCorrToplist.c.
|
static |
Definition at line 631 of file CrossCorrToplist.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 640 of file CrossCorrToplist.c.
Definition at line 662 of file CrossCorrToplist.c.
int atomic_write_crossCorr_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 688 of file CrossCorrToplist.c.
int atomic_write_crossCorrBinary_toplist_to_file | ( | toplist_t * | l, |
const char * | filename, | ||
UINT4 * | checksum | ||
) |
Definition at line 693 of file CrossCorrToplist.c.
int final_write_crossCorr_toplist_to_file | ( | toplist_t * | list, |
const char * | filename, | ||
UINT4 * | checksum | ||
) |
meant for the final writing of the toplist
Definition at line 838 of file CrossCorrToplist.c.
int final_write_crossCorrBinary_toplist_to_file | ( | toplist_t * | l, |
const char * | filename, | ||
UINT4 * | checksum | ||
) |
Definition at line 846 of file CrossCorrToplist.c.
writes a checkpoint:
Definition at line 880 of file CrossCorrToplist.c.
tries to read a checkpoint
Definition at line 992 of file CrossCorrToplist.c.
write the final output file:
Definition at line 1108 of file CrossCorrToplist.c.