diff options
author | nlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573> | 2005-08-03 05:55:39 +0000 |
---|---|---|
committer | nlanza <nlanza@c06c8d41-db1a-0410-9941-cceddc491573> | 2005-08-03 05:55:39 +0000 |
commit | 7b2204d69f21d7075e4666ee032d7a129081bc4b (patch) | |
tree | d187565b15ddf71f99b5ee35a8eb15b85170b46f /trunk/source/libunix.h | |
parent | 64fb30df969e02635f651f3e6c6bb5f0dce1960c (diff) | |
download | crawl-ref-7b2204d69f21d7075e4666ee032d7a129081bc4b.tar.gz crawl-ref-7b2204d69f21d7075e4666ee032d7a129081bc4b.zip |
Further build cleanup.
The build system used 'LINUX' as a shorthand for Unix-like systems, which
ends up being a horrible mess -- it's pretty counterintuitive to have
the Solaris/Irix/BSD setups #defining LINUX to make things work.
This replaces the use of 'LINUX' with a more-general and more-obvious
'UNIX', and moves the not-really-linux-at-all 'liblinux' to 'libunix'.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'trunk/source/libunix.h')
-rw-r--r-- | trunk/source/libunix.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/trunk/source/libunix.h b/trunk/source/libunix.h new file mode 100644 index 0000000000..f3370fc872 --- /dev/null +++ b/trunk/source/libunix.h @@ -0,0 +1,53 @@ +#ifndef LIBUNIX_H +#define LIBUNIX_H + + +// Some replacement routines missing in gcc + +#define _NORMALCURSOR 1 +#define _NOCURSOR 0 +#define O_BINARY O_RDWR + +char *strlwr(char *str); +char getche(void); + + +int clrscr(void); +int cprintf(const char *format,...); +int gotoxy(int x, int y); +int itoa(int value, char *strptr, int radix); +int kbhit(void); +int key_to_command(int); +int putch(unsigned char chr); +int stricmp(const char *str1, const char *str2); +int translate_keypad(int keyin); +int wherex(void); +int wherey(void); +int window(int x1, int y1, int x2, int y2); +void update_screen(void); +void clear_to_end_of_line(void); +void clear_to_end_of_screen(void); +int get_number_of_lines_from_curses(void); +void get_input_line_from_curses( char *const buff, int len ); + +void _setcursortype(int curstype); +void delay(unsigned long time); +void init_key_to_command(); +void unixcurses_shutdown(void); +void unixcurses_startup(void); +void textbackground(int bg); +void textcolor(int col); + +#ifndef _LIBUNIX_IMPLEMENTATION +/* Some stuff from curses, to remove compiling warnings.. */ +extern "C" +{ + int getstr(char *); + int getch(void); + int noecho(void); + int echo(void); +} +#endif + + +#endif |