176 lines
6.5 KiB
C
176 lines
6.5 KiB
C
|
|
/*
|
|
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
* SCR_Cfg.h
|
|
* Scripts, Beaudet Christophe
|
|
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
*
|
|
*/
|
|
|
|
#ifndef __SCR_Cfg_h__Types
|
|
#define __SCR_Cfg_h__Types
|
|
|
|
#ifndef __Only_Types__
|
|
#define __SCR_Cfg_h__Undef
|
|
#define __Only_Types__
|
|
#endif /* !__Only_Types__ */
|
|
|
|
/*
|
|
*=================================================================================================
|
|
* Includes.
|
|
*=================================================================================================
|
|
*/
|
|
|
|
#ifdef __SCR_Cfg_h__Undef
|
|
#undef __Only_Types__
|
|
#undef __SCR_Cfg_h__Undef
|
|
#endif /* __SCR_Cfg_h__Undef */
|
|
|
|
/*
|
|
**************************************************************************************************
|
|
Dynamic allocation depending on constant and allocated structures :
|
|
|
|
Open sections :
|
|
SCR_CV_ui_Cfg_MaxLenName + 2*SCR_CV_ui_Cfg_MaxLenWord + 2*SCR_CV_ui_Cfg_MaxLenLine
|
|
long*SCR_CV_ui_Cfg_MaxResults + double*SCR_CV_ui_Cfg_MaxResults
|
|
|
|
Open files :
|
|
SCR_CV_ui_Cfg_SizeBufferFile
|
|
long*SCR_CV_ui_Cfg_MaxResults + double*SCR_CV_ui_Cfg_MaxResults
|
|
|
|
Section per file :
|
|
SCR_CV_ui_Cfg_MaxLenName + 2*SCR_CV_ui_Cfg_MaxLenWord + 2*SCR_CV_ui_Cfg_MaxLenLine
|
|
|
|
Link values :
|
|
SCR_C_ui_Link_MaxLenKey
|
|
|
|
**************************************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*=================================================================================================
|
|
* Constants.
|
|
*=================================================================================================
|
|
*/
|
|
|
|
/*
|
|
* The max number of open files at a given time.
|
|
* There can be one more file to be really open a few moment !!!
|
|
* 'V' for Value.
|
|
*/
|
|
#define SCR_CV_ui_Cfg_MaxOpenFiles 50 /* Max open files at the same time */
|
|
#define SCR_CV_ui_Cfg_MaxLenLine 256 /* Max length of a script line */
|
|
|
|
#define SCR_CV_ui_Cfg_MaxLenAtomicName 150 /* Max length of an atomic section name or a directive */
|
|
#define SCR_CV_ui_Cfg_MaxLenName 512 /* Max length of a compound section name */
|
|
#define SCR_CV_ui_Cfg_MaxLenWord 150 /* Max length of a script entry or id part of section name */
|
|
#define SCR_CV_ui_Cfg_MaxLenFormat 32 /* Max length of a string format */
|
|
#define SCR_CV_ui_Cfg_MaxLenParams 256 /* Max length of string of all parameters */
|
|
|
|
#define SCR_CV_ui_Cfg_MaxResults 8 /* Max number of results per context */
|
|
#define SCR_CV_ui_Cfg_MaxNumPars 128 /* Max num of parameters */
|
|
|
|
#define SCR_CV_ui_Cfg_MaxLenVarName 128 /* Max len of a variable name */
|
|
#define SCR_CV_ui_Cfg_MaxLenVarVal 128 /* Max len of a variable value */
|
|
|
|
#if defined(SCR_DM_ProtectedVersion)
|
|
#define SCR_CV_ui_Cfg_SizePageBuf 32 /* Base size of a page buffer */
|
|
#define SCR_CV_ui_Cfg_SizePageBuf2 16 /* Base size / 2 */
|
|
#else
|
|
#define SCR_CV_ui_Cfg_SizePageBuf 1024 /* Base size of a page buffer */
|
|
#define SCR_CV_ui_Cfg_SizePageBuf2 512 /* Base size / 2 */
|
|
#endif
|
|
|
|
#define SCR_CV_ui_Cfg_SizeBufferFile 2048 /* Size of buffer to read from file */
|
|
|
|
#define SCR_CV_ui_Cfg_MaxLenError 1024 /* Max len of an error string */
|
|
#define SCR_CV_ui_Cfg_MaxErrContext 256 /* Max error context */
|
|
|
|
/*
|
|
* Current version of scripts.
|
|
* 'SV' for Script Version.
|
|
*/
|
|
#define SCR_CSV_sz_Cfg_ScriptVersion "5.5.2"
|
|
#define SCR_CSV_ui_Cfg_ScriptVersion 552
|
|
#define SCR_CSV_sz_Cfg_ScriptFileHeader "; SCR 552\n"
|
|
|
|
/*
|
|
* File name of log file.
|
|
* 'L' for Log.
|
|
*/
|
|
#define SCR_CL_sz_Cfg_LogFileName "SCR_Log.log"
|
|
|
|
/*
|
|
* Some special characters.
|
|
* 'C' for Character.
|
|
*/
|
|
#define SCR_CC_c_Cfg_NameSeparator '^'
|
|
#define SCR_CC_sz_Cfg_NameSeparator "^"
|
|
#define SCR_CC_c_Cfg_SectionBegMark '{'
|
|
#define SCR_CC_c_Cfg_SectionEndMark '}'
|
|
#define SCR_CC_c_Cfg_SectionIdMark ':'
|
|
#define SCR_CC_sz_Cfg_SectionIdMark ":"
|
|
#define SCR_CC_c_Cfg_DirectiveMark '$'
|
|
#define SCR_CC_c_Cfg_CommentMark ';'
|
|
#define SCR_CC_c_Cfg_CommentMark1 '#'
|
|
#define SCR_CC_c_Cfg_ParamSeparator ','
|
|
#define SCR_CC_c_Cfg_FormatBegMark '['
|
|
#define SCR_CC_c_Cfg_PostFormatBegMark ';'
|
|
#define SCR_CC_c_Cfg_PostFormatEndMark ';'
|
|
#define SCR_CC_c_Cfg_FormatEndMark ']'
|
|
#define SCR_CC_c_Cfg_ParamBegMark '('
|
|
#define SCR_CC_c_Cfg_ParamEndMark ')'
|
|
#define SCR_CC_c_Cfg_StringMark '"'
|
|
#define SCR_CC_c_Cfg_VarMark '@'
|
|
#define SCR_CC_C_Cfg_NoChar '\0'
|
|
#define SCR_CC_C_Cfg_EOL '\n'
|
|
#define SCR_CC_C_Cfg_EmptyParameter 0x01
|
|
|
|
/*
|
|
* Format specifiers/
|
|
* 'F' for Format.
|
|
*/
|
|
#define SCR_CF_c_Cfg_ScanfSeparator ','
|
|
#define SCR_CF_c_Cfg_FormatArray 'a'
|
|
#define SCR_CF_c_Cfg_FormatArrayByte 'c'
|
|
#define SCR_CF_c_Cfg_FormatArrayShort 'w'
|
|
#define SCR_CF_c_Cfg_FormatArrayLong 'l'
|
|
#define SCR_CF_c_Cfg_FormatArrayInt 'i'
|
|
#define SCR_CF_c_Cfg_FormatArrayFloat 'f'
|
|
#define SCR_CF_c_Cfg_FormatArrayDouble 'd'
|
|
#define SCR_CF_c_Cfg_FormatArrayBoolean 'b'
|
|
#define SCR_CF_c_Cfg_FormatArrayDisEna 'e'
|
|
#define SCR_CF_c_Cfg_FormatArrayReferences 'r'
|
|
#define SCR_CF_c_Cfg_FormatScanf '%'
|
|
|
|
/*
|
|
* Directives.
|
|
* 'D' for Directive.
|
|
*/
|
|
#define SCR_CD_sz_Cfg_Comments "Comments"
|
|
#define SCR_CD_sz_Cfg_EndComments "EndComments"
|
|
#define SCR_CD_sz_Cfg_ForceAnalyse "ForceAnalyse"
|
|
#define SCR_CD_sz_Cfg_EndForceAnalyse "EndForceAnalyse"
|
|
#define SCR_CD_sz_Cfg_NotSaveSection "NotSaveSection"
|
|
#define SCR_CD_sz_Cfg_EndNotSaveSection "EndNotSaveSection"
|
|
#define SCR_CD_sz_Cfg_SetCurrentFileLong "SetCurrentFileLong"
|
|
#define SCR_CD_sz_Cfg_SetCurrentFileDouble "SetCurrentFileDouble"
|
|
#define SCR_CD_sz_Cfg_BreakPoint "BreakPoint"
|
|
#define SCR_CD_sz_Cfg_UpdateLog "UpdateLogFile"
|
|
|
|
/* MP: BINARY */
|
|
|
|
#define SCR_CD_w_Cfg_Comments -1
|
|
#define SCR_CD_w_Cfg_EndComments -2
|
|
#define SCR_CD_w_Cfg_ForceAnalyse -3
|
|
#define SCR_CD_w_Cfg_EndForceAnalyse -4
|
|
#define SCR_CD_w_Cfg_NotSaveSection -5
|
|
#define SCR_CD_w_Cfg_EndNotSaveSection -6
|
|
#define SCR_CD_w_Cfg_SetCurrentFileLong -7
|
|
#define SCR_CD_w_Cfg_SetCurrentFileDouble -8
|
|
#define SCR_CD_w_Cfg_BreakPoint -9
|
|
#define SCR_CD_w_Cfg_UpdateLog -10
|
|
|
|
|
|
#endif /* !__SCR_Cfg_h__Types */
|