libww
libww
WWitch compatibility library for the Wonderful toolchain
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
#ifndef __LIBWW_SYS_TYPES_H__
2
#define __LIBWW_SYS_TYPES_H__
3
4
// This type header is written with the Wonderful toolchain libc in mind;
5
// as such, we don't duplicate types defined in the C standard.
6
7
#include <stdarg.h>
8
#include <stddef.h>
9
#include <stdint.h>
10
#include <time.h>
11
#include <wonderful.h>
12
13
typedef
unsigned
short
ushort
;
14
typedef
unsigned
long
ulong
;
15
16
typedef
uint8_t
BYTE
;
17
typedef
uint16_t
WORD
;
18
typedef
uint32_t
DWORD
;
19
typedef
int16_t
BOOL
;
20
21
#define FALSE 0
22
#define TRUE 1
23
24
// Compatibility shims
25
#define far __far
26
#define near
27
28
// FreyaBIOS types
29
struct
intvector
{
30
void (*
callback
)(void);
31
uint16_t
cs
;
32
uint16_t
ds
;
33
uint16_t
unknown
;
/* ? */
34
};
35
typedef
struct
intvector
intvector_t
;
36
37
struct
ownerinfo
{
38
char
name
[16];
39
uint16_t
birth_year
;
40
uint8_t
birth_month
;
41
uint8_t
birth_day
;
42
uint8_t
sex
;
43
uint8_t
bloodtype
;
44
};
45
typedef
struct
ownerinfo
ownerinfo_t
;
46
47
struct
datetime
{
48
uint8_t
year
;
/* 0 = year 2000 */
49
uint8_t
month
;
/* 1 - 12 */
50
uint8_t
date
;
/* 1 - 31 */
51
uint8_t
day_of_week
;
/* 0 - 6, 0 = Sunday, 1 = Monday, 6 = Saturday */
52
uint8_t
hour
;
/* 0 - 23 */
53
uint8_t
minute
;
/* 0 - 59 */
54
uint8_t
second
;
/* 0 - 59 */
55
};
56
typedef
struct
datetime
datetime_t
;
57
58
// FreyaOS system types
59
typedef
uint16_t
pid_t
;
60
typedef
int32_t
flen_t
;
61
typedef
int32_t
fpos_t
;
62
typedef
uint16_t
fmode_t
;
63
typedef
uint32_t
appid_t
;
64
65
typedef
union
{
66
void
__far *
fp
;
67
uint32_t
ul
;
68
struct
{
69
uint16_t
off
;
70
uint16_t
seg
;
71
} w;
72
}
address_t
;
73
typedef
address_t
floc_t
;
74
75
#endif
/* __LIBWW_SYS_TYPES_H__ */
datetime
Definition
types.h:47
datetime::date
uint8_t date
Definition
types.h:50
datetime::month
uint8_t month
Definition
types.h:49
datetime::year
uint8_t year
Definition
types.h:48
datetime::second
uint8_t second
Definition
types.h:54
datetime::minute
uint8_t minute
Definition
types.h:53
datetime::day_of_week
uint8_t day_of_week
Definition
types.h:51
datetime::hour
uint8_t hour
Definition
types.h:52
intvector
Definition
types.h:29
intvector::callback
void(* callback)(void)
Definition
types.h:30
intvector::unknown
uint16_t unknown
Definition
types.h:33
intvector::ds
uint16_t ds
Definition
types.h:32
intvector::cs
uint16_t cs
Definition
types.h:31
ownerinfo
Definition
types.h:37
ownerinfo::birth_year
uint16_t birth_year
Definition
types.h:39
ownerinfo::birth_month
uint8_t birth_month
Definition
types.h:40
ownerinfo::birth_day
uint8_t birth_day
Definition
types.h:41
ownerinfo::bloodtype
uint8_t bloodtype
Definition
types.h:43
ownerinfo::name
char name[16]
Definition
types.h:38
ownerinfo::sex
uint8_t sex
Definition
types.h:42
BOOL
int16_t BOOL
Definition
types.h:19
fpos_t
int32_t fpos_t
Definition
types.h:61
floc_t
address_t floc_t
Definition
types.h:73
intvector_t
struct intvector intvector_t
Definition
types.h:35
ownerinfo_t
struct ownerinfo ownerinfo_t
Definition
types.h:45
ulong
unsigned long ulong
Definition
types.h:14
datetime_t
struct datetime datetime_t
Definition
types.h:56
BYTE
uint8_t BYTE
Definition
types.h:16
WORD
uint16_t WORD
Definition
types.h:17
fmode_t
uint16_t fmode_t
Definition
types.h:62
ushort
unsigned short ushort
Definition
types.h:13
pid_t
uint16_t pid_t
Definition
types.h:59
flen_t
int32_t flen_t
Definition
types.h:60
DWORD
uint32_t DWORD
Definition
types.h:18
appid_t
uint32_t appid_t
Definition
types.h:63
address_t
Definition
types.h:65
address_t::ul
uint32_t ul
Definition
types.h:67
address_t::seg
uint16_t seg
Definition
types.h:70
address_t::fp
void __far * fp
Definition
types.h:66
address_t::off
uint16_t off
Definition
types.h:69
include
sys
types.h
Generated by
1.14.0