home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / h.z / CONIO.H < prev    next >
C/C++ Source or Header  |  1996-07-24  |  2KB  |  77 lines

  1. /*
  2.  *  conio.h    Console and Port I/O functions
  3.  *
  4.  *  Copyright by WATCOM International Corp. 1988-1996.  All rights reserved.
  5.  */
  6. #ifndef _CONIO_H_INCLUDED
  7. #define _CONIO_H_INCLUDED
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #ifndef _COMDEF_H_INCLUDED
  13.  #include <_comdef.h>
  14. #endif
  15.  
  16. #ifndef _VA_LIST_DEFINED
  17. #define _VA_LIST_DEFINED
  18. #if defined(__PPC__)
  19.  #if defined(__NT__)
  20.     typedef char * __va_list;
  21.  #else
  22.     typedef struct {
  23.       char  __gpr;
  24.       char  __fpr;
  25.       char  __reserved[2];
  26.       char *__input_arg_area;
  27.       char *__reg_save_area;
  28.     } __va_list;
  29.   #endif
  30. #elif defined(__AXP__)
  31.   typedef struct {
  32.     char *__base;
  33.     int   __offset;
  34.   } __va_list;
  35. #elif defined(__HUGE__) || defined(__SW_ZU)
  36.   typedef char _WCFAR *__va_list[1];
  37. #else
  38.   typedef char *__va_list[1];
  39. #endif
  40. #endif
  41.  
  42. _WCRTLINK extern char *cgets(char *__buf);
  43. _WCRTLINK extern int cputs(const char *__buf);
  44. _WCRTLINK extern int cprintf(const char *__fmt,...);
  45. _WCRTLINK extern int cscanf(const char *__fmt,...);
  46. _WCRTLINK extern int getch(void);
  47. _WCRTLINK extern int _getch(void);
  48. _WCRTLINK extern int getche(void);
  49. _WCRTLINK extern int _getche(void);
  50. _WCRTLINK extern int kbhit(void);
  51. #if defined(_M_IX86)
  52.  _WCIRTLINK extern unsigned inp(unsigned __port);
  53.  _WCIRTLINK extern unsigned inpw(unsigned __port);
  54.  _WCIRTLINK extern unsigned outp(unsigned __port, unsigned __value);
  55.  _WCIRTLINK extern unsigned outpw(unsigned __port,unsigned __value);
  56.  #if defined(__386__)
  57.   _WCIRTLINK extern unsigned inpd(unsigned __port);
  58.   _WCIRTLINK extern unsigned outpd(unsigned __port, unsigned __value);
  59.  #endif
  60. #endif
  61. _WCRTLINK extern int putch(int __c);
  62. _WCRTLINK extern int ungetch(int __c);
  63. _WCRTLINK extern int vcprintf( const char *__format, __va_list __arg );
  64. _WCRTLINK extern int vcscanf( const char *__format, __va_list __arg );
  65.  
  66. #if defined(__INLINE_FUNCTIONS__) && defined(_M_IX86)
  67.  #pragma intrinsic(inp,inpw,outp,outpw)
  68.  #if defined(__386__)
  69.   #pragma intrinsic(inpd,outpd)
  70.  #endif
  71. #endif
  72.  
  73. #ifdef __cplusplus
  74. };
  75. #endif
  76. #endif
  77.