#include <ctype.h>#include "../cl/globals.h"#include "../cl/cl.h"#include "../cl/corpus.h"#include "../cl/attributes.h"| #define MAX_ATTRS 1024 |
Maximum number of attributes that can be printed.
Referenced by add_attribute().
| #define MAX_PRINT_VALUES 1024 |
Referenced by main().
| typedef enum _output_modes OutputMode |
| enum _output_modes |
| int add_attribute | ( | Attribute * | attr | ) |
References _Attribute::any, attr_member(), cleanup(), corpus_id, MAX_ATTRS, and print_list_index.
Referenced by main().
Referenced by add_attribute(), and verify_print_value_list().
| void cleanup | ( | int | error_code | ) |
Cleans up memory prior to an error-prompted exit.
| error_code | Value to be returned by the program when it exits. |
References drop_corpus().
| int is_num | ( | char * | s | ) |
Check whether a string represents a number.
| s | The string to check. |
Referenced by main().
| char* lisp_string | ( | char * | s | ) |
References LispMode, MAX_LINE_LENGTH, and mode.
Referenced by show_position_values(), and showSurroundingStructureValues().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Main function for cwb-decode.
| argc | Number of command-line arguments. | |
| argv | Command-line arguments. |
References add_attribute(), _Attribute::any, ATT_ALIGN, ATT_POS, ATT_STRUC, TCorpus::attributes, central_corpus_directory(), cl_max_cpos, cl_new_attribute, cl_new_corpus, cl_struc_values, cleanup(), ConclineMode, corpus_id, EncodeMode, first_token, input_file, input_filename, is_num(), last, LispMode, MAX_PRINT_VALUES, maxlast, mode, print_xml_declaration(), printnum, printValuesIndex, progname, registry_directory, show_position_values(), showSurroundingStructureValues(), usage(), verify_print_value_list(), xml_compatible, and XMLMode.
| void print_xml_declaration | ( | void | ) |
| void show_position_values | ( | int | start_position, | |
| int | end_position, | |||
| Attribute * | context | |||
| ) |
References SAttRegion::annot, _Attribute::any, ATT_ALIGN, ATT_DYN, ATT_POS, ATT_STRUC, CDA_OK, cderrno, cdperror(), cl_alg2cpos(), cl_cpos2alg(), cl_cpos2str, cl_cpos2struc(), cl_cpos2struc2cpos, cl_struc2cpos, cl_struc2str, cl_struc_values, cleanup(), ConclineMode, EncodeMode, SAttRegion::end, get_struc_attribute(), lisp_string(), LispMode, mode, N_sar, SAttRegion::name, print_list_index, printnum, sar_sort_index, sort_s_att_regions(), StandardMode, SAttRegion::start, _Attribute::type, xml_compatible, xml_string(), and XMLMode.
Referenced by main().
| void showSurroundingStructureValues | ( | int | position | ) |
References _Attribute::any, cl_cpos2struc(), cl_struc2str, ConclineMode, EncodeMode, lisp_string(), LispMode, mode, printValuesIndex, StandardMode, xml_string(), and XMLMode.
Referenced by main().
| void sort_s_att_regions | ( | void | ) |
References SAttRegion::end, N_sar, sar_sort_index, and SAttRegion::start.
| void usage | ( | int | exit_code | ) |
| int verify_print_value_list | ( | ) |
References attr_member(), corpus_id, print_list_index, and printValuesIndex.
Referenced by main().
| char* xml_string | ( | char * | s | ) |
References MAX_LINE_LENGTH, mode, xml_compatible, and XMLMode.
Referenced by show_position_values(), and showSurroundingStructureValues().
| char* corpus_id = NULL |
| int first_token = 0 |
Referenced by main().
| int last = 0 |
Referenced by do_cqi_cqp_dump_subcorpus(), get_path_component(), main(), and my_strtok().
| int mode = StandardMode |
Referenced by lisp_string(), main(), show_position_values(), showSurroundingStructureValues(), and xml_string().
| int N_sar = 0 |
number of regions currently in list (may change for each token printed)
| ATPtr print_list[MAX_ATTRS] |
list of attributes selected by user for printing
| int print_list_index = 0 |
denotes the last attribute to be printed
Referenced by add_attribute(), show_position_values(), and verify_print_value_list().
| int printnum = 0 |
Referenced by main(), and show_position_values().
| ATPtr printValues[MAX_PRINT_VALUES] |
| int printValuesIndex = 0 |
Referenced by main(), showSurroundingStructureValues(), and verify_print_value_list().
| char* progname = NULL |
| char* registry_directory = NULL |
| SAttRegion s_att_regions[MAX_ATTRS] |
| int sar_sort_index[MAX_ATTRS] |
index used for bubble-sorting list of regions
| int xml_compatible = 0 |
Referenced by main(), show_position_values(), and xml_string().
1.6.1