2 /***************************************************************************
4 ****************************************************************************
5 * ncurses is copyright (C) 1992-1995 *
7 * zmbenhal@netcom.com *
9 * esr@snark.thyrsus.com *
11 * Permission is hereby granted to reproduce and distribute ncurses *
12 * by any means and for any fee, whether alone or as part of a *
13 * larger distribution, in source or in binary form, PROVIDED *
14 * this notice is included with any such distribution, and is not *
15 * removed from any of its header files. Mention of ncurses in any *
16 * applications linked with it is highly appreciated. *
18 * ncurses comes AS IS with no warranty, implied or expressed. *
20 ***************************************************************************/
23 * $Id: progs.priv.h,v 1.9 1997/04/05 23:38:08 tom Exp $
27 * Header file for curses utility programs
31 #include <ncurses_cfg.h>
34 #define MODULE_ID(id) static const char Ident[] = id;
36 #define MODULE_ID(id) /*nothing*/
41 #include <sys/types.h>
51 #if HAVE_SYS_BSDTYPES_H
52 #include <sys/bsdtypes.h> /* needed for ISC */
57 #elif HAVE_SYS_PARAM_H
58 # include <sys/param.h>
62 # if defined(_POSIX_PATH_MAX)
63 # define PATH_MAX _POSIX_PATH_MAX
64 # elif defined(MAXPATHLEN)
65 # define PATH_MAX MAXPATHLEN
67 # define PATH_MAX 255 /* the Posix minimum pathsize */
73 # define NAMLEN(dirent) strlen((dirent)->d_name)
75 # define dirent direct
76 # define NAMLEN(dirent) (dirent)->d_namlen
78 # include <sys/ndir.h>
90 #if !HAVE_EXTERN_ERRNO
97 /* 'getopt()' may be prototyped in <stdlib.h>, but declaring its
98 * variables doesn't hurt.
102 #endif /* HAVE_GETOPT_H */
106 #include <nc_alloc.h>
108 /* usually in <unistd.h> */
109 #ifndef STDOUT_FILENO
110 #define STDOUT_FILENO 1
113 #ifndef STDERR_FILENO
114 #define STDERR_FILENO 2
118 #define EXIT_SUCCESS 0
122 #define EXIT_FAILURE 1
126 #define F_OK 0 /* Test for existence. */
129 /* usually in <unistd.h> */
130 #ifndef STDOUT_FILENO
131 #define STDOUT_FILENO 1
134 #ifndef STDERR_FILENO
135 #define STDERR_FILENO 2