Root/
Source at commit 1592 created 12 years 8 months ago. By blackosx, Moved the modules choice out of the bootloader menu to the root menu. Made some changes to the wording used for some of the options for the English strings, and will add more in time. Updated header info in Settings files. | |
---|---|
1 | /*␊ |
2 | * aml_generator.h␊ |
3 | * Chameleon␊ |
4 | *␊ |
5 | * Created by Mozodojo on 20/07/10.␊ |
6 | * Copyright 2010 mozo. All rights reserved.␊ |
7 | *␊ |
8 | */␊ |
9 | ␊ |
10 | #ifndef __LIBSAIO_AML_GENERATOR_H␊ |
11 | #define __LIBSAIO_AML_GENERATOR_H␊ |
12 | ␊ |
13 | #include "libsaio.h"␊ |
14 | ␊ |
15 | #define␉AML_CHUNK_NONE␉␉0xff␊ |
16 | #define␉AML_CHUNK_ZERO␉␉0x00␊ |
17 | #define␉AML_CHUNK_ONE␉␉0x01␊ |
18 | #define␉AML_CHUNK_ALIAS␉␉0x06␊ |
19 | #define␉AML_CHUNK_NAME␉␉0x08␊ |
20 | #define␉AML_CHUNK_BYTE␉␉0x0A␊ |
21 | #define␉AML_CHUNK_WORD␉␉0x0B␊ |
22 | #define␉AML_CHUNK_DWORD␉␉0x0C␊ |
23 | #define␉AML_CHUNK_STRING␉0x0D␊ |
24 | #define␉AML_CHUNK_QWORD␉␉0x0E␊ |
25 | #define␉AML_CHUNK_SCOPE␉␉0x10␊ |
26 | #define␉AML_CHUNK_PACKAGE␉0x12␊ |
27 | ␊ |
28 | struct aml_chunk ␊ |
29 | {␊ |
30 | ␉unsigned char␉␉Type;␊ |
31 | ␉unsigned int␉␉Length;␊ |
32 | ␉char*␉␉␉␉Buffer;␊ |
33 | ␉␊ |
34 | ␉unsigned int␉␉Size;␊ |
35 | ␉␊ |
36 | ␉struct aml_chunk*␉Next;␊ |
37 | ␉struct aml_chunk*␉First;␊ |
38 | ␉struct aml_chunk*␉Last;␊ |
39 | };␊ |
40 | ␊ |
41 | static inline bool aml_isvalidchar(char c)␊ |
42 | {␊ |
43 | ␉return isupper(c) || isdigit(c) || c == '_';␊ |
44 | };␊ |
45 | ␊ |
46 | bool aml_add_to_parent(struct aml_chunk* parent, struct aml_chunk* node);␊ |
47 | struct aml_chunk* aml_create_node(struct aml_chunk* parent);␊ |
48 | void aml_destroy_node(struct aml_chunk* node);␊ |
49 | struct aml_chunk* aml_add_buffer(struct aml_chunk* parent, const char* buffer, unsigned int size);␊ |
50 | struct aml_chunk* aml_add_byte(struct aml_chunk* parent, unsigned char value);␊ |
51 | struct aml_chunk* aml_add_word(struct aml_chunk* parent, unsigned int value);␊ |
52 | struct aml_chunk* aml_add_dword(struct aml_chunk* parent, unsigned long value);␊ |
53 | struct aml_chunk* aml_add_qword(struct aml_chunk* parent, unsigned long long value);␊ |
54 | struct aml_chunk* aml_add_scope(struct aml_chunk* parent, const char* name);␊ |
55 | struct aml_chunk* aml_add_name(struct aml_chunk* parent, const char* name);␊ |
56 | struct aml_chunk* aml_add_package(struct aml_chunk* parent);␊ |
57 | struct aml_chunk* aml_add_alias(struct aml_chunk* parent, const char* name1, const char* name2);␊ |
58 | unsigned int aml_calculate_size(struct aml_chunk* node);␊ |
59 | unsigned int aml_write_node(struct aml_chunk* node, char* buffer, unsigned int offset);␊ |
60 | ␊ |
61 | #endif /* !__LIBSAIO_AML_GENERATOR_H */ |