Topics | Macros | Functions
Tools

Topics

 Benchmark
 
 
 Bezier Curve
 
 
 Convert
 
 
 Counter
 
 
 Copy On Write
 
 
 Cpu
 
 
 Error
 
 
 File
 
 
 Lazy allocator
 
 
 Lock
 
 
 Log
 
 
 Magic
 
 
 Memory Pool
 
 
 Module
 
 
 Prefix
 
 
 Rectangle
 
 
 Safety Checks
 
 
 Simple_XML
 
 
 String
 
 
 Thread
 
 
 Xattrs
 
 

Macros

#define EINA_FLT_EQ(a, b)   (!!(fabsf((float)(a) - (float)(b)) <= FLT_EPSILON))
 Safe comparison of float.
 
#define EINA_FLT_NONZERO(a)   (!!(fpclassify((float)(a)) != FP_ZERO))
 Determines if a float is not zero.
 
#define EINA_DBL_EQ(a, b)   (!!(fabs((double)(a) - (double)(b)) <= DBL_EPSILON))
 Safe comparison of double.
 
#define EINA_DBL_NONZERO(a)   (!!(fpclassify((double)(a)) != FP_ZERO))
 Determines if a double is not zero.
 

Functions

EINA_API const char * eina_environment_home_get (void)
 Returns the content of the environment referred by HOME on this system.
 
EINA_API const char * eina_environment_tmp_get (void)
 Returns the content of the environment referred as TMPDIR on this system.
 
static Eina_Bool eina_dbl_exact (double a, double b)
 Warningless comparison of doubles using ==.
 
static Eina_Bool eina_flt_exact (float a, float b)
 Warningless comparison of floats using ==.
 

Detailed Description

Eina tools aims to help application development, providing ways to make it safer, log errors, manage memory more efficiently and more.

For more information refer to the string example.

Macro Definition Documentation

◆ EINA_FLT_EQ

#define EINA_FLT_EQ ( a,
b )   (!!(fabsf((float)(a) - (float)(b)) <= FLT_EPSILON))

Safe comparison of float.

Parameters
[in]aFirst member to compare
[in]bSecond member to compare
Since
1.19
Returns
true if two floats match

◆ EINA_FLT_NONZERO

#define EINA_FLT_NONZERO ( a)    (!!(fpclassify((float)(a)) != FP_ZERO))

Determines if a float is not zero.

Parameters
[in]aThe float
Returns
true if float is not zero
Since
1.19

◆ EINA_DBL_EQ

#define EINA_DBL_EQ ( a,
b )   (!!(fabs((double)(a) - (double)(b)) <= DBL_EPSILON))

◆ EINA_DBL_NONZERO

#define EINA_DBL_NONZERO ( a)    (!!(fpclassify((double)(a)) != FP_ZERO))

Determines if a double is not zero.

Parameters
[in]aThe double
Returns
true if double is not zero
Since
1.19

Function Documentation

◆ eina_environment_home_get()

EINA_API const char * eina_environment_home_get ( void )

Returns the content of the environment referred by HOME on this system.

Returns
A temporary string to the content referred by HOME on this system.
Note
The result of this call is highly system dependent and you better use it instead of the naive getenv("HOME").
Since
1.15

Referenced by ecore_file_app_exe_get(), elm_theme_list_item_path_get(), elm_theme_name_available_list_new(), elm_theme_user_dir_get(), and ethumb_init().

◆ eina_environment_tmp_get()

EINA_API const char * eina_environment_tmp_get ( void )

Returns the content of the environment referred as TMPDIR on this system.

Returns
A temporary string to the content referred by TMPDIR on this system.
Note
The result of this call is highly system dependent and you better use it instead of the naive getenv("TMPDIR").
Since
1.15

Referenced by ecore_con_local_path_new(), eina_file_mkdtemp(), and eina_file_mkstemp().

◆ eina_dbl_exact()

static Eina_Bool eina_dbl_exact ( double a,
double b )
inlinestatic

Warningless comparison of doubles using ==.

Parameters
[in]aFirst member to compare
[in]bSecond member to compare
Returns
true if two doubles match
Since
1.19

◆ eina_flt_exact()

static Eina_Bool eina_flt_exact ( float a,
float b )
inlinestatic

Warningless comparison of floats using ==.

Parameters
[in]aFirst member to compare
[in]bSecond member to compare
Returns
true if two floats match
Since
1.19