CWB
Macros | Functions | Variables
sgml-print.c File Reference
#include <stdio.h>
#include <string.h>
#include "../cl/macros.h"
#include "../cl/corpus.h"
#include "../cl/attributes.h"
#include "../cl/cdaccess.h"
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include "sgml-print.h"
#include "print_align.h"
#include "cqp.h"
#include "options.h"
#include "corpmanag.h"
#include "concordance.h"
#include "attlist.h"
#include <sys/time.h>
#include <time.h>
#include <pwd.h>

Macros

#define SUBST_NONE   0
 
#define SUBST_LT   1
 
#define SUBST_GT   2
 
#define SUBST_AMP   4
 
#define SUBST_QUOT   8
 
#define SUBST_ALL   (SUBST_LT | SUBST_GT | SUBST_AMP | SUBST_QUOT)
 

Functions

char * sgml_convert_string (char *s)
 
char * sgml_print_field (FieldType field, int start)
 
void sgml_puts (FILE *fd, char *s, int flags)
 
void sgml_print_aligned_line (FILE *stream, 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) following an SGML open-tag. More...
 
void sgml_print_context (ContextDescriptor *cd, FILE *stream)
 
void sgml_print_corpus_header (CorpusList *cl, FILE *stream)
 
void sgml_print_output (CorpusList *cl, FILE *stream, int interactive, ContextDescriptor *cd, int first, int last)
 
void sgml_print_group (Group *group, int expand, FILE *fd)
 

Variables

PrintDescriptionRecord SGMLPrintDescriptionRecord
 

Macro Definition Documentation

#define SUBST_ALL   (SUBST_LT | SUBST_GT | SUBST_AMP | SUBST_QUOT)

Referenced by sgml_print_group().

#define SUBST_AMP   4

Referenced by sgml_puts().

#define SUBST_GT   2

Referenced by sgml_puts().

#define SUBST_LT   1

Referenced by sgml_puts().

#define SUBST_NONE   0

Referenced by sgml_print_aligned_line().

#define SUBST_QUOT   8

Referenced by sgml_puts().

Function Documentation

char * sgml_convert_string ( char *  s)

References CL_MAX_LINE_LENGTH.

void sgml_print_aligned_line ( FILE *  stream,
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) following an SGML open-tag.

The structure is <align name="$att_name">$line_data And the whole thing is terminated by EOL (note, no close tag as we;'d have in XML!)

Parameters
streamDestination for the output.
attribute_nameThe name of the aligned corpus: printed in the "align" tag as an SGML attribute.
lineCharacter data of the line of aligned-corpus data to print. This is treated as opaque.

References sgml_puts(), and SUBST_NONE.

Referenced by printAlignedStrings().

void sgml_print_context ( ContextDescriptor cd,
FILE *  stream 
)
void sgml_print_corpus_header ( CorpusList cl,
FILE *  stream 
)
char * sgml_print_field ( FieldType  field,
int  start 
)
void sgml_print_group ( Group group,
int  expand,
FILE *  fd 
)
void sgml_print_output ( CorpusList cl,
FILE *  stream,
int  interactive,
ContextDescriptor cd,
int  first,
int  last 
)
void sgml_puts ( FILE *  fd,
char *  s,
int  flags 
)

Variable Documentation

PrintDescriptionRecord SGMLPrintDescriptionRecord