home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / conio.h < prev    next >
Text File  |  1999-03-15  |  3KB  |  95 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __conio_h
  10.    #define __conio_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <conio.h> header file                                           */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    #if defined(__EXTENDED__)
  42.  
  43.       extern char * _IMPORT _LNK_CONV _cgets( char * );
  44.       extern int    _IMPORT _LNK_CONV _cprintf( const char *, ... );
  45.       extern int    _IMPORT _LNK_CONV _cputs( const char * );
  46.       extern int    _IMPORT _LNK_CONV _cscanf( const char *, ... );
  47.       extern int    _IMPORT _LNK_CONV _getch( void );
  48.       extern int    _IMPORT _LNK_CONV _getche( void );
  49.       extern int    _IMPORT _LNK_CONV _kbhit( void );
  50.       extern int    _IMPORT _LNK_CONV _putch( int );
  51.       extern int    _IMPORT _LNK_CONV _ungetch( int );
  52.  
  53.       #if __THW_INTEL__ && (__IBMC__ || __IBMCPP__)
  54.          int            _Builtin __inpb( const unsigned int );
  55.          unsigned short _Builtin __inpw( const unsigned int );
  56.          unsigned long  _Builtin __inpd( const unsigned int );
  57.          int            _Builtin __outpb( const unsigned int, const int );
  58.          unsigned short _Builtin __outpw( const unsigned int, const unsigned short );
  59.          unsigned long  _Builtin __outpd( const unsigned int, const unsigned long );
  60.  
  61.          #define _inp( x )       __inpb( x )
  62.          #define _inpw( x )      __inpw( x )
  63.          #define _inpd( x )      __inpd( x )
  64.          #define _outp( x, y )   __outpb( (x), (y) )
  65.          #define _outpw( x, y )  __outpw( (x), (y) )
  66.          #define _outpd( x, y )  __outpd( (x), (y) )
  67.       #endif
  68.  
  69.       #define cgets( a )       _cgets( a )
  70.       #define cprintf          _cprintf
  71.       #define cputs( a )       _cputs( a )
  72.       #define cscanf           _cscanf
  73.       #define getch            _getch
  74.       #define getche           _getche
  75.       #define kbhit            _kbhit
  76.       #define putch( a )       _putch( a )
  77.       #define ungetch( a )     _ungetch( a )
  78.  
  79.    #endif
  80.  
  81.    #ifdef __cplusplus
  82.       }
  83.    #endif
  84.  
  85. #endif
  86.  
  87. #if __IBMC__ || __IBMCPP__
  88. #pragma info( none )
  89. #ifndef __CHKHDR__
  90.    #pragma info( restore )
  91. #endif
  92. #pragma info( restore )
  93. #endif
  94.  
  95.