[Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.33,2.34

A.M. Kuchling python-dev@python.org
Tue, 25 Jul 2000 05:37:44 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21909

Modified Files:
	_cursesmodule.c 
Log Message:
Modified version of patch #100963 from Mark Favas:  has_key() is an
ncurses extension, so it's made conditional depending on STRICT_SYSV_CURSES


Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.33
retrieving revision 2.34
diff -C2 -r2.33 -r2.34
*** _cursesmodule.c	2000/07/24 23:54:49	2.33
--- _cursesmodule.c	2000/07/25 12:37:41	2.34
***************
*** 44,48 ****
  #ifdef __osf__
  #define _XOPEN_SOURCE_EXTENDED  /* Define macro for OSF/1 */
! #define STRICT_SYSV_CURSES 
  #endif
  
--- 44,48 ----
  #ifdef __osf__
  #define _XOPEN_SOURCE_EXTENDED  /* Define macro for OSF/1 */
! #define STRICT_SYSV_CURSES      /* Don't use ncurses extensions */
  #endif
  
***************
*** 54,58 ****
  
  #if defined(__sgi__) || defined(__sun__)
! #define STRICT_SYSV_CURSES 
  typedef chtype attr_t;           /* No attr_t type is available */
  #endif
--- 54,58 ----
  
  #if defined(__sgi__) || defined(__sun__)
! #define STRICT_SYSV_CURSES       /* Don't use ncurses extensions */
  typedef chtype attr_t;           /* No attr_t type is available */
  #endif
***************
*** 1591,1595 ****
  }
  
! #if !defined(__sgi__) && !defined(__sun__)
   /* No has_key! */
  static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
--- 1591,1595 ----
  }
  
! #ifndef STRICT_SYSV_CURSES
   /* No has_key! */
  static PyObject * PyCurses_has_key(PyObject *self, PyObject *args)
***************
*** 1608,1612 ****
    return Py_True; 
  }
! #endif
  
  static PyObject *
--- 1608,1612 ----
    return Py_True; 
  }
! #endif /* STRICT_SYSV_CURSES */
  
  static PyObject *
***************
*** 2112,2116 ****
    {"has_ic",              (PyCFunction)PyCurses_has_ic},
    {"has_il",              (PyCFunction)PyCurses_has_il},
! #if !defined(__sgi__) && !defined(__sun__)
    {"has_key",             (PyCFunction)PyCurses_has_key},
  #endif
--- 2112,2116 ----
    {"has_ic",              (PyCFunction)PyCurses_has_ic},
    {"has_il",              (PyCFunction)PyCurses_has_il},
! #ifndef STRICT_SYSV_CURSES
    {"has_key",             (PyCFunction)PyCurses_has_key},
  #endif