#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <string.h>
#include <libgen.h>
#include "db.h"
#include "compute.h"
#include "config.h"
#include "helper.h"
#include "threads.h"
Defines | |
#define | NON_EXTERN_GLOBALS |
This macro sets, where global variables should be extern and where not. | |
Functions | |
void | help (char **argv) |
Just printout brief help about usage. | |
int | main (int argc, char **argv) |
Main. | |
Variables | |
int | verbose |
Global variable controlling verbosity of output. | |
unsigned int | maxlen |
Maximal length of prefix. | |
unsigned int | minlen |
Minimal length of prefix. | |
unsigned int | longest |
Longest word from input file. | |
char * | optarg |
String used by getopt library. | |
bool | numbered |
Are occurrences included in input file? | |
char * | affstring |
How do we call that thing, that we want to recognize. |
This file contains main function (
int main | ( | int | argc, | |
char ** | argv | |||
) |
Main.
Main function. It parses command-line arguments and run other functions. Program itself is really easy. It just parse input file, compute statistics, use statistics to find prefixes, and save them. This is also reflected in main. It could be much shorter, but I'm too lazy to write separate function just because of parsing command-line arguments.
References affstring, CHECK_PTR, compute_stats(), destroy_db(), find_it(), help(), init_db(), init_pool(), longest, maxlen, minlen, numbered, optarg, print_it(), and verbose.
unsigned int longest |
Longest word from input file.
Longest word found.
Referenced by compute_stats(), find_it_thread(), for_each_segment(), main(), and sqrs().
int verbose |
Global variable controlling verbosity of output.
It is used by outputting macros. Possible values are:
Referenced by main(), and print_it().