对了,是LCC-win32里的。
// TCCONIO.H
//
// Old Turbo-C CONIO.H compatibility library for LCC-Win32
// and GCC/EGCS Mingw32 compilers.
// Version 1.0 (September 1999).
// Created by Daniel Guerrero Miralles (daguer@geocities.com).
// This source code is public domain.
#ifndef _TCCONIO_H_
#define _TCCONIO_H_
#include <Windows.h>
#include <conio.h>
#ifdef __LCC__
// Mingw32 does not include inps in its run-time lib.
#define inport inpw
#define inportb inp
#define outport outpw
#define outportw outp
#endif //__LCC__
extern int directvideo; // useless, only for compatibility.
extern int _wscroll; // also useless.
// CONTROL FUNCTIONS //////////////////////////////////////////////////////
// Get some information about the console state
struct text_info
{
unsigned char winleft;
unsigned char wintop;
unsigned char winright;
unsigned char winbottom;
unsigned char attribute;
unsigned char normattr;
unsigned char currmode;
unsigned char screenheight;
unsigned char screenwidth;
unsigned char curx;
unsigned char cury;
};
void gettextinfo (struct text_info * pTI);
// set the video mode
enum text_modes
{
LASTMODE = -1,
BW40,
C40,
BW80,
C80,
MONO = 7,
C4350 = 64
};
// NOTE: This function does nothing but reset the console
// to default state.
void textmode (int newmode);
// change the size and position of the text i/o window
// IMPORTANT NOTE: this function does nothing !
void window (int left, int top, int right, int bottom);
// CURSOR FUNCTIONS ///////////////////////////////////////////////////////
// NOTE: Cursor coordinates begin at (1,1) istead of (0,0)
// get cursor horizontal position
int wherex (void);
// get cursor vertical position
int wherey (void);
// Change the cursor location
void gotoxy (int x, int y);
// set the cursor shape
#define _NOCURSOR 0
#define _SOLIDCURSOR 1
#define _NORMALCURSOR 2
void _setcursortype (int cur_t);
// COLOR FUNCTIONS ////////////////////////////////////////////////////////
// change text color to high intensity
void highvideo (void);
// change text color to low intensity
void lowvideo (void);
// set default text colors
void normvideo (void);
// set the text foreground/background colors
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGRAY 7
#define DARKGRAY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
#define BLINK 128 // Useless, background uses high intensity colors.
void textattr (int newattr);
// set the text background color
void textbackground (int newcolor);
// set the text color
void textcolor (int newcolor);
// TEXT I/O FUNCTIONS /////////////////////////////////////////////////////
//clear up to end-of-line
void clreol (void);
// clear the screen
void clrscr (void);
// insert a line
void insline (void);
// delete current line
void delline (void);
// copy a rectangular section of the screen
int movetext (int left, int top, int right, int bottom, int destleft, int desttop);
// get text from a rectangular section of the screen
// IMPORTANT NOTE: In the ASCII version of gettext() and puttext(), both the
// character and the attribute must be of type 'char' (8 bits), while in the
// UNICODE version both must be of the type WCHAR (16 bits).
int gettextA (int left, int top, int right, int bottom, void * destin);
int gettextW (int left, int top, int right, int bottom, void * destin);
// Set text in a rectangular section of the screen
int puttextA (int left, int top, int right, int bottom, void * source);
int puttextW (int left, int top, int right, int bottom, void * source);
// read a password from keyboard
char * getpassA (const char * prompt);
WCHAR * getpassW (const WCHAR * prompt);