2 * prototypes.h - prototypes header file
4 * This file is part of zsh, the Z shell.
6 * Copyright (c) 1992-1997 Paul Falstad
9 * Permission is hereby granted, without written agreement and without
10 * license or royalty fees, to use, copy, modify, and distribute this
11 * software and to distribute modified versions of this software for any
12 * purpose, provided that the above copyright notice and the following
13 * two paragraphs appear in all copies of this software.
15 * In no event shall Paul Falstad or the Zsh Development Group be liable
16 * to any party for direct, indirect, special, incidental, or consequential
17 * damages arising out of the use of this software and its documentation,
18 * even if Paul Falstad and the Zsh Development Group have been advised of
19 * the possibility of such damage.
21 * Paul Falstad and the Zsh Development Group specifically disclaim any
22 * warranties, including, but not limited to, the implied warranties of
23 * merchantability and fitness for a particular purpose. The software
24 * provided hereunder is on an "as is" basis, and Paul Falstad and the
25 * Zsh Development Group have no obligation to provide maintenance,
26 * support, updates, enhancements, or modifications.
31 char *malloc
_((size_t));
32 char *realloc
_((void *, size_t));
33 char *calloc
_((size_t, size_t));
36 #if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
37 extern int tgetent
_((char *bp
, char *name
));
38 extern int tgetnum
_((char *id
));
39 extern int tgetflag
_((char *id
));
40 extern char *tgetstr
_((char *id
, char **area
));
41 extern char *tgoto
_((char *cm
, int destcol
, int destline
));
42 extern int tputs
_((char *cp
, int affcnt
, int (*outc
) (int)));
45 /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */
48 #if defined(__hpux) && defined(_XPG3) && !defined(_POSIX1_1988)
49 # define WRITE_ARG_2_T void *
51 # define WRITE_ARG_2_T char *
54 #if defined(__hpux) && defined(_HPUX_SOURCE) && !defined(_XPG4_EXTENDED)
55 # define SELECT_ARG_2_T int *
57 # define SELECT_ARG_2_T fd_set *
61 char *mktemp
_((char *));
64 #if defined(__osf__) && defined(__alpha) && defined(__GNUC__)
65 /* Digital cc does not need these prototypes, gcc does need them */
66 # ifndef HAVE_IOCTL_PROTO
67 int ioctl
_((int d
, unsigned long request
, void *argp
));
69 # ifndef HAVE_MKNOD_PROTO
70 int mknod
_((const char *pathname
, int mode
, dev_t device
));
72 int nice
_((int increment
));
73 int select
_((int nfds
, fd_set
* readfds
, fd_set
* writefds
, fd_set
* exceptfds
, struct timeval
*timeout
));
76 #if defined(DGUX) && defined(__STDC__)
77 /* Just plain missing. */
78 extern int getrlimit
_((int resource
, struct rlimit
*rlp
));
79 extern int setrlimit
_((int resource
, const struct rlimit
*rlp
));
80 extern int getrusage
_((int who
, struct rusage
*rusage
));
81 extern int gettimeofday
_((struct timeval
*tv
, struct timezone
*tz
));
82 extern int wait3
_((union wait
*wait_status
, int options
, struct rusage
*rusage
));
83 extern int getdomainname
_((char *name
, int maxlength
));
84 extern int select
_((int nfds
, fd_set
* readfds
, fd_set
* writefds
, fd_set
* exceptfds
, struct timeval
*timeout
));
85 #endif /* DGUX and __STDC__ */
88 extern pid_t
getppid(void);
91 #if defined(__sun__) && !defined(__SVR4) /* SunOS */
92 extern char *strerror
_((int errnum
));
95 /**************************************************/
96 /*** prototypes for functions built in compat.c ***/
98 extern char *strstr
_((const char *s
, const char *t
));
101 #ifndef HAVE_GETHOSTNAME
102 extern int gethostname
_((char *name
, size_t namelen
));
105 #ifndef HAVE_GETTIMEOFDAY
106 extern int gettimeofday
_((struct timeval
*tv
, struct timezone
*tz
));
109 #ifndef HAVE_DIFFTIME
110 extern double difftime
_((time_t t2
, time_t t1
));
113 #ifndef HAVE_STRERROR
114 extern char *strerror
_((int errnum
));
117 /*** end of prototypes for functions in compat.c ***/
118 /***************************************************/
121 extern void bcopy
_((const void *, void *, int));