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