toast.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
  3. * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
  4. * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
  5. */
  6. /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast.h,v 1.4 1995/03/07 21:26:16 jutta Exp $ */
  7. #ifndef TOAST_H
  8. #define TOAST_H /* Guard against multiple includes */
  9. #include "config.h"
  10. #include <sys/types.h>
  11. #include <sys/stat.h>
  12. #include <stdio.h>
  13. #include <ctype.h>
  14. #include <signal.h>
  15. #include <errno.h>
  16. #ifndef HAS_ERRNO_DECL
  17. extern int errno;
  18. #endif
  19. #ifdef HAS_LIMITS_H
  20. #include <limits.h>
  21. #endif
  22. #ifdef HAS_FCNTL_H
  23. # include <fcntl.h>
  24. #endif
  25. #ifdef HAS_UTIME
  26. # ifdef HAS_UTIME_H
  27. # include <utime.h>
  28. # endif
  29. #endif
  30. #include "gsm.h"
  31. #ifndef S_ISREG
  32. #define S_ISREG(x) ((x) & S_IFREG)
  33. #endif /* S_ISREG */
  34. # define READ "rb"
  35. # define WRITE "wb"
  36. #ifdef O_BINARY
  37. # define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL|O_BINARY
  38. #else
  39. # define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL
  40. #endif
  41. #ifndef SIGHANDLER_T
  42. #define SIGHANDLER_T void /* what does a signal handler return? */
  43. #endif
  44. #ifdef HAS_STRING_H
  45. #include <string.h>
  46. #else
  47. # ifdef HAS_STRINGS_H
  48. # include <strings.h>
  49. # else
  50. # include "proto.h"
  51. extern int strlen P((char *));
  52. extern char * strcpy P((char *, char *));
  53. extern char * strcat P((char *, char *));
  54. extern char * strrchr P((char *, int));
  55. # include "unproto.h"
  56. # endif
  57. #endif
  58. #ifdef HAS_STDLIB_H
  59. #include <stdlib.h>
  60. #else
  61. # include "proto.h"
  62. # ifdef HAS_MALLOC_H
  63. # include <malloc.h>
  64. # else
  65. extern char * malloc P((unsigned));
  66. # endif
  67. extern int exit P((int));
  68. # include "unproto.h"
  69. #endif
  70. #ifdef HAS_UNISTD_H
  71. # include <unistd.h>
  72. #endif
  73. /*
  74. * This suffix is tacked onto/removed from filenames
  75. * similar to the way freeze and compress do it.
  76. */
  77. #define SUFFIX_TOASTED ".gsm"
  78. #include "proto.h"
  79. extern int audio_init_input P((void)), audio_init_output P((void));
  80. extern int ulaw_input P((gsm_signal*)), ulaw_output P((gsm_signal *));
  81. extern int alaw_input P((gsm_signal*)), alaw_output P((gsm_signal *));
  82. extern int linear_input P((gsm_signal*)), linear_output P((gsm_signal *));
  83. #endif /* TOAST_H */