Then rather than save-reload file it will be better as so:
Ziron loads file for plugin X:
Ziron passes a pointer of the internal buffer per each file that is included.
Plugin sets the internal buffer with the new file code, by calling a specified function.
Go to step 1 for each plugin.
no need to save or re-load the file since this would be extremely slow.
Later on development it will be possible to register a keyword with the compiler, allowing to have a callback function to create complex functionality.
ok for looping , but i how plugin will change the source code buffer , inserting source code in buffer will be so hard, so i think first solution is good here.
So Ziorn will pass filename to plugin , so plug in will read line by line and changes it the
save it back , and so on with the flowing plugins.
function FileEntry(DWord handle; char* strCode) {
const maxLen = 1024;
//create a buffer
char myBuffer[maxLen]
//go thorough each line of strCode and update myBuffer
strlcpy(@myBuffer, ....
//set the buffer
Ziron_SetFileBuffer(handle, @myBuffer, maxLen);
}
each plugin will receive the updated internal buffer,