#include <string.h>
#include <stdio.h>
#include <malloc.h>
#include "report.h"
Functions | |
static void | insert (FILE *strings, int loc, int s, char *saved, int(*cmp)(const long, const char *)) |
Insert in-place, where value already exists in list at location loc. | |
void | sortFile (FILE *strings, int n, int s, int(*cmp)(const long, const char *)) |
Sort the given file of n elements (each of which is of size s) using given comparator function. |
static void insert | ( | FILE * | strings, | |
int | loc, | |||
int | s, | |||
char * | saved, | |||
int(*)(const long, const char *) | cmp | |||
) | [static] |
Insert in-place, where value already exists in list at location loc.
void sortFile | ( | FILE * | strings, | |
int | n, | |||
int | s, | |||
int(*)(const long, const char *) | cmp | |||
) |
Sort the given file of n elements (each of which is of size s) using given comparator function.
strings | File on disk containing n strings of size s. | |
n | Number of strings in this file. | |
s | The fixed size of the strings in the file. | |
cmp | Special comparator function that compares string in memory (a2) against location on disk (long pos). |
Algorithm Development Kit 1.0