Commit | Line | Data |
---|---|---|
4840af6a C |
1 | /* |
2 | * protos.h -- function prototypes for when the headers don't have them. | |
3 | */ | |
4 | ||
5 | /* | |
6 | * Copyright (C) 1991, 1992, the Free Software Foundation, Inc. | |
7 | * | |
8 | * This file is part of GAWK, the GNU implementation of the | |
9 | * AWK Progamming Language. | |
10 | * | |
11 | * GAWK is free software; you can redistribute it and/or modify | |
12 | * it under the terms of the GNU General Public License as published by | |
13 | * the Free Software Foundation; either version 2 of the License, or | |
14 | * (at your option) any later version. | |
15 | * | |
16 | * GAWK is distributed in the hope that it will be useful, | |
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | * GNU General Public License for more details. | |
20 | * | |
21 | * You should have received a copy of the GNU General Public License | |
22 | * along with GAWK; see the file COPYING. If not, write to | |
23 | * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 | */ | |
25 | ||
26 | #ifdef __STDC__ | |
27 | #define aptr_t void * /* arbitrary pointer type */ | |
28 | #else | |
29 | #define aptr_t char * | |
30 | #endif | |
31 | extern aptr_t malloc P((MALLOC_ARG_T)); | |
32 | extern aptr_t realloc P((aptr_t, MALLOC_ARG_T)); | |
33 | extern aptr_t calloc P((MALLOC_ARG_T, MALLOC_ARG_T)); | |
34 | ||
35 | extern void free P((aptr_t)); | |
36 | extern char *getenv P((char *)); | |
37 | ||
38 | extern char *strcpy P((char *, const char *)); | |
39 | extern char *strcat P((char *, const char *)); | |
40 | extern char *strncpy P((char *, const char *, int)); | |
41 | extern int strcmp P((const char *, const char *)); | |
42 | extern int strncmp P((const char *, const char *, int)); | |
43 | #ifndef VMS | |
44 | extern char *strerror P((int)); | |
45 | #else | |
46 | extern char *strerror P((int,...)); | |
47 | #endif | |
48 | extern char *strchr P((const char *, int)); | |
49 | extern char *strrchr P((const char *, int)); | |
50 | extern char *strstr P((const char *s1, const char *s2)); | |
51 | extern int strlen P((const char *)); | |
52 | extern long strtol P((const char *, char **, int)); | |
53 | #if !defined(_MSC_VER) && !defined(__GNU_LIBRARY__) | |
54 | extern int strftime P((char *, int, const char *, const struct tm *)); | |
55 | #endif | |
56 | extern time_t time P((time_t *)); | |
57 | extern aptr_t memset P((aptr_t, int, size_t)); | |
58 | extern aptr_t memcpy P((aptr_t, const aptr_t, size_t)); | |
59 | extern aptr_t memmove P((aptr_t, const aptr_t, size_t)); | |
60 | extern aptr_t memchr P((const aptr_t, int, size_t)); | |
61 | extern int memcmp P((const aptr_t, const aptr_t, size_t)); | |
62 | ||
63 | /* extern int fprintf P((FILE *, char *, ...)); */ | |
64 | extern int fprintf P(()); | |
65 | #if !defined(MSDOS) && !defined(__GNU_LIBRARY__) | |
66 | extern int fwrite P((const char *, int, int, FILE *)); | |
67 | extern int fputs P((const char *, FILE *)); | |
68 | extern int unlink P((const char *)); | |
69 | #endif | |
70 | extern int fflush P((FILE *)); | |
71 | extern int fclose P((FILE *)); | |
72 | extern FILE *popen P((const char *, const char *)); | |
73 | extern int pclose P((FILE *)); | |
74 | extern void abort P(()); | |
75 | extern int isatty P((int)); | |
76 | extern void exit P((int)); | |
77 | extern int system P((const char *)); | |
78 | extern int sscanf P((/* char *, char *, ... */)); | |
79 | #ifndef toupper | |
80 | extern int toupper P((int)); | |
81 | #endif | |
82 | #ifndef tolower | |
83 | extern int tolower P((int)); | |
84 | #endif | |
85 | ||
86 | extern double pow P((double x, double y)); | |
87 | extern double atof P((char *)); | |
88 | extern double strtod P((const char *, char **)); | |
89 | extern int fstat P((int, struct stat *)); | |
90 | extern int stat P((const char *, struct stat *)); | |
91 | extern off_t lseek P((int, off_t, int)); | |
92 | extern int fseek P((FILE *, long, int)); | |
93 | extern int close P((int)); | |
94 | extern int creat P(()); | |
95 | extern int open P(()); | |
96 | extern int pipe P((int *)); | |
97 | extern int dup P((int)); | |
98 | extern int dup2 P((int,int)); | |
99 | extern int fork P(()); | |
100 | extern int execl P((/* char *, char *, ... */)); | |
101 | extern int read P((int, char *, int)); | |
102 | extern int wait P((int *)); | |
103 | extern void _exit P((int)); | |
104 | ||
105 | #ifndef __STDC__ | |
106 | extern long time P((long *)); | |
107 | #endif | |
108 | ||
109 | #ifdef NON_STD_SPRINTF | |
110 | extern char *sprintf(); | |
111 | #else | |
112 | extern int sprintf(); | |
113 | #endif /* SPRINTF_INT */ | |
114 | ||
115 | #undef aptr_t |