espeak_io.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef _espeak_io_h_
  2. #define _espeak_io_h_
  3. /* espeak_io.h
  4. * Copyright (C) David Weenink 2017
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #include <stdio.h>
  21. #define PATH_ESPEAK_DATA "/home/david/projects/espeak-ng/espeak-ng-data"
  22. #define fopen(filename,mode) espeak_io_fopen (filename, mode)
  23. #define fclose(stream) espeak_io_fclose (stream)
  24. #define feof(stream) espeak_io_feof (stream)
  25. #define fseek(stream,offset,origin) espeak_io_fseek (stream, offset, origin)
  26. #define ftell(stream) espeak_io_ftell (stream)
  27. #define fgets(str,num,stream) espeak_io_fgets (str, num, stream)
  28. #define fread(ptr,size,count,stream) espeak_io_fread (ptr, size, count,stream)
  29. #define fgetc(stream) espeak_io_fgetc (stream)
  30. #define fprintf(stream,args...) espeak_io_fprintf (stream, args)
  31. #define ungetc(character,stream) espeak_io_ungetc (character, stream)
  32. #define GetFileLength(filename) espeak_io_GetFileLength (filename)
  33. #define GetVoices(path,len_path_voices,is_language_file) espeak_io_GetVoices (path, len_path_voices, is_language_file)
  34. FILE *espeak_io_fopen (const char *filename, const char *mode);
  35. void espeak_io_rewind (FILE *stream);
  36. int espeak_io_fclose (FILE *stream);
  37. int espeak_io_feof (FILE *stream);
  38. long espeak_io_ftell (FILE *stream);
  39. int espeak_io_fseek (FILE *stream, long offset, int origin);
  40. char *espeak_io_fgets (char *str, int num, FILE *stream);
  41. size_t espeak_io_fread (void *ptr, size_t size, size_t count, FILE *stream);
  42. int espeak_io_fgetc (FILE *stream);
  43. int espeak_io_fprintf (FILE * stream, ...);
  44. int espeak_io_ungetc (int character, FILE * stream);
  45. int espeak_io_GetFileLength (const char *filename);
  46. void espeak_io_GetVoices (const char *path, int len_path_voices, int is_language_file);
  47. void espeak_ng_data_to_bigendian (void);
  48. int get_int32_le (char *byte);
  49. short get_int16_le (char *byte);
  50. int get_set_int32_le (char *byte);
  51. #endif