|
CWB
|
#include <stdio.h>#include <string.h>#include "../cl/macros.h"#include "../cl/corpus.h"#include "../cl/attributes.h"#include "../cl/cdaccess.h"#include <sys/time.h>#include <time.h>#include <pwd.h>#include <sys/types.h>#include <unistd.h>#include <stdlib.h>#include "ascii-print.h"#include "cqp.h"#include "output.h"#include "print_align.h"#include "options.h"#include "corpmanag.h"#include "concordance.h"#include "attlist.h"#include "print-modes.h"Macros | |
| #define | USE_OLD_COMPOSE |
| [TODO get rid?] doesn't currently appear to be used anywhere? More... | |
Functions | |
| char * | ascii_convert_string (char *s) |
| Convert string function for ASCII mode. More... | |
| char * | ascii_print_field (FieldType field, int at_end) |
| char * | get_colour_escape (char colour, int foreground) |
| Dummy function. More... | |
| char * | get_typeface_escape (char typeface) |
| Dummy function. More... | |
| void | get_screen_escapes (void) |
| Dummy function. More... | |
| void | ascii_print_aligned_line (FILE *stream, int highlighting, char *attribute_name, char *line) |
| Prints a line of text (which will have been previously exrtracted from a corfpus linked to the present corpus by an a-attribute) with a brief character-mode start-of-line flag ("-->$att_name: "). More... | |
| void | print_concordance_line (FILE *outfd, CorpusList *cl, int element, int apply_highlighting, AttributeList *strucs) |
| Prints a concordance line. More... | |
| void | ascii_print_corpus_header (CorpusList *cl, FILE *stream) |
| void | ascii_print_output (CorpusList *cl, FILE *outfd, int interactive, ContextDescriptor *cd, int first, int last) |
| void | ascii_print_group (Group *group, int expand, FILE *fd) |
Variables | |
| PrintDescriptionRecord | ASCIIPrintDescriptionRecord |
| Print description record for ASCII print mode. More... | |
| PrintDescriptionRecord | ASCIIHighlightedPrintDescriptionRecord |
| Print description record for Highlighted-ASCII print mode. More... | |
| static int | escapes_initialized = 0 |
| Boolean: have escapes been initialised? More... | |
| static char * | sc_s_in |
| Enter standout (highlighted) mode. More... | |
| static char * | sc_s_out |
| Exit standout mode. More... | |
| static char * | sc_u_in |
| Enter underline mode. More... | |
| static char * | sc_u_out |
| Exit underline mode. More... | |
| static char * | sc_b_in |
| Enter bold mode. More... | |
| static char * | sc_b_out |
| Exit bold mode (doesn't exist; this code turns off all attributes) More... | |
| static char * | sc_bl_in |
| Enter blink mode. More... | |
| static char * | sc_bl_out |
| Exit blink mode. More... | |
| static char * | sc_all_out |
| Turn off all display attributes. More... | |
| int | sc_s_mode = 0 |
| Boolean: following tokens will be shown in standout mode. More... | |
| int | sc_u_mode = 0 |
| Boolean: following tokens will be shown in underline mode. More... | |
| int | sc_b_mode = 0 |
| Boolean: following tokens will be shown in bold mode. More... | |
| char | sc_before_token [256] |
| < 'static' return value of ascii_print_field() More... | |
| #define USE_OLD_COMPOSE |
[TODO get rid?] doesn't currently appear to be used anywhere?
| char* ascii_convert_string | ( | char * | s | ) |
Convert string function for ASCII mode.
This is used for the "printToken" function in the relevant PDR.
| s | The string to convert. |
| void ascii_print_aligned_line | ( | FILE * | stream, |
| int | highlighting, | ||
| char * | attribute_name, | ||
| char * | line | ||
| ) |
Prints a line of text (which will have been previously exrtracted from a corfpus linked to the present corpus by an a-attribute) with a brief character-mode start-of-line flag ("-->$att_name: ").
| stream | Destination for the output. |
| highlighting | Boolean: if true, use colour/bold highlighting for the leading indicator on the line. |
| attribute_name | The name of the aligned corpus: printed in the leading indicator |
| line | Character data of the line of aligned-corpus data to print. This is treated as opaque. |
References get_colour_escape(), and get_typeface_escape().
Referenced by printAlignedStrings().
| void ascii_print_corpus_header | ( | CorpusList * | cl, |
| FILE * | stream | ||
| ) |
References CD, CHAR_CONTEXT, cl::corpus, _context_description_block::left_structure_name, _context_description_block::left_type, _context_description_block::left_width, cl::mother_name, TCorpus::name, cl::name, passwd, cl::query_corpus, cl::query_text, TCorpus::registry_name, _context_description_block::right_structure_name, _context_description_block::right_type, _context_description_block::right_width, cl::size, and WORD_CONTEXT.
Referenced by print_corpus_info_header().
| char * ascii_print_field | ( | FieldType | field, |
| int | at_end | ||
| ) |
References get_colour_escape(), KeywordField, MatchField, NoField, sc_all_out, sc_b_in, sc_b_mode, sc_before_token, sc_s_in, sc_s_mode, sc_u_in, sc_u_mode, show_targets, and TargetField.
| void ascii_print_group | ( | Group * | group, |
| int | expand, | ||
| FILE * | fd | ||
| ) |
| void ascii_print_output | ( | CorpusList * | cl, |
| FILE * | outfd, | ||
| int | interactive, | ||
| ContextDescriptor * | cd, | ||
| int | first, | ||
| int | last | ||
| ) |
References cl_broken_pipe, GlobalPrintOptions, highlighting, last, _print_option_rec_::number_lines, print_concordance_line(), _context_description_block::printStructureTags, cl::size, and cl::sortidx.
Referenced by print_output().
| char* get_colour_escape | ( | char | colour, |
| int | foreground | ||
| ) |
Dummy function.
Referenced by ascii_print_aligned_line(), ascii_print_field(), and main().
| void get_screen_escapes | ( | void | ) |
Dummy function.
References escapes_initialized, sc_all_out, sc_b_in, sc_b_out, sc_bl_in, sc_bl_out, sc_s_in, sc_s_out, sc_u_in, and sc_u_out.
Referenced by print_concordance_line().
| char* get_typeface_escape | ( | char | typeface | ) |
Dummy function.
Referenced by ascii_print_aligned_line(), and main().
| void print_concordance_line | ( | FILE * | outfd, |
| CorpusList * | cl, | ||
| int | element, | ||
| int | apply_highlighting, | ||
| AttributeList * | strucs | ||
| ) |
Prints a concordance line.
(documentation not complete)_
References _print_descr_rec_::AfterLine, _context_description_block::alignedCorpora, ASCIIHighlightedPrintDescriptionRecord, ASCIIPrintDescriptionRecord, CD, compose_kwic_line(), ConcLineHorizontal, cl::corpus, cqpmessage(), _Range::end, _ConcLineField::end_position, Error, escapes_initialized, get_screen_escapes(), KeywordField, cl::keywords, left_delimiter, MatchEndField, MatchField, NoField, printAlignedStrings(), cl::range, right_delimiter, sc_b_mode, sc_s_mode, sc_u_mode, cl::size, _Range::start, _ConcLineField::start_position, TargetField, cl::targets, and _ConcLineField::type.
Referenced by ascii_print_output().
| PrintDescriptionRecord ASCIIHighlightedPrintDescriptionRecord |
Print description record for Highlighted-ASCII print mode.
Referenced by print_concordance_line().
| PrintDescriptionRecord ASCIIPrintDescriptionRecord |
Print description record for ASCII print mode.
Referenced by print_concordance_line(), and printAlignedStrings().
|
static |
Boolean: have escapes been initialised?
Referenced by get_screen_escapes(), and print_concordance_line().
|
static |
Turn off all display attributes.
Referenced by ascii_print_field(), and get_screen_escapes().
|
static |
Enter bold mode.
Referenced by ascii_print_field(), and get_screen_escapes().
| int sc_b_mode = 0 |
Boolean: following tokens will be shown in bold mode.
Referenced by ascii_print_field(), and print_concordance_line().
|
static |
Exit bold mode (doesn't exist; this code turns off all attributes)
Referenced by get_screen_escapes().
| char sc_before_token[256] |
< 'static' return value of ascii_print_field()
Referenced by ascii_print_field().
|
static |
Enter blink mode.
Referenced by get_screen_escapes().
|
static |
Exit blink mode.
Referenced by get_screen_escapes().
|
static |
Enter standout (highlighted) mode.
Referenced by ascii_print_field(), and get_screen_escapes().
| int sc_s_mode = 0 |
Boolean: following tokens will be shown in standout mode.
Referenced by ascii_print_field(), and print_concordance_line().
|
static |
Exit standout mode.
Referenced by get_screen_escapes().
|
static |
Enter underline mode.
Referenced by ascii_print_field(), and get_screen_escapes().
| int sc_u_mode = 0 |
Boolean: following tokens will be shown in underline mode.
Referenced by ascii_print_field(), and print_concordance_line().
|
static |
Exit underline mode.
Referenced by get_screen_escapes().
1.8.8