Home

Resume

Blog

Teikitu


/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/*  »Project«   Teikitu Gaming System (TgS) (∂)
    »File«      TgS Common - Base - API.h
    »Author«    Andrew Aye (EMail: mailto:andrew.aye@gmail.com, Web: http://www.andrewaye.com)
    »Version«   4.51 / »GUID« A9981407-3EC9-42AF-8B6F-8BE6DD919615                                                                                                        */
/*   -------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/*  Copyright: © 2002-2017, Andrew Aye.  All Rights Reserved.
    This software is free for non-commercial use.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
      following conditions are met:
        Redistribution of source code must retain this copyright notice, this list of conditions and the following disclaimers.
        Redistribution in binary form must reproduce this copyright notice, this list of conditions and the following disclaimers in the documentation and other materials
          provided with the distribution.
    The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
    The intellectual property rights of the algorithms used reside with Andrew Aye.
    You may not use this software, in whole or in part, in support of any commercial product without the express written consent of the author.
    There is no warranty or other guarantee of fitness of this software for any purpose. It is provided solely "as is".                                                   */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
#if !defined(TGS_COMMON_BASE_API_H)
#define TGS_COMMON_BASE_API_H
#pragma once


/* == Common ============================================================================================================================================================ */

/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */
/*  Public Functions                                                                                                                                                      */
/* -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. */

TgINLINE TgUINTPTR                          tgCM_FLR_ALGN_PW2_UPTR( C_TgUINTPTR, C_TgUINTPTR );
TgINLINE TgUINTPTR                          tgCM_CEL_ALGN_PW2_UPTR( C_TgUINTPTR, C_TgUINTPTR );

                                            /* Init Mersenne Twister Random Generator (Default for TGS) */
                                            /* 1: Seed */
TgEXTN TgVOID                               tgCM_Init_Random_MT(TgUINT32);

                                            /* Init Mersenne Twister Random Generator (Default for TGS) */
                                            /* 1: Seed List */
                                            /* 2: Number of Seeds */
TgEXTN TgVOID                               tgCM_Init_Random_MT__Key_List( PU_TgUINT32, TgUINT32 );

                                            /* Request a random number for the Mersenne Twister Random Generator [0,UINTMAX] */
TgEXTN TgUINT32                             tgCM_RAND_MT_U32( TgVOID );

                                            /* Random Normal Distribution - Return a value on a normal (Gaussian) distribution with the give mean and standard deviation. */
                                            /* 1: Mean */
                                            /* 2: Standard Deviation */
TgEXTN TgFLOAT32                            tgCM_RAND_NRM_F32( C_TgFLOAT32, C_TgFLOAT32 );

/*                                          SWP:            Swap the values of the two parameters */
/*                                          SGN:            Sign of parameter value */
/*                                          MAX:            Max value of the two parameters */
/*                                          MIN:            Min value of the two parameters */
/*                                          CLP:            Clamp value between the min and max */
/*                                          CLP_MIN:        Limit value to min and above */
/*                                          CLP_MAX:        Limit value to max and below */
/*                                          FLR_ALGN_PW2:   Align value down where alignment is a power of two */
/*                                          CEL_ALGN_PW2:   Align value up where alignment is a power of two */
/*                                          PRV_PW2:        Find the nearest power of two less or equal to parameter */
/*                                          NXT_PW2:        Find the nearest power of two greater or equal to parameter */
/*                                          IS_PW2:         Boolean test to determine if value is a power of two */
/*                                          RND:            Random number ranging from [MIN,MAX] or [0,1) */

