]> git.saurik.com Git - apple/system_cmds.git/blame - kmodload.tproj/vers_rsrc.h
system_cmds-433.4.tar.gz
[apple/system_cmds.git] / kmodload.tproj / vers_rsrc.h
CommitLineData
916eb79e
A
1#ifndef _LIBSA_VERS_H_
2#define _LIBSA_VERS_H_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <sys/types.h>
9#include <libc.h>
10
11#include <CoreFoundation/CoreFoundation.h>
12
13typedef union {
14 UInt32 vnum;
15 UInt8 bytes[4];
16} VERS_version;
17
18typedef enum {
19 VERS_development = 0x20,
20 VERS_alpha = 0x40,
21 VERS_beta = 0x60,
22 VERS_candidate = 0x70, // for interim usage only!
23 VERS_release = 0x80,
24 VERS_invalid = 0xff
25} VERS_revision;
26
27#define BCD_combine(l, r) ( (((l) & 0xf) << 4) | ((r) & 0xf) )
28#define BCD_get_left(p) ( ((p) >> 4) & 0xf )
29#define BCD_get_right(p) ( (p) & 0xf )
30
31#define BCD_illegal (0xff) // full byte, 11111111
32
33int VERS_parse_string(char * vers_string, UInt32 * version_num);
34int VERS_string(char * buffer, UInt32 length, UInt32 vers);
35
36#ifdef __cplusplus
37}
38#endif
39
40#endif _LIBSA_VERS_H_