bookutil.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  5. * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
  6. * PLEASE READ THESE TERMS DISTRIBUTING. *
  7. * *
  8. * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
  9. * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
  10. * http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: utility functions for loading .vqh and .vqd files
  14. last mod: $Id: bookutil.h,v 1.4.4.3 2000/04/27 09:22:40 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_BOOKUTIL_H_
  17. #define _V_BOOKUTIL_H_
  18. #include <stdio.h>
  19. #include <sys/time.h>
  20. #include "vorbis/codebook.h"
  21. extern char *get_line(FILE *in);
  22. extern char *setup_line(FILE *in);
  23. extern int get_line_value(FILE *in,double *value);
  24. extern int get_next_value(FILE *in,double *value);
  25. extern int get_next_ivalue(FILE *in,long *ivalue);
  26. extern void reset_next_value(void);
  27. extern int get_vector(codebook *b,FILE *in,int start,int num,double *a);
  28. extern char *find_seek_to(FILE *in,char *s);
  29. extern codebook *codebook_load(char *filename);
  30. extern void write_codebook(FILE *out,char *name,const static_codebook *c);
  31. extern void spinnit(char *s,int n);
  32. extern void build_tree_from_lengths(int vals, long *hist, long *lengths);
  33. #endif