Beispiel #1
0
// lookup encoder held in DynaBuf and return its struct pointer (or NULL on failure)
const struct encoder *encoding_find(void)
{
	void	*node_body;

	// make sure tree is initialised
	if (encoder_tree == NULL)
		Tree_add_table(&encoder_tree, encoder_list);
	// perform lookup
	if (!Tree_easy_scan(encoder_tree, &node_body, GlobalDynaBuf)) {
		Throw_error("Unknown encoding.");
		return NULL;
	}

	return node_body;
}
Beispiel #2
0
// register pseudo opcodes
void Input_init(void) {
	Tree_add_table(&pseudo_opcode_tree, pseudo_opcodes);
}
Beispiel #3
0
// register pseudo opcodes (done later)
void Label_register_init(void)
{
	Tree_add_table(&pseudo_opcode_tree, pseudo_opcodes);
}
Beispiel #4
0
// register pseudo opcodes
void Section_init(void) {
	Tree_add_table(&pseudo_opcode_tree, pseudo_opcodes);
}
Beispiel #5
0
// register pseudo opcodes and build keyword tree for until/while
void Flow_init(void) {
	Tree_add_table(&condkey_tree, condkeys);
	Tree_add_table(&pseudo_opcode_tree, pseudo_opcodes);
}
Beispiel #6
0
// create cpu type tree (is done early)
void CPUtype_init(void)
{
	Tree_add_table(&CPU_tree, CPUs);
}
Beispiel #7
0
// register pseudo opcodes and create dynamic buffer
void Basics_init(void) {
	user_message = DynaBuf_create(USERMSG_DYNABUF_INITIALSIZE);
	Tree_add_table(&pseudo_opcode_tree, pseudo_opcodes);
}