TgINLINE TgVOID                             tgCM_SWP_U08( PCU_TgUINT08, PCU_TgUINT08 );
TgINLINE TgUINT08                           tgCM_SGN_U08( C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_MAX_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_MIN_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_CLP_U08( C_TgUINT08, C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_CLP_MIN_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_CLP_MAX_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_FLR_ALGN_PW2_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_CEL_ALGN_PW2_U08( C_TgUINT08, C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_PRV_PW2_U08( C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_NXT_PW2_U08( C_TgUINT08 );
TgINLINE TgBOOL                             tgCM_IS_PW2_U08( C_TgUINT08 );
TgINLINE TgUINT08                           tgCM_RAND_U08( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_U16( PCU_TgUINT16, PCU_TgUINT16 );
TgINLINE TgUINT16                           tgCM_SGN_U16( C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_MAX_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_MIN_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_CLP_U16( C_TgUINT16, C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_CLP_MIN_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_CLP_MAX_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_FLR_ALGN_PW2_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_CEL_ALGN_PW2_U16( C_TgUINT16, C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_PRV_PW2_U16( C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_NXT_PW2_U16( C_TgUINT16 );
TgINLINE TgBOOL                             tgCM_IS_PW2_U16( C_TgUINT16 );
TgINLINE TgUINT16                           tgCM_RAND_U16( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_U32( PCU_TgUINT32, PCU_TgUINT32 );
TgINLINE TgUINT32                           tgCM_SGN_U32( C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_MAX_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_MIN_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_CLP_U32( C_TgUINT32, C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_CLP_MIN_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_CLP_MAX_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_FLR_ALGN_PW2_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_CEL_ALGN_PW2_U32( C_TgUINT32, C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_PRV_PW2_U32( C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_NXT_PW2_U32( C_TgUINT32 );
TgINLINE TgBOOL                             tgCM_IS_PW2_U32( C_TgUINT32 );
TgINLINE TgUINT32                           tgCM_RAND_U32( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_U64( PCU_TgUINT64, PCU_TgUINT64 );
TgINLINE TgUINT64                           tgCM_SGN_U64( C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_MAX_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_MIN_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_CLP_U64( C_TgUINT64, C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_CLP_MIN_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_CLP_MAX_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_FLR_ALGN_PW2_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_CEL_ALGN_PW2_U64( C_TgUINT64, C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_PRV_PW2_U64( C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_NXT_PW2_U64( C_TgUINT64 );
TgINLINE TgBOOL                             tgCM_IS_PW2_U64( C_TgUINT64 );
TgINLINE TgUINT64                           tgCM_RAND_U64( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_S08( PCU_TgSINT08, PCU_TgSINT08 );
TgINLINE TgSINT08                           tgCM_SGN_S08( C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_MAX_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_MIN_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_CLP_S08( C_TgSINT08, C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_CLP_MIN_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_CLP_MAX_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_FLR_ALGN_PW2_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_CEL_ALGN_PW2_S08( C_TgSINT08, C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_PRV_PW2_S08( C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_NXT_PW2_S08( C_TgSINT08 );
TgINLINE TgBOOL                             tgCM_IS_PW2_S08( C_TgSINT08 );
TgINLINE TgSINT08                           tgCM_RAND_S08( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_S16( PCU_TgSINT16, PCU_TgSINT16 );
TgINLINE TgSINT16                           tgCM_SGN_S16( C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_MAX_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_MIN_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_CLP_S16( C_TgSINT16, C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_CLP_MIN_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_CLP_MAX_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_FLR_ALGN_PW2_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_CEL_ALGN_PW2_S16( C_TgSINT16, C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_PRV_PW2_S16( C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_NXT_PW2_S16( C_TgSINT16 );
TgINLINE TgBOOL                             tgCM_IS_PW2_S16( C_TgSINT16 );
TgINLINE TgSINT16                           tgCM_RAND_S16( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_S32( PCU_TgSINT32, PCU_TgSINT32 );
TgINLINE TgSINT32                           tgCM_SGN_S32( C_TgSINT32 );
TgINLINE TgSINT32                           tgCM_MAX_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Max */
TgINLINE TgSINT32                           tgCM_MIN_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Min */
TgINLINE TgSINT32                           tgCM_CLP_S32( C_TgSINT32, C_TgSINT32, C_TgSINT32 ); /*« Value, Min, Max */
TgINLINE TgSINT32                           tgCM_CLP_MIN_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Min */
TgINLINE TgSINT32                           tgCM_CLP_MAX_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Max */
TgINLINE TgSINT32                           tgCM_FLR_ALGN_PW2_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Alignment */
TgINLINE TgSINT32                           tgCM_CEL_ALGN_PW2_S32( C_TgSINT32, C_TgSINT32 ); /*« Value, Alignment */
TgINLINE TgSINT32                           tgCM_PRV_PW2_S32( C_TgSINT32 );
TgINLINE TgSINT32                           tgCM_NXT_PW2_S32( C_TgSINT32 );
TgINLINE TgBOOL                             tgCM_IS_PW2_S32( C_TgSINT32 );
TgINLINE TgSINT32                           tgCM_RAND_S32( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_S64( PCU_TgSINT64, PCU_TgSINT64 );
TgINLINE TgSINT64                           tgCM_SGN_S64( C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_MAX_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_MIN_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_CLP_S64( C_TgSINT64, C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_CLP_MIN_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_CLP_MAX_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_FLR_ALGN_PW2_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_CEL_ALGN_PW2_S64( C_TgSINT64, C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_PRV_PW2_S64( C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_NXT_PW2_S64( C_TgSINT64 );
TgINLINE TgBOOL                             tgCM_IS_PW2_S64( C_TgSINT64 );
TgINLINE TgSINT64                           tgCM_RAND_S64( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_F32( PCU_TgFLOAT32, PCU_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_SGN_F32( C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_MAX_F32( C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_MIN_F32( C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_CLP_F32( C_TgFLOAT32, C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_CLP_MIN_F32( C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_CLP_MAX_F32( C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgBOOL                             tgCM_NR0_F32( C_TgFLOAT32 );
TgINLINE TgBOOL                             tgCM_NR1_F32( C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_CLP_FRC_F32( C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_LRP_F32( C_TgFLOAT32, C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgBOOL                             tgCM_EQ_F32( C_TgFLOAT32, C_TgFLOAT32, C_TgFLOAT32 );
TgINLINE TgFLOAT32                          tgCM_RAND_F32( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_F64( PCU_TgFLOAT64, PCU_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_SGN_F64( C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_MAX_F64( C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_MIN_F64( C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_CLP_F64( C_TgFLOAT64, C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_CLP_MIN_F64( C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_CLP_MAX_F64( C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgBOOL                             tgCM_NR0_F64( C_TgFLOAT64 );
TgINLINE TgBOOL                             tgCM_NR1_F64( C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_CLP_FRC_F64( C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_LRP_F64( C_TgFLOAT64, C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgBOOL                             tgCM_EQ_F64( C_TgFLOAT64, C_TgFLOAT64, C_TgFLOAT64 );
TgINLINE TgFLOAT64                          tgCM_RAND_F64( TgVOID );

TgINLINE TgVOID                             tgCM_SWP_UXX( PCU_TgUINTXX, PCU_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_SGN_UXX( C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_MAX_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_MIN_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_CLP_UXX( C_TgUINTXX, C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_CLP_MIN_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_CLP_MAX_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_FLR_ALGN_PW2_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_CEL_ALGN_PW2_UXX( C_TgUINTXX, C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_PRV_PW2_UXX( C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_NXT_PW2_UXX( C_TgUINTXX );
TgINLINE TgBOOL                             tgCM_IS_PW2_UXX( C_TgUINTXX );
TgINLINE TgUINTXX                           tgCM_RAND_UXX( TgVOID );


/* ---- String ------------------------------------------------------------------------------------------------------------------------------------------------------------ */

                                            /* 1: Pointer to the string destination to contain the transcribed number */
                                            /* 2: Size of the destination buffer */
                                            /* 3: Number to be converted */
TgEXTN P_TgCHAR                             tgSZ_From_U08( PCU_TgCHAR, C_TgSIZE, C_TgUINT08 );
TgEXTN P_TgCHAR                             tgSZ_From_U16( PCU_TgCHAR, C_TgSIZE, C_TgUINT16 );
TgEXTN P_TgCHAR                             tgSZ_From_U32( PCU_TgCHAR, C_TgSIZE, C_TgUINT32 );
TgEXTN P_TgCHAR                             tgSZ_From_U64( PCU_TgCHAR, C_TgSIZE, C_TgUINT64 );
TgEXTN P_TgCHAR                             tgSZ_From_S08( PCU_TgCHAR, C_TgSIZE, C_TgSINT08 );
TgEXTN P_TgCHAR                             tgSZ_From_S16( PCU_TgCHAR, C_TgSIZE, C_TgSINT16 );
TgEXTN P_TgCHAR                             tgSZ_From_S32( PCU_TgCHAR, C_TgSIZE, C_TgSINT32 );
TgEXTN P_TgCHAR                             tgSZ_From_S64( PCU_TgCHAR, C_TgSIZE, C_TgSINT64 );
TgEXTN P_TgCHAR                             tgSZ_From_F32( PCU_TgCHAR, C_TgSIZE, C_TgFLOAT32 );
TgEXTN P_TgCHAR                             tgSZ_From_F64( PCU_TgCHAR, C_TgSIZE, C_TgFLOAT64 );
TgEXTN P_TgCHAR                             tgSZ_With_Grouping_From_U32( PCU_TgCHAR, C_TgSIZE, C_TgUINT32 );
TgEXTN P_TgCHAR                             tgSZ_With_Grouping_From_U64( PCU_TgCHAR, C_TgSIZE, C_TgUINT64 );
TgEXTN P_TgCHAR                             tgSZ_With_Grouping_From_S32( PCU_TgCHAR, C_TgSIZE, C_TgSINT32 );
TgEXTN P_TgCHAR                             tgSZ_With_Grouping_From_S64( PCU_TgCHAR, C_TgSIZE, C_TgSINT64 );

                                            /* 1: Pointer to the string containing the number to be converted */
TgEXTN TgBOOL                               tgSZ_To_Bool( CPCU_TgCHAR );
TgEXTN TgUINT08                             tgSZ_To_U08( CPCU_TgCHAR );
TgEXTN TgUINT16                             tgSZ_To_U16( CPCU_TgCHAR );
TgEXTN TgUINT32                             tgSZ_To_U32( CPCU_TgCHAR );
TgEXTN TgUINT64                             tgSZ_To_U64( CPCU_TgCHAR );
TgEXTN TgSINT08                             tgSZ_To_S08( CPCU_TgCHAR );
TgEXTN TgSINT16                             tgSZ_To_S16( CPCU_TgCHAR );
TgEXTN TgSINT32                             tgSZ_To_S32( CPCU_TgCHAR );
TgEXTN TgSINT64                             tgSZ_To_S64( CPCU_TgCHAR );
TgEXTN TgFLOAT32                            tgSZ_To_F32( CPCU_TgCHAR );
TgEXTN TgFLOAT64                            tgSZ_To_F64( CPCU_TgCHAR );

                                            /* 1: Pointer to the string to be processed */
TgEXTN TgSIZE                               tgSZ_Length( CPCU_TgCHAR );
TgEXTN TgUINTXX                             tgSZ_Hash( CPCU_TgCHAR );
TgEXTN TgUINTXX                             tgSZ_Hash_File_Name( CPCU_TgCHAR );
TgEXTN TgUINTXX                             tgSZ_Hash_Directory( CPCU_TgCHAR );

                                            /* 1: First comparison argument */
                                            /* 2: Second comparison argument */
TgEXTN TgSINT32                             tgSZ_Compare( CPC_TgCHAR, CPC_TgCHAR );
TgEXTN TgSINT32                             tgSZ_Compare_NoCase( CPC_TgCHAR, CPC_TgCHAR );

                                            /* Returns comparison value for the end of string 1 to string 2 */
                                            /* 1: First comparison argument */
                                            /* 2: Second comparison argument */
TgEXTN TgSINT32                             tgSZ_CompareEnd( CPC_TgCHAR, CPC_TgCHAR );
TgEXTN TgSINT32                             tgSZ_CompareEnd_NoCase( CPC_TgCHAR, CPC_TgCHAR );

                                            /* 1: First comparison argument */
                                            /* 2: Second comparison argument */
                                            /* 3: Maximum number of characters to be compared */
TgEXTN TgSINT32                             tgSZ_CompareN( CPC_TgCHAR, CPC_TgCHAR, C_TgSIZE );
TgEXTN TgSINT32                             tgSZ_CompareN_NoCase( CPC_TgCHAR, CPC_TgCHAR, C_TgSIZE );

                                            /* 1: String optionally containing printf markers */
                                            /* 2: Variable argument list */
TgEXTN TgSINT32                             tgSZ_LengthVF( CPC_TgCHAR, va_list );

                                            /* 1: Character to be processed */
TgEXTN TgBOOL                               tgCHAR_Is_Print( C_TgCHAR );
TgEXTN TgBOOL                               tgCHAR_Is_Space( C_TgCHAR );
TgEXTN TgCHAR                               tgCHAR_To_Upper( C_TgCHAR );
TgEXTN TgCHAR                               tgCHAR_To_Lower( C_TgCHAR );

                                            /* Convert string to upper case, return string length. */
                                            /* 1: Pointer to the string to be processed */
                                            /* 2: Number of characters to process (not including null-term) */
TgEXTN P_TgCHAR                             tgSZ_To_Upper( PCU_TgCHAR, C_TgSIZE );

                                            /* Convert string to lower case, return string length. */
                                            /* 1: Pointer to the string to be processed */
                                            /* 2: Number of characters to process (not including null-term) */
TgEXTN P_TgCHAR                             tgSZ_To_Lower( PCU_TgCHAR, C_TgSIZE );

                                            /* 1: Pointer to the string destination */
                                            /* 2: Character count of the destination buffer (including null-term) */
                                            /* 3: Source string for processing */
TgEXTN P_TgCHAR                             tgSZ_Copy( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR );
TgEXTN P_TgCHAR                             tgSZ_Append( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR );

                                            /* 1: Pointer to the string destination */
                                            /* 2: Character count of the destination buffer (including null-term) */
                                            /* 3: Source string for processing */
                                            /* 4: Number of characters to be copied (not including null-term) */
TgEXTN P_TgCHAR                             tgSZ_CopyN( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, C_TgSIZE );
TgEXTN P_TgCHAR                             tgSZ_AppendN( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, C_TgSIZE );

                                            /* 1: Pointer to the string destination */
                                            /* 2: Character count of the destination buffer (including null-term) */
                                            /* 3: Source string for processing */
                                            /* 4: Variable argument list */
TgEXTN P_TgCHAR                             tgSZ_PrintVF( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, va_list );
TgEXTN P_TgCHAR                             tgSZ_AppendVF( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, va_list );

                                            /* 1: Pointer to the string destination */
                                            /* 2: Character count of the destination buffer (including null-term) */
                                            /* 3: Source string for processing */
                                            /* 4: Optional list of arguments */
TgEXTN P_TgCHAR                             tgSZ_PrintF( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, ... );
TgEXTN P_TgCHAR                             tgSZ_AppendF( PC_TgCHAR, C_TgSIZE, CPC_TgCHAR, ... );

                                            /* 1: Pointer to the string destination */
                                            /* 2: List of deliminators */
                                            /* 3: Token context */
TgEXTN P_TgCHAR                             tgSZ_Token( PC_TgCHAR, CPC_TgCHAR, PP_TgCHAR );

                                            /* 1: String to be searched */
                                            /* 2: Character to search */
TgEXTN CP_TgCHAR                            tgSZ_StrChr( CPC_TgCHAR, C_TgCHAR );

                                            /* 1: String to be searched */
                                            /* 2: Sub-string to search */
TgEXTN CP_TgCHAR                            tgSZ_StrStr( CPC_TgCHAR, CPC_TgCHAR );

                                            /* Parse the source string taking into account c-style comments, and quotations */
                                            /* 1: Pointer to the source string  (will be modified) */
                                            /* 2: Array of token pointers */
                                            /* 3: Max count of token pointers */
                                            /* R: Number of tokens */
TgEXTN TgSINT32                             tgSZ_Token_List( PC_TgCHAR, PP_TgCHAR, C_TgSINT32 );

#if !defined(TgCOMPILE_FORCE_ANSI) && defined(TgCOMPILE_PLATFORM_WIN)
                                            /* 1: Pointer to the string destination */
                                            /* 2: Character count of the destination buffer (including null-term) */
                                            /* 3: Source string for processing */
                                            /* 4: Number of characters to be copied (not including null-term) */
TgEXTN TgBOOL                               tgSZ_AnsiToWideChar( PC_TgWIDECHAR, C_TgSIZE, CPC_TgANSICHAR, C_TgSIZE );
TgEXTN TgBOOL                               tgSZ_AnsiToAnsiChar( PC_TgANSICHAR, C_TgSIZE, CPC_TgANSICHAR, C_TgSIZE );
TgEXTN TgBOOL                               tgSZ_WideToAnsiChar( PC_TgANSICHAR, C_TgSIZE, CPC_TgWIDECHAR, C_TgSIZE );
TgEXTN TgBOOL                               tgSZ_WideToWideChar( PC_TgWIDECHAR, C_TgSIZE, CPC_TgWIDECHAR, C_TgSIZE );
#if defined(TgCOMPILE_WIDE_CHAR)
#define tgSZ_ToWideChar                     tgSZ_WideToWideChar
#define tgSZ_ToAnsiChar                     tgSZ_WideToAnsiChar
#define tgSZ_FromWideChar                   tgSZ_WideToWideChar
#define tgSZ_FromAnsiChar                   tgSZ_AnsiToWideChar
#else
#define tgSZ_ToWideChar                     tgSZ_AnsiToWideChar
#define tgSZ_ToAnsiChar                     tgSZ_AnsiToAnsiChar
#define tgSZ_FromWideChar                   tgSZ_WideToAnsiChar
#define tgSZ_FromAnsiChar                   tgSZ_AnsiToAnsiChar
#endif
/*# !defined(TgCOMPILE_FORCE_ANSI) && defined(TgCOMPILE_PLATFORM_WIN) */
#endif

/* ====================================================================================================================================================================== */
#endif