definition module ReadWriteState

//1.3
from StdString import String;
//3.1

import pdState;
import State;

debug_complement normal during_debugging :== normal;

MODULE_SYMBOL						:== 0
LABEL_SYMBOL						:== 1
SECTIONLABEL_SYMBOL					:== 2
IMPORTLABEL_SYMBOL					:== 3
IMPORTEDLABEL_SYMBOL				:== 4
IMPORTEDLABELPLUSOFFSET_SYMBOL		:== 5
IMPORTEDFUNCTIONDESCRIPTOR_SYMBOL	:== 6
EMPTYSYMBOL_SYMBOL					:== 7

// macOS
ALIAS_MODULE						:== 8
IMPORTEDFUNCTIONDESCRIPTORTOCMODULE_SYMBOL	:== 9

// COMPLEMENT VERSION MANAGEMENT
:: ComplementVersion
	= { 
		complement_id	:: !String
	,	major			:: !Int
	,	minor			:: !Int
	};
	
S_COMPLEMENT_ID	:== 8;
	
WriteComplementVersion :: !ComplementVersion !*File -> !*File;
ReadComplementVersion :: !{#Char} !ComplementVersion !*File !*State -> !*(!Int,!*File,!*State);	
ComplementVersion :== sel_platform WinOSComplementVersion MacOSComplementVersion ;
	 
MacOSComplementVersion :: !ComplementVersion;
WinOSComplementVersion :: !ComplementVersion;
