#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "../cl/cl.h"| #define MAX_COL_WIDTH 256 |
Referenced by parse_args(), and print_next_region().
| #define MIN_COL_WIDTH 20 |
Referenced by parse_args().
| #define WIDE_COL_SEP 6 |
Referenced by parse_args().
| #define WIDE_COL_WIDTH 55 |
Referenced by parse_args().
| void end_of_alignment | ( | void | ) |
Exits the program because the end of the .align file has been reached.
References goodbye().
Referenced by print_next_region(), and skip_next_region().
| void goodbye | ( | int | error_level | ) |
Closes the alignment file handle (if open) and exits the program.
| error_level | The exit code that is returned to the OS. |
References af, af_is_pipe, and line.
Referenced by end_of_alignment(), and main().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Main function for cwb-align-show.
| argc | Number of command-line arguments. | |
| argv | Command-line arguments. |
References af, af_is_pipe, align_name, ATT_POS, ATT_STRUC, cl_free, cl_malloc(), cl_new_attribute, cl_new_corpus, corpus1_name, corpus2_name, goodbye(), line, parse_args(), print_help(), print_next_region(), progname, registry_dir, s1_name, s2_name, skip_next_region(), and word_name.
| int parse_args | ( | int | ac, | |
| char * | av[], | |||
| int | min_args | |||
| ) |
Parses the program's commandline arguments.
Usage: optindex = parse_args(argc, argv, required_arguments);
| ac | The program's argc | |
| av | The program's argv | |
| min_args | Minimum number of arguments to be parsed. |
References COL_SEP, COL_WIDTH, MAX_COL_WIDTH, MIN_COL_WIDTH, print_usage(), progname, registry_dir, WIDE_COL_SEP, WIDE_COL_WIDTH, and word_name.
| void print_help | ( | void | ) |
| void print_next_region | ( | FILE * | f | ) |
Reads the next alignment region from a .align file, and displays it on STDOUT.
| f | The file handle to read from. |
References COL_SEP, COL_WIDTH, end_of_alignment(), get_string_at_position(), line, MAX_COL_WIDTH, progname, and word.
Referenced by main().
| void print_usage | ( | void | ) |
Prints a message describing how to use the program to STDERR and then exits.
References COL_SEP, COL_WIDTH, print_help(), and progname.
| void skip_next_region | ( | FILE * | f | ) |
Reads and discards the next alignment region from an .align file.
| f | The file handle to read from. |
References end_of_alignment(), and line.
Referenced by main().
| int af_is_pipe |
| char* align_name = "" |
name of the .align file
Referenced by main().
| int COL_SEP = 2 |
column separator (blanks)
Referenced by parse_args(), print_next_region(), and print_usage().
| int COL_WIDTH = 38 |
width of a display column (one column for each language)
Referenced by parse_args(), print_next_region(), and print_usage().
| char corpus1_name[1024] |
name of the source corpus
Referenced by main().
| char corpus2_name[1024] |
name of the target corpus
Referenced by main().
| char* progname = "" |
Name of the program (from the shell).
| char* registry_dir = NULL |
registry directory (NULL = use CL default)
sentence attribute handle: source
Referenced by do_cqi_cl_alg2cpos(), group2compare(), and i2compare().
sentence attribute handle: target
Referenced by do_cqi_cl_alg2cpos(), group2compare(), and i2compare().
{word} attribute (or whatever is selected with -P) attribute handle: source
Referenced by main().
{word} attribute (or whatever is selected with -P) attribute handle: target
Referenced by main().
| char word_name[1024] = "word" |
name of the p-attribute used to display tokens (usually word)
Referenced by main(), and parse_args().
1.6.1