summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h')
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h100
1 files changed, 0 insertions, 100 deletions
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h b/apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h
deleted file mode 100644
index 451d174785..0000000000
--- a/apps/plugins/sdl/progs/duke3d/Game/src/dukeunix.h
+++ /dev/null
@@ -1,100 +0,0 @@
1//
2// dukeunix.h
3// Duke3D
4//
5// Created by fabien sanglard on 12-12-12.
6// Copyright (c) 2012 fabien sanglard. All rights reserved.
7//
8
9#ifndef Duke3D_dukeunix_h
10#define Duke3D_dukeunix_h
11
12
13#define cdecl
14#define __far
15#define __interrupt
16
17
18//#define STUBBED(x)
19#ifdef __SUNPRO_C
20#define STUBBED(x) fprintf(stderr,"STUB: %s (??? %s:%d)\n",x,__FILE__,__LINE__)
21#else
22#define STUBBED(x) fprintf(stderr,"STUB: %s (%s, %s:%d)\n",x,__FUNCTION__,__FILE__,__LINE__)
23#endif
24
25#define PATH_SEP_CHAR '/'
26#define PATH_SEP_STR "/"
27#define ROOTDIR "/"
28#define CURDIR "./"
29
30#ifndef O_BINARY
31#define O_BINARY 0
32#endif
33
34#include <unistd.h>
35#include <fcntl.h>
36#include <sys/stat.h>
37#include <sys/types.h>
38#include <dirent.h>
39#include <assert.h>
40
41struct find_t
42{
43 DIR *dir;
44 char pattern[MAX_PATH];
45 char name[MAX_PATH];
46};
47int _dos_findfirst(char *filename, int x, struct find_t *f);
48int _dos_findnext(struct find_t *f);
49
50struct dosdate_t
51{
52 uint8_t day;
53 uint8_t month;
54 unsigned int year;
55 uint8_t dayofweek;
56};
57
58void _dos_getdate(struct dosdate_t *date);
59
60#ifndef min
61#define min(x, y) ((x) < (y) ? (x) : (y))
62#endif
63
64#ifndef max
65#define max(x, y) ((x) > (y) ? (x) : (y))
66#endif
67
68
69
70#ifndef strcmpi
71#define strcmpi(x, y) strcasecmp(x, y)
72#endif
73
74#ifdef DC
75#undef stderr
76#undef stdout
77#undef getchar
78/* kos compat */
79#define stderr ((FILE*)2)
80#define stdout ((FILE*)2)
81#define Z_AvailHeap() ((10 * 1024) * 1024)
82#else
83// 64 megs should be enough for anybody. :) --ryan.
84#define Z_AvailHeap() ((64 * 1024) * 1024)
85#endif
86
87#define printchrasm(x,y,ch) printf("%c", (uint8_t ) (ch & 0xFF))
88
89#ifdef __GNUC__
90#define GCC_PACK1_EXT __attribute__((packed,aligned(1)))
91#endif
92
93
94// FCS: Game.c features calls to mkdir without the proper flags.
95// Giving all access is ugly but it is just game OK !
96#define mkdir(X) mkdir(X,0777)
97
98#define getch getchar
99
100#endif