cwb-decode.c File Reference

#include <ctype.h>
#include "../cl/globals.h"
#include "../cl/cl.h"
#include "../cl/corpus.h"
#include "../cl/attributes.h"

Data Structures

Defines

Typedefs

Enumerations

Functions

Variables


Define Documentation

#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 Documentation

typedef Attribute* ATPtr
typedef enum _output_modes OutputMode

Enumeration Type Documentation

Enumerator:
StandardMode 
LispMode 
EncodeMode 
ConclineMode 
XMLMode 

Function Documentation

int add_attribute ( Attribute attr  ) 
int attr_member ( Attribute attr,
ATPtr att_list,
int  att_list_size 
)
void cleanup ( int  error_code  ) 

Cleans up memory prior to an error-prompted exit.

Parameters:
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.

Parameters:
s The string to check.
Returns:
Boolean: true iff s contains only digits.

Referenced by main().

char* lisp_string ( char *  s  ) 
int main ( int  argc,
char **  argv 
)
void print_xml_declaration ( void   ) 
void show_position_values ( int  start_position,
int  end_position,
Attribute context 
)
void showSurroundingStructureValues ( int  position  ) 
void sort_s_att_regions ( void   ) 
void usage ( int  exit_code  ) 

Prints a usage message and exits the program.

Parameters:
exit_code Value to be returned by the program when it exits.

References cleanup(), and progname.

int verify_print_value_list (  ) 

References attr_member(), corpus_id, print_list_index, and printValuesIndex.

Referenced by main().

char* xml_string ( char *  s  ) 

Variable Documentation

Corpus* corpus = NULL
char* corpus_id = NULL
int first_token = 0

Referenced by main().

int last = 0
int maxlast = -1

Referenced by main().

int mode = StandardMode
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

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]
char* progname = NULL
char* registry_directory = NULL
int sar_sort_index[MAX_ATTRS]

index used for bubble-sorting list of regions

int xml_compatible = 0

Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1