zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
bookutil.h File Reference
#include <stdio.h>
#include <sys/time.h>
#include "localcodebook.h"

Go to the source code of this file.

Functions

void build_tree_from_lengths (int vals, long *hist, long *lengths)
 
void build_tree_from_lengths0 (int vals, long *hist, long *lengths)
 
codebookcodebook_load (char *filename)
 
char * find_seek_to (FILE *in, char *s)
 
char * get_line (FILE *in)
 
int get_line_value (FILE *in, float *value)
 
int get_next_ivalue (FILE *in, long *ivalue)
 
int get_next_value (FILE *in, float *value)
 
int get_vector (codebook *b, FILE *in, int start, int num, float *a)
 
void reset_next_value (void)
 
char * setup_line (FILE *in)
 
void spinnit (char *s, int n)
 
void write_codebook (FILE *out, char *name, const static_codebook *c)
 

Function Documentation

void build_tree_from_lengths ( int  vals,
long *  hist,
long *  lengths 
)

Definition at line 338 of file bookutil.c.

References _ogg_malloc, free, i, j, memcpy, and spinnit().

Referenced by build_tree_from_lengths0(), and main().

void build_tree_from_lengths0 ( int  vals,
long *  hist,
long *  lengths 
)

Definition at line 407 of file bookutil.c.

References _ogg_calloc, build_tree_from_lengths(), free, and i.

Referenced by main().

char* find_seek_to ( FILE *  in,
char *  s 
)

Definition at line 216 of file bookutil.c.

References get_line(), and NULL.

Referenced by codebook_load().

char* get_line ( FILE *  in)

Definition at line 85 of file bookutil.c.

References _ogg_malloc, _ogg_realloc, EOF, lbufsize, linebuffer, and NULL.

Referenced by codebook_load(), find_seek_to(), get_next_value(), main(), and setup_line().

int get_line_value ( FILE *  in,
float *  value 
)

Definition at line 131 of file bookutil.c.

References NULL, and value_line_buff.

Referenced by get_next_value(), get_vector(), and getval().

int get_next_ivalue ( FILE *  in,
long *  ivalue 
)

Definition at line 159 of file bookutil.c.

References get_next_value(), and ret.

Referenced by codebook_load(), and main().

int get_next_value ( FILE *  in,
float *  value 
)

Definition at line 148 of file bookutil.c.

References get_line(), get_line_value(), and value_line_buff.

Referenced by get_next_ivalue(), get_vector(), and getval().

int get_vector ( codebook b,
FILE *  in,
int  start,
int  num,
float *  a 
)
void reset_next_value ( void  )

Definition at line 168 of file bookutil.c.

References NULL, sequence_base, v_sofar, and value_line_buff.

Referenced by codebook_load(), get_vector(), getval(), main(), and setup_line().

char* setup_line ( FILE *  in)

Definition at line 174 of file bookutil.c.

References get_line(), reset_next_value(), and value_line_buff.

Referenced by main().

void spinnit ( char *  s,
int  n 
)