File support.c


Included Files


Local Variables

support_c_rcs_sccs_id
static const char support_c_rcs_sccs_id[]

Global Function append_token()

void append_token ( struct token* s, struct token* t )
Prototyped in: abnff.h
Called by: abnftoken()lex.abnf.c
  group()support.c
  option()support.c

Global Function balance_height()

unsigned int balance_height ( unsigned int tot_w, unsigned int d_w_min, unsigned int c_w_min, struct token* def, struct token* comment )
Prototyped in: abnff.h
Calls: height()support.c
Called by: format_list()lex.abnf.c

Global Function free_token()

void free_token ( struct rule* r, struct token* t )
Prototyped in: abnff.h
Calls: free()
Called by: abnfparse()y.tab.c
  free_rule()lex.abnf.c
  group()support.c
  normalize()support.c
  string_cat()support.c

Global Function group()

struct token* group ( struct token* t )
Prototyped in: abnff.h
Calls: append_token()support.c
  free_token()support.c
  insert_token()support.c
  new_token()support.c
  string_cat()support.c
  fprintf()
Called by: abnfparse()y.tab.c

Global Function new_rule()

struct rule* new_rule ( struct ruleset* ruleset )
Prototyped in: abnff.h
Calls: __errno_location(), calloc(), fprintf(), realloc(), strerror()
Called by: abnftoken()lex.abnf.c
  main()y.tab.c

Global Function new_token()

struct token* new_token ( struct rule* r, const char* s, size_t len, int type )
Prototyped in: abnff.h
Calls: calloc(), malloc(), tolower()
Called by: abnftoken()lex.abnf.c
  group()support.c
  option()support.c

Local Function normalize()

struct token* normalize ( struct token* rep, struct token* elem )
Prototyped in: abnff.h
Calls: free_token()support.c
  option()support.c
  fprintf(), memmove(), strtoul()
Called by: abnfparse()y.tab.c

Global Function option()

struct token* option ( struct token* t )
Prototyped in: abnff.h
Calls: append_token()support.c
  insert_token()support.c
  new_token()support.c
  string_cat()support.c
Called by: abnfparse()y.tab.c
  normalize()support.c

Global Function output_next()

void output_next ( const struct token* t, FILE* out )
Prototyped in: abnff.h
Calls: _IO_putc(), __ctype_b_loc(), fputs(), tolower(), toupper()
Called by: format_list()lex.abnf.c

Global Function rulenamecmp()

int rulenamecmp ( const void* v1, const void* v2 )
Prototyped in: abnff.h
Calls: strcasecmp()

Global Function set_params()

void set_params ( struct ruleset* ruleset, const unsigned char* s )
Prototyped in: abnff.h
Calls: free_trie_dict()trie.c
  new_trie_dict()trie.c
  set_option()support.c
  __ctype_b_loc(), strtoul()
Called by: abnflex()lex.abnf.c
References Functions: check_def()support.c
  lower()support.c

Global Function string_cat()

struct token* string_cat ( struct token* t )
Prototyped in: abnff.h
Calls: free_token()support.c
  free(), malloc()
Called by: abnfparse()y.tab.c
  group()support.c
  option()support.c

Global Function tsort()

void tsort ( struct ruleset* ruleset )
Prototyped in: abnff.h
Calls: free_trie_dict()trie.c
  heapify()support.c
  sift_down()support.c
  sift_up()support.c
  swap()support.c
  trie_dict_find()trie.c
  __errno_location(), fprintf(), malloc(), realloc(), strerror()
Called by: format_list()lex.abnf.c
References Functions: check_def()support.c
  rulecmp()support.c

Global Function width()

unsigned int width ( struct token* t, struct token** next )
Prototyped in: abnff.h
Called by: format_list()lex.abnf.c
  height()support.c

Local Function check_def()

static void check_def ( void* v )
Calls: core_entry()core.c
  fprintf()
Used in: set_params()support.c
  tsort()support.c

Local Function heapify()

static void heapify ( struct ruleset* ruleset )
Calls: sift_up()support.c
Called by: tsort()support.c
References Functions: rulecmp()support.c

Local Function height()

static unsigned int height ( unsigned int wid, struct token* t )
Calls: width()support.c
Called by: balance_height()support.c

Local Function insert_token()

static void insert_token ( struct token* t, struct token* u )
Called by: group()support.c
  option()support.c

Local Function lower()

static const char* lower ( const void* v )
Used in: set_params()support.c

Local Function rulecmp()

static int rulecmp ( const void* v1, const void* v2 )
Used in: heapify()support.c
  tsort()support.c

Local Function set_option()

static void set_option ( struct ruleset* ruleset, unsigned int c )
Calls: __ctype_b_loc(), fprintf(), tolower()
Called by: set_params()support.c

Local Function sift_down()

static void sift_down ( struct rule** arr, unsigned int low, unsigned int high, int (*compar)(const void*,const void*) )
Calls: swap()support.c
Called by: tsort()support.c

Local Function sift_up()

static void sift_up ( struct rule** arr, unsigned int n, int (*compar)(const void*,const void*) )
Calls: swap()support.c
Called by: heapify()support.c
  tsort()support.c

Local Function swap()

static void swap ( struct rule** arr, unsigned int a, unsigned int b )
Called by: sift_down()support.c
  sift_up()support.c
  tsort()support.c