Alexandre Lision | d204ea5 | 2013-10-15 10:16:25 -0400 | [diff] [blame] | 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 | |
| 7 | /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast.h,v 1.4 1995/03/07 21:26:16 jutta Exp $ */ |
| 8 | |
| 9 | #ifndef TOAST_H |
| 10 | #define TOAST_H /* Guard against multiple includes */ |
| 11 | |
| 12 | #include "config.h" |
| 13 | |
| 14 | #include <sys/types.h> |
| 15 | #include <sys/stat.h> |
| 16 | |
| 17 | #include <stdio.h> |
| 18 | #include <ctype.h> |
| 19 | #include <signal.h> |
| 20 | |
| 21 | #include <errno.h> |
| 22 | #ifndef HAS_ERRNO_DECL |
| 23 | extern int errno; |
| 24 | #endif |
| 25 | |
| 26 | #ifdef HAS_LIMITS_H |
| 27 | #include <limits.h> |
| 28 | #endif |
| 29 | |
| 30 | #ifdef HAS_FCNTL_H |
| 31 | # include <fcntl.h> |
| 32 | #endif |
| 33 | |
| 34 | #ifdef HAS_UTIME |
| 35 | # ifdef HAS_UTIME_H |
| 36 | # include <utime.h> |
| 37 | # endif |
| 38 | #endif |
| 39 | |
| 40 | #include "gsm.h" |
| 41 | |
| 42 | #ifndef S_ISREG |
| 43 | #define S_ISREG(x) ((x) & S_IFREG) |
| 44 | #endif /* S_ISREG */ |
| 45 | |
| 46 | |
| 47 | # define READ "rb" |
| 48 | # define WRITE "wb" |
| 49 | #ifdef O_BINARY |
| 50 | # define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL|O_BINARY |
| 51 | #else |
| 52 | # define O_WRITE_EXCL O_WRONLY|O_CREAT|O_EXCL |
| 53 | #endif |
| 54 | |
| 55 | #ifndef SIGHANDLER_T |
| 56 | #define SIGHANDLER_T void /* what does a signal handler return? */ |
| 57 | #endif |
| 58 | |
| 59 | |
| 60 | #ifdef HAS_STRING_H |
| 61 | #include <string.h> |
| 62 | #else |
| 63 | # ifdef HAS_STRINGS_H |
| 64 | # include <strings.h> |
| 65 | # else |
| 66 | # include "proto.h" |
| 67 | |
| 68 | extern int strlen P((char *)); |
| 69 | extern char * strcpy P((char *, char *)); |
| 70 | extern char * strcat P((char *, char *)); |
| 71 | extern char * strrchr P((char *, int)); |
| 72 | |
| 73 | # include "unproto.h" |
| 74 | # endif |
| 75 | #endif |
| 76 | |
| 77 | |
| 78 | #ifdef HAS_STDLIB_H |
| 79 | #include <stdlib.h> |
| 80 | #else |
| 81 | # include "proto.h" |
| 82 | # ifdef HAS_MALLOC_H |
| 83 | # include <malloc.h> |
| 84 | # else |
| 85 | extern char * malloc P((unsigned)); |
| 86 | # endif |
| 87 | extern int exit P((int)); |
| 88 | # include "unproto.h" |
| 89 | #endif |
| 90 | |
| 91 | |
| 92 | #ifdef HAS_UNISTD_H |
| 93 | # include <unistd.h> |
| 94 | #endif |
| 95 | |
| 96 | /* |
| 97 | * This suffix is tacked onto/removed from filenames |
| 98 | * similar to the way freeze and compress do it. |
| 99 | */ |
| 100 | #define SUFFIX_TOASTED ".gsm" |
| 101 | |
| 102 | #include "proto.h" |
| 103 | |
| 104 | extern int audio_init_input P((void)), audio_init_output P((void)); |
| 105 | extern int ulaw_input P((gsm_signal*)), ulaw_output P((gsm_signal *)); |
| 106 | extern int alaw_input P((gsm_signal*)), alaw_output P((gsm_signal *)); |
| 107 | extern int linear_input P((gsm_signal*)), linear_output P((gsm_signal *)); |
| 108 | |
| 109 | #endif /* TOAST_H */ |