CWB
|
#include "../cl/corpus.h"
#include "../cl/class-mapping.h"
#include "context_descriptor.h"
#include "print-modes.h"
typedef struct _ConcLineField ConcLineField |
typedef enum _conclinelayout ConcLineLayout |
typedef ConcordanceLineElement* ConcordanceLine |
typedef union _concordanceLineElement ConcordanceLineElement |
enum _conclinelayout |
void add_to_string | ( | char ** | s, |
int * | spos, | ||
int * | ssize, | ||
char * | suffix | ||
) |
References cl_malloc(), cl_realloc(), and SRESIZE.
int append | ( | char * | s, |
char * | suffix, | ||
int * | sp, | ||
int | max_sp | ||
) |
Appends one string to another whicle keeping track of the overall length.
s | The string to modify. |
suffix | The string you want to append to s. |
sp | Index into s indicating the end of its current content. For example, if the string contains "blob", sp would be 4. sp is modified by this function to point to the end of the content after appending has been complete. |
max_sp | Size of the s array (ie, no character after s[max_sp-1] will be written to). |
Referenced by compose_kwic_line(), get_field_separators(), get_position_values(), and get_print_attribute_values().
char* compose_kwic_line | ( | Corpus * | corpus, |
int | start, | ||
int | end, | ||
ContextDescriptor * | context, | ||
int * | length, | ||
int * | string_match_begin, | ||
int * | string_match_end, | ||
char * | left_marker, | ||
char * | right_marker, | ||
int * | position_list, | ||
int | nr_positions, | ||
int * | returned_positions, | ||
ConcLineField * | fields, | ||
int | nr_fields, | ||
ConcLineLayout | orientation, | ||
PrintDescriptionRecord * | pdr, | ||
int | nr_mappings, | ||
Mapping * | mappings | ||
) |
References AddNameToAL(), _print_descr_rec_::AfterField, _print_descr_rec_::AfterToken, ALIGN_CONTEXT, append(), ATT_POS, _attrbuf::attribute, _context_description_block::attributes, _print_descr_rec_::BeforeField, _print_descr_rec_::BeforeToken, CHAR_CONTEXT, cl_alg2cpos(), cl_cpos2alg(), cl_cpos2struc(), cl_max_struc(), cl_strdup(), cl_struc2cpos(), ConcLineHorizontal, DEFAULT_ATT_NAME, FindInAL(), get_attribute_size, get_field_separators(), get_position_values(), get_print_attribute_values(), _context_description_block::left_structure, _context_description_block::left_type, _context_description_block::left_width, line, _attlist::list, _attlist::list_valid, MAX, MAXKWICLINELEN, MIN, NewAttributeList(), _attrbuf::next, nr_positions(), _context_description_block::print_cpos, remember_this_position(), _context_description_block::right_structure, _context_description_block::right_type, _context_description_block::right_width, srev(), _attrbuf::status, STRUC_CONTEXT, text_size, _print_descr_rec_::TokenSeparator, VerifyList(), word, and WORD_CONTEXT.
Referenced by html_print_output(), latex_print_output(), print_concordance_line(), printAlignedStrings(), and sgml_print_output().
int get_position_values | ( | ContextDescriptor * | cd, |
int | position, | ||
char * | s, | ||
int * | sp, | ||
int | max_sp, | ||
int | add_position_number, | ||
ConcLineLayout | orientation, | ||
PrintDescriptionRecord * | pdr, | ||
int | nr_mappings, | ||
Mapping * | mappings | ||
) |
Get values at the given corpus position.
References _print_descr_rec_::AfterLine, SAttRegion::annot, _Attribute::any, append(), _mapping::attribute, _attrbuf::attribute, _context_description_block::attributes, _print_descr_rec_::AttributeSeparator, CDA_OK, cderrno, cl_cpos2struc(), CL_MAX_LINE_LENGTH, cl_struc2cpos(), cl_struc2str(), cl_struc_values(), ConcLineHorizontal, ConcLineVertical, _print_descr_rec_::CPOSPrintFormat, SAttRegion::end, get_id_at_position, get_string_at_position, _attlist::list, map_id_to_class_number(), N_sar, SAttRegion::name, _attrbuf::next, _print_descr_rec_::printToken, sar_sort_index, show_tag_attributes, sort_s_att_regions(), SAttRegion::start, _attrbuf::status, _context_description_block::strucAttributes, _print_descr_rec_::StructureBeginPrefix, _print_descr_rec_::StructureBeginSuffix, _print_descr_rec_::StructureEndPrefix, _print_descr_rec_::StructureEndSuffix, and word.
Referenced by compose_kwic_line().
int get_print_attribute_values | ( | ContextDescriptor * | cd, |
int | corpus_position, | ||
char * | s, | ||
int * | sp, | ||
int | max_sp, | ||
int | add_position_number, | ||
PrintDescriptionRecord * | pdr | ||
) |
References _print_descr_rec_::AfterPrintStructures, _Attribute::any, append(), _attrbuf::attribute, _print_descr_rec_::BeforePrintStructures, CL_MAX_LINE_LENGTH, _print_descr_rec_::CPOSPrintFormat, _attlist::list, _attrbuf::next, _print_descr_rec_::PrintStructureSeparator, _context_description_block::printStructureTags, _print_descr_rec_::printToken, _attrbuf::status, structure_value_at_position(), _print_descr_rec_::StructureBeginPrefix, and _print_descr_rec_::StructureBeginSuffix.
Referenced by compose_kwic_line().