CWB
Functions | Variables
cwb-align-encode.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../cl/globals.h"
#include "../cl/storage.h"
#include "../cl/attributes.h"

Functions

void alignencode_usage (void)
 Prints a message describing how to use the program to STDERR and then exits. More...
 
int alignencode_parse_args (int ac, char *av[], int min_args)
 Parses the program's commandline arguments. More...
 
int main (int argc, char *argv[])
 Main function for cwb-align-encode. More...
 

Variables

char * progname = ""
 Name of the program (from the shell) More...
 
int compatibility = 0
 create .alg file for backward compatibility ? More...
 
char * registry_dir = NULL
 CL registry directory. More...
 
int reverse = 0
 encode inverse alignment? More...
 
char * data_dir = NULL
 where to store encoded alignment attribute More...
 
int data_dir_from_corpus = 0
 determine data directory from registry entry? More...
 
int verbose = 0
 print some information about what files are created More...
 

Function Documentation

int alignencode_parse_args ( int  ac,
char *  av[],
int  min_args 
)

Parses the program's commandline arguments.

Usage:

optindex = alignencode_parse_args(argc, argv, required_arguments);

Parameters
acThe program's argc
avThe program's argv
min_argsMinimum number of arguments to be parsed.
Returns
The value of optind after parsing, ie the index of the first argument in argv[]

References alignencode_usage(), compatibility, data_dir, data_dir_from_corpus, progname, registry_dir, reverse, and verbose.

Referenced by main().

void alignencode_usage ( void  )

Prints a message describing how to use the program to STDERR and then exits.

References progname, and VERSION.

Referenced by alignencode_parse_args().

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

int compatibility = 0

create .alg file for backward compatibility ?

Referenced by alignencode_parse_args(), and main().

char* data_dir = NULL

where to store encoded alignment attribute

Referenced by alignencode_parse_args(), and main().

int data_dir_from_corpus = 0

determine data directory from registry entry?

Referenced by alignencode_parse_args(), and main().

char* progname = ""

Name of the program (from the shell)

Referenced by alignencode_parse_args(), alignencode_usage(), and main().

char* registry_dir = NULL

CL registry directory.

Referenced by alignencode_parse_args(), and main().

int reverse = 0

encode inverse alignment?

Referenced by alignencode_parse_args(), and main().

int verbose = 0

print some information about what files are created

Referenced by alignencode_parse_args(), and main().