#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 <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"
#define USE_OLD_COMPOSE |
doesn't currently appear to be used anywhere?
char* ascii_convert_string | ( | char * | s | ) |
Convert string function for ASCII mode.
s | The string to convert. |
void ascii_print_aligned_line | ( | FILE * | stream, | |
int | highlighting, | |||
char * | attribute_name, | |||
char * | line | |||
) |
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, cl::name, TCorpus::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_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 | |||
) |
References _grouptable::count_cells, _id_cnt_mapping::freq, Group_id2str(), _grouptable::nr_cells, pretty_print, _id_cnt_mapping::s, SEPARATOR, _grouptable::source_attribute, _id_cnt_mapping::t, and UseExternalGrouping.
Referenced by print_group().
void ascii_print_output | ( | CorpusList * | cl, | |
FILE * | outfd, | |||
int | interactive, | |||
ContextDescriptor * | cd, | |||
int | first, | |||
int | last | |||
) |
References broken_pipe, GlobalPrintOptions, highlighting, _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 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 compklete)_
References _print_descr_rec_::AfterLine, _context_description_block::alignedCorpora, ASCIIHighlightedPrintDescriptionRecord, ASCIIPrintDescriptionRecord, CD, compose_kwic_line(), ConcLineHorizontal, cl::corpus, cqpmessage(), _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, _ConcLineField::start_position, TargetField, cl::targets, and _ConcLineField::type.
Referenced by ascii_print_output().
{ "%9d: ", NULL, " ", ": ", "<", ">", " ", "</", ">", NULL, " ", "/", NULL, NULL, NULL, NULL, NULL, "\n", NULL, NULL, ascii_convert_string, ascii_print_field }
Print description record for Highlighted-ASCII print mode.
Referenced by print_concordance_line().
{ "%9d: ", NULL, " ", ": ", "<", ">", " ", "</", ">", NULL, " ", "/", NULL, NULL, NULL, NULL, NULL, "\n", NULL, NULL, ascii_convert_string, NULL }
Print description record for ASCII print mode.
Referenced by print_concordance_line(), and printAlignedStrings().
int escapes_initialized = 0 [static] |
Boolean: have escapes been initialised?
Referenced by print_concordance_line().
char * sc_all_out [static] |
Turn off all display attributes.
Referenced by ascii_print_field(), and get_screen_escapes().
char * sc_b_in [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().
char * sc_b_out [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()
char * sc_bl_in [static] |
Enter blink mode.
Referenced by get_screen_escapes().
char * sc_bl_out [static] |
Exit blink mode.
Referenced by get_screen_escapes().
char* sc_s_in [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().
char * sc_s_out [static] |
Exit standout mode.
Referenced by get_screen_escapes().
char * sc_u_in [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().
char * sc_u_out [static] |
Exit underline mode.
Referenced by get_screen_escapes().