Súbor: [Platon] / games / _shared / dos2linux.h (stiahnutie)
Revízia 1.5, Tue Apr 6 09:54:15 2004 UTC (21 years, 1 month ago) by nepto
Zmeny od 1.4: +13 -6
[lines]
Headers update:
- switch to standard/classic Platon SDG source header
- bumped copyright year to 2004
- changelog dates reformatted to new format YYYY-MM-DD
|
/*
* games/_shared/ - shared routines for games
*
* dos2linux.h - MS-Dos to GNU/Linux call convertor header file
* ____________________________________________________________
*
* Developed by Ondrej Jombik <nepto@platon.sk>
* Copyright (c) 2003-2004 Platon SDG, http://platon.sk/
* All rights reserved.
*
* See README file for more information about this software.
* See COPYING file for license information.
*
* Download the latest version from
* http://platon.sk/projects/games/
*
* Changelog:
* 2003-05-03 - created
* 2003-08-12 - X11 adaptations
*/
/* $Platon: games/_shared/dos2linux.h,v 1.4 2003/08/12 20:50:59 nepto Exp $ */
#ifndef _DOS2LINUX_H
# define _DOS2LINUX_H
#include <stdio.h>
#include <unistd.h>
/* core types */
#define near /* nothing */
#define far /* nothing */
#define huge /* nothing */
/* no operation */
#define no_operation() usleep(0L)
/* stdio.h */
/* stdio.h functions */
#define fcloseall() no_operation()
/* stdio.h defines (colors) */
#define BLINK 128 /* blink bit */
#undef BLINK
#define BLINK 0 /* undefined */
#if ! defined(BLACK)
enum BORLAND_CPLUSPLUS_3_1_COLORS {
BLACK, /* dark colors */
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
BROWN,
LIGHTGRAY,
DARKGRAY, /* light colors */
LIGHTBLUE,
LIGHTGREEN,
LIGHTCYAN,
LIGHTRED,
LIGHTMAGENTA,
YELLOW,
WHITE
};
#endif /* #if ! defined(BLACK) */
/* conio.h */
#define putch putchar
#define cputs(__s) fputs(__s, stdout)
#define cprintf printf
#define gotoxy(__x, __y) no_operation()
#define clrscr() no_operation()
#define textattr(_attr) no_operation()
#define textcolor(__c) no_operation()
#define textbackground(__c) no_operation()
int kbhit(void);
int getch(void);
/* stdlib.h */
#define randomize() srand(time(NULL))
/* string.h */
#define strcmpi(__s1, __s2) strcasecmp(__s1, __s2)
/* dos.h */
struct date {
#if 0
int da_year; /* current year */
#endif
short int da_year; /* current year */
char da_day; /* day of the month */
char da_mon; /* month (1 = Jan) */
};
struct time {
unsigned char ti_min; /* minutes */
unsigned char ti_hour; /* hours */
unsigned char ti_hund; /* hundredths of seconds */
unsigned char ti_sec; /* seconds */
};
#define delay(__s) usleep(__s * 1000)
#define ctrlbrk(__handler) no_operation()
#define setcbrk(__cbrkvalue) no_operation()
void getdate(struct date *datep);
#endif /* #ifndef _DOS2LINUX_H */
Platon Group <platon@platon.sk> http://platon.sk/
|