| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#ifndef TOAST_H |
| 10 |
#define TOAST_H |
| 11 |
|
| 12 |
#include "config.h" |
| 13 |
|
| 14 |
#include <sys/types.h> |
| 15 |
#include <sys/stat.h> |
| 16 |
#include <sys/time.h> |
| 17 |
|
| 18 |
#include <stdio.h> |
| 19 |
#include <ctype.h> |
| 20 |
#include <signal.h> |
| 21 |
|
| 22 |
#include <errno.h> |
| 23 |
#ifndef HAS_ERRNO_DECL |
| 24 |
extern int errno; |
| 25 |
#endif |
| 26 |
|
| 27 |
#ifdef HAS_LIMITS_H |
| 28 |
#include <limits.h> |
| 29 |
#endif |
| 30 |
|
| 31 |
#ifdef HAS_FCNTL_H |
| 32 |
# include <fcntl.h> |
| 33 |
#endif |
| 34 |
|
| 35 |
#ifdef HAS_UTIME |
| 36 |
# ifdef HAS_UTIME_H |
| 37 |
# include <utime.h> |
| 38 |
# endif |
| 39 |
#endif |
| 40 |
|
| 41 |
#include "gsm.h" |
| 42 |
|
| 43 |
#ifndef S_ISREG |
| 44 |
#define S_ISREG(x) ((x) & S_IFREG) |
| 45 |
#endif |
| 46 |
|
| 47 |
|
| 48 |
# define READ "rb" |
| 49 |
# define WRITE "wb" |
| 50 |
#ifdef O_BINARY |
| 51 |
# define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL|O_BINARY |
| 52 |
#else |
| 53 |
# define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL |
| 54 |
#endif |
| 55 |
|
| 56 |
#ifndef SIGHANDLER_T |
| 57 |
#define SIGHANDLER_T void |
| 58 |
#endif |
| 59 |
|
| 60 |
|
| 61 |
#ifdef HAS_STRING_H |
| 62 |
#include <string.h> |
| 63 |
#else |
| 64 |
# ifdef HAS_STRINGS_H |
| 65 |
# include <strings.h> |
| 66 |
# else |
| 67 |
# include "proto.h" |
| 68 |
|
| 69 |
extern int strlen P((char *)); |
| 70 |
extern char * strcpy P((char *, char *)); |
| 71 |
extern char * strcat P((char *, char *)); |
| 72 |
extern char * strrchr P((char *, int)); |
| 73 |
|
| 74 |
# include "unproto.h" |
| 75 |
# endif |
| 76 |
#endif |
| 77 |
|
| 78 |
|
| 79 |
#ifdef HAS_STDLIB_H |
| 80 |
#include <stdlib.h> |
| 81 |
#else |
| 82 |
# include "proto.h" |
| 83 |
# ifdef HAS_MALLOC_H |
| 84 |
# include <malloc.h> |
| 85 |
# else |
| 86 |
extern char * malloc P((unsigned)); |
| 87 |
# endif |
| 88 |
extern int exit P((int)); |
| 89 |
# include "unproto.h" |
| 90 |
#endif |
| 91 |
|
| 92 |
|
| 93 |
#ifdef HAS_UNISTD_H |
| 94 |
# include <unistd.h> |
| 95 |
#endif |
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
#define SUFFIX_TOASTED ".gsm" |
| 102 |
|
| 103 |
#include "proto.h" |
| 104 |
|
| 105 |
extern int audio_init_input P((void)), audio_init_output P((void)); |
| 106 |
extern int ulaw_input P((gsm_signal*)), ulaw_output P((gsm_signal *)); |
| 107 |
extern int alaw_input P((gsm_signal*)), alaw_output P((gsm_signal *)); |
| 108 |
extern int linear_input P((gsm_signal*)), linear_output P((gsm_signal *)); |
| 109 |
|
| 110 |
#endif |