languages/compiler/space.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "header.h"

Include dependency graph for space.c:

Go to the source code of this file.

Classes

struct  str

Defines

#define HEAD   2*sizeof(int)
#define EXTENDER   40

Functions

symbolcreate_b (int n)
void report_b (FILE *out, symbol *p)
void lose_b (symbol *p)
symbolincrease_capacity (symbol *p, int n)
symbolmove_to_b (symbol *p, int n, symbol *q)
symboladd_to_b (symbol *p, int n, symbol *q)
symbolcopy_b (symbol *p)
void * check_malloc (int n)
void check_free (void *p)
char * b_to_s (symbol *p)
symboladd_s_to_b (symbol *p, const char *s)
strstr_new ()
void str_delete (struct str *str)
void str_append (struct str *str, struct str *add)
void str_append_ch (struct str *str, char add)
void str_append_b (struct str *str, symbol *q)
void str_append_string (struct str *str, const char *s)
void str_append_int (struct str *str, int i)
void str_clear (struct str *str)
void str_assign (struct str *str, char *s)
strstr_copy (struct str *old)
symbolstr_data (struct str *str)
int str_len (struct str *str)
int get_utf8 (const symbol *p, int *slot)
int put_utf8 (int ch, symbol *p)

Variables

int space_count = 0


Define Documentation

#define HEAD   2*sizeof(int)

Definition at line 8 of file space.c.

Referenced by create_b(), create_s(), increase_size(), lose_b(), and lose_s().

#define EXTENDER   40

Definition at line 9 of file space.c.

Referenced by increase_capacity().


Function Documentation

symbol* create_b ( int  n  ) 

Definition at line 53 of file space.c.

References CAPACITY, HEAD, MALLOC, and SIZE.

Referenced by add_s_to_b(), copy_b(), create_tokeniser(), generate_grouping_table(), get_input(), increase_capacity(), read_define_grouping(), and str_new().

void report_b ( FILE *  out,
symbol p 
)

Definition at line 60 of file space.c.

References SIZE.

Referenced by error2(), error3(), error4(), print_node_(), and read_program().

void lose_b ( symbol p  ) 

Definition at line 65 of file space.c.

References FREE, and HEAD.

Referenced by close_analyser(), close_tokeniser(), generate_grouping_table(), increase_capacity(), main(), read_token(), and str_delete().

symbol* increase_capacity ( symbol p,
int  n 
)

Definition at line 70 of file space.c.

References CAPACITY, create_b(), EXTENDER, lose_b(), and SIZE.

Referenced by add_s_to_b(), add_to_b(), get_input(), and move_to_b().

symbol* move_to_b ( symbol p,
int  n,
symbol q 
)

Definition at line 77 of file space.c.

References CAPACITY, increase_capacity(), and SIZE.

Referenced by copy_b(), next_token(), and read_chars().

symbol* add_to_b ( symbol p,
int  n,
symbol q 
)

Definition at line 83 of file space.c.

References CAPACITY, increase_capacity(), and SIZE.

Referenced by alter_grouping(), read_literal_string(), read_token(), str_append(), str_append_b(), and str_append_ch().

symbol* copy_b ( symbol p  ) 

Definition at line 89 of file space.c.

References create_b(), move_to_b(), and SIZE.

Referenced by new_literalstring(), read_names(), and read_token().

void* check_malloc ( int  n  ) 

Definition at line 98 of file space.c.

References space_count.

void check_free ( void *  p  ) 

Definition at line 103 of file space.c.

References space_count.

char* b_to_s ( symbol p  ) 

Definition at line 110 of file space.c.

References SIZE.

Referenced by get_input(), get_output(), and output_str().

symbol* add_s_to_b ( symbol p,
const char *  s 
)

Definition at line 130 of file space.c.

References CAPACITY, create_b(), increase_capacity(), and SIZE.

Referenced by main(), read_options(), and str_append_string().

struct str* str_new ( void   )  [read]

Definition at line 156 of file space.c.

References create_b(), and str::data.

Referenced by generate_program_c(), and str_copy().

void str_delete ( struct str str  ) 

Definition at line 164 of file space.c.

References str::data, and lose_b().

Referenced by generate_program_c().

void str_append ( struct str str,
struct str add 
)

Definition at line 171 of file space.c.

References add_to_b(), str::data, and SIZE.

Referenced by str_copy().

void str_append_ch ( struct str str,
char  add 
)

Definition at line 178 of file space.c.

References add_to_b(), and str::data.

Referenced by wch(), wh_ch(), and wnl().

void str_append_b ( struct str str,
symbol q 
)

Definition at line 186 of file space.c.

References add_to_b(), str::data, and SIZE.

Referenced by generate_header_file(), wc(), and wvn().

void str_append_string ( struct str str,
const char *  s 
)

Definition at line 192 of file space.c.

References add_s_to_b(), and str::data.

Referenced by str_append_int(), str_assign(), and ws().

void str_append_int ( struct str str,
int  i 
)

Definition at line 198 of file space.c.

References str_append_string().

Referenced by wi().

void str_clear ( struct str str  ) 

Definition at line 206 of file space.c.

References str::data, and SIZE.

Referenced by generate_program_c(), and str_assign().

void str_assign ( struct str str,
char *  s 
)

Definition at line 212 of file space.c.

References str_append_string(), and str_clear().

struct str* str_copy ( struct str old  )  [read]

Definition at line 219 of file space.c.

References str_append(), and str_new().

symbol* str_data ( struct str str  ) 

Definition at line 227 of file space.c.

References str::data.

Referenced by output_str().

int str_len ( struct str str  ) 

Definition at line 233 of file space.c.

References str::data, and SIZE.

int get_utf8 ( const symbol p,
int *  slot 
)

Definition at line 238 of file space.c.

Referenced by next_symbol().

int put_utf8 ( int  ch,
symbol p 
)

Definition at line 251 of file space.c.

Referenced by convert_numeric_string().


Variable Documentation

int space_count = 0

Definition at line 96 of file space.c.

Referenced by check_free(), check_malloc(), and main().


Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.