HPGCC3 Documentation 3.0 R003

conio.h

Go to the documentation of this file.
00001 //& *** (c) 2006-2011 The HPGCC3 Team ***
00002 //& Claudio Lapilli
00003 //& Ingo Blank
00004 //&
00005 //& This file is licensed under the terms and conditions of the
00006 //& HPGCC3 license that is included with the source distribution.
00007 //& *** (c) 2006-2011 The HPGCC3 Team ***
00008 
00009 
00010 
00015 #ifndef _HPCONIO_H
00016 #define _HPCONIO_H
00017 
00018 //#include <stddef.h>
00019 #include <stdlib.h>
00020 
00021 // LONG TYPE DEFINITION, ADDED BY CLAUDIO 01/14/05
00022 #ifndef _LONGLONG_DEF
00023 typedef unsigned long long ULONGLONG;
00024 typedef long long LONGLONG;
00025 #define _LONGLONG_DEF
00026 #endif
00027 
00028 
00097 typedef struct {
00098         int  (*putchar)         (int);
00099         int  (*puts)            (const char *);
00100         int  (*puts_nonl)       (const char *);
00101         int  (*getchar)         (void);
00102         char *(*gets)           (char *);
00103         void (*clreol)          (void);
00104         void (*clear_screen)(void);
00105         void (*gotoxy)          (int,int);
00106         void (*wherexy)         (int *,int *);
00107 } _CONSOLE;
00108 
00109 extern const _CONSOLE __console[3];
00110 
00111 
00112 typedef struct {
00113 int __scr_h , __scr_w ;
00114 int __pos_x , __pos_y , __ch_w , __ch_h ;
00115 char *__decimal_separator;
00116 int __decimal_digits;
00117 int __auto_cr;
00118 unsigned int    __display_buf;
00119 } _CONSOLE_GLOBALS;
00120 
00121 
00122 
00123 extern int putchar(int);
00124 extern int puts(const char *);
00125 extern int puts_nonl(const char *);
00126 extern int getchar();
00127 extern char *gets(char *buf);
00128 extern void clreol();
00129 extern void clear_screen();
00130 extern void gotoxy(int,int);
00131 extern void wherexy(int *x,int *y);
00132 
00133 
00134 extern int dummy_putchar(int);
00135 extern int dummy_puts(const char *);
00136 extern int dummy_puts_nonl(const char *);
00137 extern int dummy_getchar();
00138 extern char *dummy_gets(char *buf);
00139 extern void dummy_clreol();
00140 extern void dummy_clear_screen();
00141 extern void dummy_gotoxy(int,int);
00142 extern void dummy_wherexy(int *x,int *y);
00143 
00144 extern int putchar_orig(int);
00145 extern int puts_orig(const char *);
00146 extern int puts_nonl_orig(const char *);
00147 extern int getchar_orig();
00148 extern char *gets_orig(char *buf);
00149 extern void clreol_orig();
00150 extern void clear_screen_orig();
00151 extern void gotoxy_orig(int,int);
00152 extern void wherexy_orig(int *x,int *y);
00153 
00154 // console io 
00155 
00156 extern void home();
00157 extern int getx();
00158 extern int gety();
00159 extern int screen_width();
00160 extern int screen_height();
00161 extern int get_tabsize();
00162 extern void set_tabsize(int);
00163 
00164 int get_decimal_digits();
00165 void set_decimal_digits(int v);
00166 char *get_decimal_separator();
00167 void set_decimal_separator(char a);
00168 
00169 extern void ShutDownConsole();
00170 extern void InitConsole();
00171 extern char * getsConsole(char *str);
00172 extern int getcharConsole();
00173 extern int putsConsole(const char *text);
00174 extern int puts_nonlConsole(const char *text);
00175 extern int putcharConsole(char c);
00176 extern void clearConsole();
00177 extern void clreolConsole();
00178 extern void gotoxyConsole(int x,int y);
00179 extern void wherexyConsole(int *x,int *y);
00180 
00181 
00182 
00183 
00184 #endif 
00185