Initial commit
This commit is contained in:
17
src/Program/append.c
Normal file
17
src/Program/append.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "../../include/ground.h"
|
||||
|
||||
void _GroundProgramAppend(GroundProgram* program, GroundInstruction instruction) {
|
||||
if (program->len + 1 >= program->capacity) {
|
||||
GroundInstruction* tmp = realloc(program->at, sizeof(GroundInstruction) * program->capacity * 2);
|
||||
if (tmp == NULL) {
|
||||
Ground.Flags.error = true;
|
||||
return;
|
||||
}
|
||||
|
||||
program->at = tmp;
|
||||
program->capacity *= 2;
|
||||
}
|
||||
|
||||
program->at[program->len] = Ground.Copy.Instruction(&instruction);
|
||||
program->len++;
|
||||
}
|
||||
5
src/Program/execute.c
Normal file
5
src/Program/execute.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "../../include/ground.h"
|
||||
|
||||
void _GroundProgramExecute(GroundProgram* program, GroundState* state) {
|
||||
// stub
|
||||
}
|
||||
Reference in New Issue
Block a user