]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/progs.priv.h
ncurses 5.9 - patch 20111231
[ncurses.git] / progs / progs.priv.h
index 9d13b3c7acb869ee3d54701f9bf880db2df48697..63ff9a7bedc48649de12211c9d3505da2697ebb6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2000 Free Software Foundation, Inc.                   *
+ * Copyright (c) 1998-2008,2011 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  ****************************************************************************/
 
 /****************************************************************************
- *  Author: Thomas E. Dickey <dickey@clark.net> 1997,1998                   *
+ *  Author: Thomas E. Dickey                    1997-on                     *
  ****************************************************************************/
 /*
- * $Id: progs.priv.h,v 1.27 2001/06/18 18:43:52 tom Exp $
+ * $Id: progs.priv.h,v 1.36 2011/06/26 09:31:22 tom Exp $
  *
  *     progs.priv.h
  *
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
-#else
-# if HAVE_LIBC_H
-# include <libc.h>
-# endif
 #endif
 
 #if HAVE_SYS_BSDTYPES_H
 #if HAVE_DIRENT_H
 # include <dirent.h>
 # define NAMLEN(dirent) strlen((dirent)->d_name)
+# if defined(_FILE_OFFSET_BITS) && defined(HAVE_STRUCT_DIRENT64)
+#  if !defined(_LP64) && (_FILE_OFFSET_BITS == 64)
+#   define     DIRENT  struct dirent64
+#  else
+#   define     DIRENT  struct dirent
+#  endif
+# else
+#  define      DIRENT  struct dirent
+# endif
 #else
-# define dirent direct
+# define DIRENT struct direct
 # define NAMLEN(dirent) (dirent)->d_namlen
 # if HAVE_SYS_NDIR_H
 #  include <sys/ndir.h>
@@ -85,6 +90,7 @@
 # endif
 #endif
 
+#include <assert.h>
 #include <errno.h>
 
 #if DECL_ERRNO
@@ -93,7 +99,7 @@ extern int errno;
 
 #if HAVE_GETOPT_H
 #include <getopt.h>
-#else
+#elif !defined(HAVE_GETOPT_HEADER)
 /* 'getopt()' may be prototyped in <stdlib.h>, but declaring its
  * variables doesn't hurt.
  */
@@ -103,8 +109,19 @@ extern int optind;
 
 #include <curses.h>
 #include <term_entry.h>
+#include <nc_termios.h>
 #include <tic.h>
+#include <nc_tparm.h>
+
 #include <nc_alloc.h>
+#if HAVE_NC_FREEALL
+#undef ExitProgram
+#ifdef USE_LIBTINFO
+#define ExitProgram(code) _nc_free_tinfo(code)
+#else
+#define ExitProgram(code) _nc_free_tic(code)
+#endif
+#endif
 
 /* usually in <unistd.h> */
 #ifndef STDOUT_FILENO