reman3/Rayman_X/cpa/public/SCR/SCR_Sect.h

123 lines
4.0 KiB
C

/*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* SCR_Sect.h
* Scripts, Beaudet Christophe
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*
*/
#ifndef __SCR_Sect_h__Types
#define __SCR_Sect_h__Types
#ifndef __Only_Types__
#define __SCR_Sect_h__Undef
#define __Only_Types__
#endif /* !__Only_Types__ */
/*
*=================================================================================================
* Includes.
*=================================================================================================
*/
#include "SCR_Cxt.h"
#include "SCR_Hash.h"
#ifdef __SCR_Sect_h__Undef
#undef __Only_Types__
#undef __SCR_Sect_h__Undef
#endif /* __SCR_Sect_h__Undef */
/*
*=================================================================================================
* Constants.
*=================================================================================================
*/
/*
* To export code.
*/
#undef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else /* CPA_WANTS_IMPORT */
#define CPA_EXPORT
#endif /* CPA_WANTS_IMPORT */
/*
*=================================================================================================
* Types.
*=================================================================================================
*/
/*
* Structure that describes an open section.
*/
typedef struct SCR_tdst_Sect_Open_
{
SCR_tdst_DyAr_Header stHeader; /* Header of element */
SCR_tdst_Cxt_Buffers stBuffers; /* Buffers to describe section name */
SCR_tdst_Cxt_Values stSectionValues; /* Values for that section */
unsigned int uiIndexOfHashValue; /* Index of hash value in table */
unsigned int uiLineInFile; /* Line in file of section header */
SCR_tdx_Hash_Key xHashKey; /* Hash key code */
} SCR_tdst_Sect_Open;
#endif /* !__SCR_Sect_h__Types */
/*
*=================================================================================================
* Global variables.
*=================================================================================================
*/
#if !defined(__SCR_Sect_h__Globals) && !defined(__Only_Types__)
#define __SCR_Sect_h__Globals
CPA_EXPORT extern SCR_tdst_DyAr_Description SCR_g_st_Sect_ArrayOpen;
CPA_EXPORT extern SCR_tda_st_Hash_Table SCR_g_a_st_Sect_HashTableOpen;
#endif /* !__SCR_Sect_h__Globals && !__Only_Types__ */
/*
*=================================================================================================
* Macros.
*=================================================================================================
*/
#if !defined(__SCR_Sect_h__Macros) && !defined(__Only_Types__)
#define __SCR_Sect_h__Macros
/*
* To compute hash key of an open section.
*/
#define SCR_M_Sect_ComputeHashKey(_HashKey, _Name)\
{\
_HashKey = SCR_fn_x_Hash_ComputeHashKeyForString(_Name);\
}
#endif /* !__SCR_Sect_h__Macros && !__Only_Types__ */
/*
*=================================================================================================
* Protos.
*=================================================================================================
*/
#if !defined(__SCR_Sect_h__Protos) && !defined(__Only_Types__)
#define __SCR_Sect_h__Protos
extern void fn_v_Sect_InitModule(void);
extern void fn_v_Sect_CloseModule(void);
extern SCR_tdst_Sect_Open *fnp_st_Sect_AddOpen(SCR_tdst_Cxt_Description *, SCR_tdx_Hash_Key);
extern void fn_v_Sect_DeleteOpen(SCR_tdst_Sect_Open *);
extern SCR_tdst_Sect_Open *fnp_st_Sect_SearchOpen(char *, unsigned int, SCR_tdx_Hash_Key);
extern void fn_v_Sect_ReduceMemory(void);
extern void fn_v_Sect_DeleteWithMemLevel(unsigned char, unsigned char);
#endif /* !__SCR_Sect_h__Protos && !__Only_Types__ */