#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 | |
symbol * | create_b (int n) |
void | report_b (FILE *out, symbol *p) |
void | lose_b (symbol *p) |
symbol * | increase_capacity (symbol *p, int n) |
symbol * | move_to_b (symbol *p, int n, symbol *q) |
symbol * | add_to_b (symbol *p, int n, symbol *q) |
symbol * | copy_b (symbol *p) |
void * | check_malloc (int n) |
void | check_free (void *p) |
char * | b_to_s (symbol *p) |
symbol * | add_s_to_b (symbol *p, const char *s) |
str * | str_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) |
str * | str_copy (struct str *old) |
symbol * | str_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 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 |
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.
Referenced by close_analyser(), close_tokeniser(), generate_grouping_table(), increase_capacity(), main(), read_token(), and str_delete().
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().
Definition at line 77 of file space.c.
References CAPACITY, increase_capacity(), and SIZE.
Referenced by copy_b(), next_token(), and read_chars().
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().
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 | ) |
void check_free | ( | void * | p | ) |
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().
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().
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 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 | |||
) |
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 | |||
) |
int str_len | ( | struct str * | str | ) |
int get_utf8 | ( | const symbol * | p, | |
int * | slot | |||
) |
int put_utf8 | ( | int | ch, | |
symbol * | p | |||
) |
int space_count = 0 |