forked from enlightenment/efl
parent
38aac01b6a
commit
5d1a9f4e0d
|
@ -76,7 +76,7 @@ typedef struct _Eet_Version
|
|||
int revision; /** < svn revision (0 if a proper rlease or the svn revsion number Eet is built from) */
|
||||
} Eet_Version;
|
||||
|
||||
EAPI extern Eet_Version * eet_version;
|
||||
EAPI extern Eet_Version *eet_version;
|
||||
|
||||
/**
|
||||
* @defgroup Eet_Group Top level functions
|
||||
|
@ -272,7 +272,7 @@ EAPI Eet_File * eet_open(const char * file,
|
|||
* @since 1.1.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eet_File * eet_memopen_read(const void * data,
|
||||
EAPI Eet_File * eet_memopen_read(const void *data,
|
||||
size_t size);
|
||||
|
||||
/**
|
||||
|
@ -283,7 +283,7 @@ EAPI Eet_File * eet_memopen_read(const void * data,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eet_File_Mode eet_mode_get(Eet_File * ef);
|
||||
EAPI Eet_File_Mode eet_mode_get(Eet_File *ef);
|
||||
|
||||
/**
|
||||
* Close an eet file handle and flush and writes pending.
|
||||
|
@ -298,7 +298,7 @@ EAPI Eet_File_Mode eet_mode_get(Eet_File * ef);
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eet_Error eet_close(Eet_File * ef);
|
||||
EAPI Eet_Error eet_close(Eet_File *ef);
|
||||
|
||||
/**
|
||||
* Sync content of an eet file handle, flushing pending writes.
|
||||
|
@ -312,7 +312,7 @@ EAPI Eet_Error eet_close(Eet_File * ef);
|
|||
* @since 1.2.4
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eet_Error eet_sync(Eet_File * ef);
|
||||
EAPI Eet_Error eet_sync(Eet_File *ef);
|
||||
|
||||
/**
|
||||
* Return a handle to the shared string dictionary of the Eet file
|
||||
|
@ -330,7 +330,7 @@ EAPI Eet_Error eet_sync(Eet_File * ef);
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eet_Dictionary * eet_dictionary_get(Eet_File * ef);
|
||||
EAPI Eet_Dictionary * eet_dictionary_get(Eet_File *ef);
|
||||
|
||||
/**
|
||||
* Check if a given string comes from a given dictionary
|
||||
|
@ -346,7 +346,7 @@ EAPI Eet_Dictionary * eet_dictionary_get(Eet_File * ef);
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI int eet_dictionary_string_check(Eet_Dictionary * ed,
|
||||
EAPI int eet_dictionary_string_check(Eet_Dictionary *ed,
|
||||
const char * string);
|
||||
|
||||
/**
|
||||
|
@ -372,7 +372,7 @@ EAPI int eet_dictionary_string_check(Eet_Dictionary * ed,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI void * eet_read(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret);
|
||||
|
||||
/**
|
||||
|
@ -396,7 +396,7 @@ EAPI void * eet_read(Eet_File * ef,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI const void * eet_read_direct(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret);
|
||||
|
||||
/**
|
||||
|
@ -428,8 +428,8 @@ EAPI const void * eet_read_direct(Eet_File * ef,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI int eet_write(Eet_File * ef,
|
||||
const char * name,
|
||||
const void * data,
|
||||
const char *name,
|
||||
const void *data,
|
||||
int size,
|
||||
int compress);
|
||||
|
||||
|
@ -452,7 +452,7 @@ EAPI int eet_write(Eet_File * ef,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI int eet_delete(Eet_File * ef,
|
||||
const char * name);
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* Alias a specific section to another one. Destination may exist or not,
|
||||
|
@ -469,8 +469,8 @@ EAPI int eet_delete(Eet_File * ef,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI Eina_Bool eet_alias(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * destination,
|
||||
const char *name,
|
||||
const char *destination,
|
||||
int compress);
|
||||
|
||||
/**
|
||||
|
@ -504,7 +504,7 @@ EAPI Eina_Bool eet_alias(Eet_File * ef,
|
|||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI char ** eet_list(Eet_File * ef,
|
||||
const char * glob,
|
||||
const char *glob,
|
||||
int * count_ret);
|
||||
|
||||
/**
|
||||
|
@ -516,7 +516,7 @@ EAPI char ** eet_list(Eet_File * ef,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_File_Group
|
||||
*/
|
||||
EAPI int eet_num_entries(Eet_File * ef);
|
||||
EAPI int eet_num_entries(Eet_File *ef);
|
||||
|
||||
/**
|
||||
* @defgroup Eet_File_Cipher_Group Eet File Ciphered Main Functions
|
||||
|
@ -553,9 +553,9 @@ EAPI int eet_num_entries(Eet_File * ef);
|
|||
* @ingroup Eet_File_Cipher_Group
|
||||
*/
|
||||
EAPI void * eet_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret,
|
||||
const char * cipher_key);
|
||||
const char *cipher_key);
|
||||
|
||||
/**
|
||||
* Write a specified entry to an eet file handle using a cipher.
|
||||
|
@ -587,11 +587,11 @@ EAPI void * eet_read_cipher(Eet_File * ef,
|
|||
* @ingroup Eet_File_Cipher_Group
|
||||
*/
|
||||
EAPI int eet_write_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const void * data,
|
||||
const char *name,
|
||||
const void *data,
|
||||
int size,
|
||||
int compress,
|
||||
const char * cipher_key);
|
||||
const char *cipher_key);
|
||||
|
||||
/**
|
||||
* @defgroup Eet_File_Image_Group Image Store and Load
|
||||
|
@ -638,8 +638,8 @@ EAPI int eet_write_cipher(Eet_File * ef,
|
|||
*/
|
||||
EAPI int eet_data_image_header_read(Eet_File * ef,
|
||||
const char * name,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -685,8 +685,8 @@ EAPI int eet_data_image_header_read(Eet_File * ef,
|
|||
*/
|
||||
EAPI void * eet_data_image_read(Eet_File * ef,
|
||||
const char * name,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -736,7 +736,7 @@ EAPI int eet_data_image_read_to_surface(Eet_File * ef,
|
|||
const char * name,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -828,8 +828,8 @@ EAPI int eet_data_image_write(Eet_File * ef,
|
|||
*/
|
||||
EAPI int eet_data_image_header_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -875,8 +875,8 @@ EAPI int eet_data_image_header_decode(const void * data,
|
|||
*/
|
||||
EAPI void * eet_data_image_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -926,7 +926,7 @@ EAPI int eet_data_image_decode_to_surface(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1029,8 +1029,8 @@ EAPI void * eet_data_image_encode(const void * data,
|
|||
EAPI int eet_data_image_header_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -1078,8 +1078,8 @@ EAPI int eet_data_image_header_read_cipher(Eet_File * ef,
|
|||
EAPI void * eet_data_image_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -1131,7 +1131,7 @@ EAPI int eet_data_image_read_to_surface_cipher(Eet_File * ef,
|
|||
const char * cipher_key,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1227,8 +1227,8 @@ EAPI int eet_data_image_write_cipher(Eet_File * ef,
|
|||
EAPI int eet_data_image_header_decode_cipher(const void * data,
|
||||
const char * cipher_key,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -1276,8 +1276,8 @@ EAPI int eet_data_image_header_decode_cipher(const void * data,
|
|||
EAPI void * eet_data_image_decode_cipher(const void * data,
|
||||
const char * cipher_key,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * compress,
|
||||
int * quality,
|
||||
|
@ -1329,7 +1329,7 @@ EAPI int eet_data_image_decode_to_surface_cipher(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1419,7 +1419,7 @@ typedef struct _Eet_Key Eet_Key;
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
typedef int (* Eet_Key_Password_Callback)(char * buffer, int size, int rwflag, void * data);
|
||||
typedef int (* Eet_Key_Password_Callback)(char *buffer, int size, int rwflag, void *data);
|
||||
|
||||
/**
|
||||
* Create an Eet_Key needed for signing an eet file.
|
||||
|
@ -1452,7 +1452,7 @@ EAPI Eet_Key * eet_identity_open(const char * certificate_fil
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI void eet_identity_close(Eet_Key * key);
|
||||
EAPI void eet_identity_close(Eet_Key *key);
|
||||
|
||||
/**
|
||||
* Set a key to sign a file
|
||||
|
@ -1465,7 +1465,7 @@ EAPI void eet_identity_close(Eet_Key * key);
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI Eet_Error eet_identity_set(Eet_File * ef,
|
||||
EAPI Eet_Error eet_identity_set(Eet_File *ef,
|
||||
Eet_Key * key);
|
||||
|
||||
/**
|
||||
|
@ -1477,7 +1477,7 @@ EAPI Eet_Error eet_identity_set(Eet_File * ef,
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI void eet_identity_print(Eet_Key * key,
|
||||
EAPI void eet_identity_print(Eet_Key *key,
|
||||
FILE * out);
|
||||
|
||||
/**
|
||||
|
@ -1491,7 +1491,7 @@ EAPI void eet_identity_print(Eet_Key * key,
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI const void * eet_identity_x509(Eet_File * ef,
|
||||
EAPI const void * eet_identity_x509(Eet_File *ef,
|
||||
int * der_length);
|
||||
|
||||
/**
|
||||
|
@ -1504,7 +1504,7 @@ EAPI const void * eet_identity_x509(Eet_File * ef,
|
|||
*
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI const void * eet_identity_signature(Eet_File * ef,
|
||||
EAPI const void * eet_identity_signature(Eet_File *ef,
|
||||
int * signature_length);
|
||||
|
||||
/**
|
||||
|
@ -1519,7 +1519,7 @@ EAPI const void * eet_identity_signature(Eet_File * ef,
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI const void * eet_identity_sha1(Eet_File * ef,
|
||||
EAPI const void * eet_identity_sha1(Eet_File *ef,
|
||||
int * sha1_length);
|
||||
|
||||
/**
|
||||
|
@ -1532,7 +1532,7 @@ EAPI const void * eet_identity_sha1(Eet_File * ef,
|
|||
* @since 1.2.0
|
||||
* @ingroup Eet_Cipher_Group
|
||||
*/
|
||||
EAPI void eet_identity_certificate_print(const unsigned char * certificate,
|
||||
EAPI void eet_identity_certificate_print(const unsigned char *certificate,
|
||||
int der_length,
|
||||
FILE * out);
|
||||
|
||||
|
@ -1759,25 +1759,25 @@ typedef struct _Eet_Data_Descriptor_Class Eet_Data_Descriptor_Class;
|
|||
struct _Eet_Data_Descriptor_Class
|
||||
{
|
||||
int version; /**< ABI version as #EET_DATA_DESCRIPTOR_CLASS_VERSION */
|
||||
const char * name; /**< Name of data type to be serialized */
|
||||
const char *name; /**< Name of data type to be serialized */
|
||||
int size; /**< Size in bytes of data type to be serialized */
|
||||
struct
|
||||
{
|
||||
void * (* mem_alloc)(size_t size); /**< how to allocate memory (usually malloc()) */
|
||||
void (* mem_free)(void * mem); /**< how to free memory (usually free()) */
|
||||
char * (* str_alloc)(const char * str); /**< how to allocate a string */
|
||||
void (* str_free)(const char * str); /**< how to free a string */
|
||||
void * (* list_next)(void * l); /**< how to iterate to the next element of a list. Receives and should return the list node. */
|
||||
void * (* list_append)(void * l, void * d); /**< how to append data @p d to list which head node is @p l */
|
||||
void * (* list_data)(void * l); /**< retrieves the data from node @p l */
|
||||
void * (* list_free)(void * l); /**< free all the nodes from the list which head node is @p l */
|
||||
void (* hash_foreach)(void * h, int (* func)(void * h, const char * k, void * dt, void * fdt), void * fdt); /**< iterates over all elements in the hash @p h in no specific order */
|
||||
void * (* hash_add)(void * h, const char * k, void * d); /**< add a new data @p d as key @p k in hash @p h */
|
||||
void (* hash_free)(void * h); /**< free all entries from the hash @p h */
|
||||
char * (* str_direct_alloc)(const char * str); /**< how to allocate a string directly from file backed/mmaped region pointed by @p str */
|
||||
void (* str_direct_free)(const char * str); /**< how to free a string returned by str_direct_alloc */
|
||||
const char *(* type_get)(const void * data, Eina_Bool * unknow); /**< convert any kind of data type to a name that define an Eet_Data_Element. */
|
||||
Eina_Bool (* type_set)(const char * type, void * data, Eina_Bool unknow); /**< set the type at a particular adress */
|
||||
void * (*mem_alloc)(size_t size); /**< how to allocate memory (usually malloc()) */
|
||||
void (*mem_free)(void *mem); /**< how to free memory (usually free()) */
|
||||
char * (*str_alloc)(const char *str); /**< how to allocate a string */
|
||||
void (*str_free)(const char *str); /**< how to free a string */
|
||||
void * (*list_next)(void *l); /**< how to iterate to the next element of a list. Receives and should return the list node. */
|
||||
void * (*list_append)(void *l, void *d); /**< how to append data @p d to list which head node is @p l */
|
||||
void * (*list_data)(void *l); /**< retrieves the data from node @p l */
|
||||
void * (*list_free)(void *l); /**< free all the nodes from the list which head node is @p l */
|
||||
void (*hash_foreach)(void *h, int (*func)(void *h, const char *k, void *dt, void *fdt), void *fdt); /**< iterates over all elements in the hash @p h in no specific order */
|
||||
void * (*hash_add)(void *h, const char *k, void *d); /**< add a new data @p d as key @p k in hash @p h */
|
||||
void (*hash_free)(void *h); /**< free all entries from the hash @p h */
|
||||
char * (*str_direct_alloc)(const char *str); /**< how to allocate a string directly from file backed/mmaped region pointed by @p str */
|
||||
void (*str_direct_free)(const char *str); /**< how to free a string returned by str_direct_alloc */
|
||||
const char *(*type_get)(const void *data, Eina_Bool *unknow); /**< convert any kind of data type to a name that define an Eet_Data_Element. */
|
||||
Eina_Bool (*type_set)(const char *type, void *data, Eina_Bool unknow); /**< set the type at a particular adress */
|
||||
} func;
|
||||
};
|
||||
|
||||
|
@ -1823,26 +1823,26 @@ struct _Eet_Data_Descriptor_Class
|
|||
* @deprecated use eet_data_descriptor_stream_new() or
|
||||
* eet_data_descriptor_file_new()
|
||||
*/
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor_new(const char * name,
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor_new(const char *name,
|
||||
int size,
|
||||
void *(*func_list_next)(void * l),
|
||||
void *(*func_list_append)(void * l, void * d),
|
||||
void *(*func_list_data)(void * l),
|
||||
void *(*func_list_free)(void * l),
|
||||
void (* func_hash_foreach)(void * h, int (* func)(void * h,
|
||||
const char * k,
|
||||
void *(*func_list_next)(void *l),
|
||||
void *(*func_list_append)(void *l, void *d),
|
||||
void *(*func_list_data)(void *l),
|
||||
void *(*func_list_free)(void *l),
|
||||
void (*func_hash_foreach)(void *h, int (*func)(void * h,
|
||||
const char *k,
|
||||
void * dt,
|
||||
void * fdt), void * fdt),
|
||||
void *(*func_hash_add)(void * h, const char * k, void * d),
|
||||
void (* func_hash_free)(void * h));
|
||||
void * fdt), void *fdt),
|
||||
void *(*func_hash_add)(void *h, const char *k, void *d),
|
||||
void (*func_hash_free)(void *h));
|
||||
/*
|
||||
* FIXME:
|
||||
*
|
||||
* moving to this api from the old above. this will break things when the
|
||||
* move happens - but be warned
|
||||
*/
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor2_new(const Eet_Data_Descriptor_Class * eddc);
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor3_new(const Eet_Data_Descriptor_Class * eddc);
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc);
|
||||
EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc);
|
||||
|
||||
/**
|
||||
* This function creates a new data descriptore and returns a handle to the
|
||||
|
@ -1868,7 +1868,7 @@ EINA_DEPRECATED EAPI Eet_Data_Descriptor * eet_data_descriptor3_new(const Eet
|
|||
* @since 1.2.3
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI Eet_Data_Descriptor * eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class * eddc);
|
||||
EAPI Eet_Data_Descriptor * eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc);
|
||||
|
||||
/**
|
||||
* This function creates a new data descriptore and returns a handle to the
|
||||
|
@ -1897,7 +1897,7 @@ EAPI Eet_Data_Descriptor * eet_data_descriptor_stream_new(con
|
|||
* @since 1.2.3
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI Eet_Data_Descriptor * eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class * eddc);
|
||||
EAPI Eet_Data_Descriptor * eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc);
|
||||
|
||||
/**
|
||||
* This function is an helper that set all the parameter of an
|
||||
|
@ -1913,7 +1913,7 @@ EAPI Eet_Data_Descriptor * eet_data_descriptor_file_new(const
|
|||
* @since 1.2.3
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI Eina_Bool eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc,
|
||||
EAPI Eina_Bool eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
|
||||
const char * name,
|
||||
int size);
|
||||
|
||||
|
@ -1947,7 +1947,7 @@ EAPI Eina_Bool eet_eina_stream_data_descriptor_cl
|
|||
* @since 1.2.3
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI Eina_Bool eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc,
|
||||
EAPI Eina_Bool eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc,
|
||||
const char * name,
|
||||
int size);
|
||||
|
||||
|
@ -1978,7 +1978,7 @@ EAPI Eina_Bool eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void eet_data_descriptor_free(Eet_Data_Descriptor * edd);
|
||||
EAPI void eet_data_descriptor_free(Eet_Data_Descriptor *edd);
|
||||
|
||||
/**
|
||||
* This function is an internal used by macros.
|
||||
|
@ -2006,7 +2006,7 @@ EAPI void eet_data_descriptor_free(Eet_Data_Descriptor * edd);
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor * edd,
|
||||
EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor *edd,
|
||||
const char * name,
|
||||
int type,
|
||||
int group_type,
|
||||
|
@ -2014,7 +2014,7 @@ EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor * edd,
|
|||
/* int count_offset, */
|
||||
int count,
|
||||
const char * counter_name,
|
||||
Eet_Data_Descriptor * subtype);
|
||||
Eet_Data_Descriptor *subtype);
|
||||
|
||||
/**
|
||||
* Read a data structure from an eet file and decodes it.
|
||||
|
@ -2044,7 +2044,7 @@ EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor * edd,
|
|||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void * eet_data_read(Eet_File * ef,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const char * name);
|
||||
|
||||
/**
|
||||
|
@ -2065,7 +2065,7 @@ EAPI void * eet_data_read(Eet_File * ef,
|
|||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI int eet_data_write(Eet_File * ef,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const char * name,
|
||||
const void * data,
|
||||
int compress);
|
||||
|
@ -2117,10 +2117,10 @@ EAPI int eet_data_write(Eet_File * ef,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI int eet_data_text_dump(const void * data_in,
|
||||
EAPI int eet_data_text_dump(const void *data_in,
|
||||
int size_in,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata);
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata);
|
||||
|
||||
/**
|
||||
* Take an ascii encoding from eet_data_text_dump() and re-encode in binary.
|
||||
|
@ -2141,7 +2141,7 @@ EAPI int eet_data_text_dump(const void * data_in,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void * eet_data_text_undump(const char * text,
|
||||
EAPI void * eet_data_text_undump(const char *text,
|
||||
int textlen,
|
||||
int * size_ret);
|
||||
|
||||
|
@ -2168,10 +2168,10 @@ EAPI void * eet_data_text_undump(const char * text,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI int eet_data_dump(Eet_File * ef,
|
||||
const char * name,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata);
|
||||
EAPI int eet_data_dump(Eet_File *ef,
|
||||
const char *name,
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata);
|
||||
|
||||
/**
|
||||
* Take an ascii encoding from eet_data_dump() and re-encode in binary.
|
||||
|
@ -2196,8 +2196,8 @@ EAPI int eet_data_dump(Eet_File * ef,
|
|||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI int eet_data_undump(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * text,
|
||||
const char *name,
|
||||
const char *text,
|
||||
int textlen,
|
||||
int compress);
|
||||
|
||||
|
@ -2228,7 +2228,7 @@ EAPI int eet_data_undump(Eet_File * ef,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void * eet_data_descriptor_decode(Eet_Data_Descriptor * edd,
|
||||
EAPI void * eet_data_descriptor_decode(Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
int size_in);
|
||||
|
||||
|
@ -2261,7 +2261,7 @@ EAPI void * eet_data_descriptor_decode(Eet_Data_Descriptor * edd,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Group
|
||||
*/
|
||||
EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor * edd,
|
||||
EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
int * size_ret);
|
||||
|
||||
|
@ -2581,7 +2581,7 @@ EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor * edd,
|
|||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI void * eet_data_read_cipher(Eet_File * ef,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const char * name,
|
||||
const char * cipher_key);
|
||||
|
||||
|
@ -2605,7 +2605,7 @@ EAPI void * eet_data_read_cipher(Eet_File * ef,
|
|||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI int eet_data_write_cipher(Eet_File * ef,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
const void * data,
|
||||
|
@ -2659,11 +2659,11 @@ EAPI int eet_data_write_cipher(Eet_File * ef,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI int eet_data_text_dump_cipher(const void * data_in,
|
||||
const char * cipher_key,
|
||||
EAPI int eet_data_text_dump_cipher(const void *data_in,
|
||||
const char *cipher_key,
|
||||
int size_in,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata);
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata);
|
||||
|
||||
/**
|
||||
* Take an ascii encoding from eet_data_text_dump() and re-encode
|
||||
|
@ -2686,8 +2686,8 @@ EAPI int eet_data_text_dump_cipher(const void * data_in,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI void * eet_data_text_undump_cipher(const char * text,
|
||||
const char * cipher_key,
|
||||
EAPI void * eet_data_text_undump_cipher(const char *text,
|
||||
const char *cipher_key,
|
||||
int textlen,
|
||||
int * size_ret);
|
||||
|
||||
|
@ -2716,11 +2716,11 @@ EAPI void * eet_data_text_undump_cipher(const char * text,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI int eet_data_dump_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata);
|
||||
EAPI int eet_data_dump_cipher(Eet_File *ef,
|
||||
const char *name,
|
||||
const char *cipher_key,
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata);
|
||||
|
||||
/**
|
||||
* Take an ascii encoding from eet_data_dump() and re-encode in
|
||||
|
@ -2747,9 +2747,9 @@ EAPI int eet_data_dump_cipher(Eet_File * ef,
|
|||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI int eet_data_undump_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
const char * text,
|
||||
const char *name,
|
||||
const char *cipher_key,
|
||||
const char *text,
|
||||
int textlen,
|
||||
int compress);
|
||||
|
||||
|
@ -2782,7 +2782,7 @@ EAPI int eet_data_undump_cipher(Eet_File * ef,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI void * eet_data_descriptor_decode_cipher(Eet_Data_Descriptor * edd,
|
||||
EAPI void * eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
const char * cipher_key,
|
||||
int size_in);
|
||||
|
@ -2818,7 +2818,7 @@ EAPI void * eet_data_descriptor_decode_cipher(Eet_Data_Descriptor * edd,
|
|||
* @since 1.0.0
|
||||
* @ingroup Eet_Data_Cipher_Group
|
||||
*/
|
||||
EAPI void * eet_data_descriptor_encode_cipher(Eet_Data_Descriptor * edd,
|
||||
EAPI void * eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
const char * cipher_key,
|
||||
int * size_ret);
|
||||
|
@ -2873,42 +2873,42 @@ struct _Eet_Node_Data
|
|||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_char_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_char_new(const char *name,
|
||||
char c);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_short_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_short_new(const char *name,
|
||||
short s);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_int_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_int_new(const char *name,
|
||||
int i);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_long_long_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_long_long_new(const char *name,
|
||||
long long l);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_float_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_float_new(const char *name,
|
||||
float f);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_double_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_double_new(const char *name,
|
||||
double d);
|
||||
|
||||
/**
|
||||
|
@ -2943,34 +2943,34 @@ EAPI Eet_Node * eet_node_unsigned_long_long_new(const char * name,
|
|||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_string_new(const char * name,
|
||||
const char * str);
|
||||
EAPI Eet_Node * eet_node_string_new(const char *name,
|
||||
const char *str);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_inlined_string_new(const char * name,
|
||||
const char * str);
|
||||
EAPI Eet_Node * eet_node_inlined_string_new(const char *name,
|
||||
const char *str);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_null_new(const char * name);
|
||||
EAPI Eet_Node * eet_node_null_new(const char *name);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_list_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_list_new(const char *name,
|
||||
Eina_List * nodes);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_array_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_array_new(const char *name,
|
||||
int count,
|
||||
Eina_List * nodes);
|
||||
|
||||
|
@ -2978,29 +2978,29 @@ EAPI Eet_Node * eet_node_array_new(const char * name,
|
|||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_var_array_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_var_array_new(const char *name,
|
||||
Eina_List * nodes);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_hash_new(const char * name,
|
||||
const char * key,
|
||||
EAPI Eet_Node * eet_node_hash_new(const char *name,
|
||||
const char *key,
|
||||
Eet_Node * node);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_struct_new(const char * name,
|
||||
EAPI Eet_Node * eet_node_struct_new(const char *name,
|
||||
Eina_List * nodes);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_node_struct_child_new(const char * parent,
|
||||
EAPI Eet_Node * eet_node_struct_child_new(const char *parent,
|
||||
Eet_Node * child);
|
||||
|
||||
/**
|
||||
|
@ -3008,7 +3008,7 @@ EAPI Eet_Node * eet_node_struct_child_new(const char * parent,
|
|||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void eet_node_list_append(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char *name,
|
||||
Eet_Node * child);
|
||||
|
||||
/**
|
||||
|
@ -3016,7 +3016,7 @@ EAPI void eet_node_list_append(Eet_Node * parent,
|
|||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void eet_node_struct_append(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char *name,
|
||||
Eet_Node * child);
|
||||
|
||||
/**
|
||||
|
@ -3024,39 +3024,39 @@ EAPI void eet_node_struct_append(Eet_Node * parent,
|
|||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void eet_node_hash_add(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char * key,
|
||||
const char *name,
|
||||
const char *key,
|
||||
Eet_Node * child);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void eet_node_dump(Eet_Node * n,
|
||||
EAPI void eet_node_dump(Eet_Node *n,
|
||||
int dumplevel,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata);
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void eet_node_del(Eet_Node * n);
|
||||
EAPI void eet_node_del(Eet_Node *n);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI void * eet_data_node_encode_cipher(Eet_Node * node,
|
||||
const char * cipher_key,
|
||||
const char *cipher_key,
|
||||
int * size_ret);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_data_node_decode_cipher(const void * data_in,
|
||||
const char * cipher_key,
|
||||
EAPI Eet_Node * eet_data_node_decode_cipher(const void *data_in,
|
||||
const char *cipher_key,
|
||||
int size_in);
|
||||
|
||||
/**
|
||||
|
@ -3064,16 +3064,16 @@ EAPI Eet_Node * eet_data_node_decode_cipher(const void * data_in,
|
|||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI Eet_Node * eet_data_node_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key);
|
||||
const char *name,
|
||||
const char *cipher_key);
|
||||
|
||||
/**
|
||||
* TODO FIX ME
|
||||
* @ingroup Eet_Node_Group
|
||||
*/
|
||||
EAPI int eet_data_node_write_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
const char *name,
|
||||
const char *cipher_key,
|
||||
Eet_Node * node,
|
||||
int compress);
|
||||
|
||||
|
@ -3091,20 +3091,20 @@ typedef struct _Eet_Node_Walk Eet_Node_Walk;
|
|||
*/
|
||||
struct _Eet_Node_Walk
|
||||
{
|
||||
void *(* struct_alloc)(const char * type, void * user_data);
|
||||
void (* struct_add)(void * parent, const char * name, void * child, void * user_data);
|
||||
void *(* array)(Eina_Bool variable, const char * name, int count, void * user_data);
|
||||
void (* insert)(void * array, int index, void * child, void * user_data);
|
||||
void *(* list)(const char * name, void * user_data);
|
||||
void (* append)(void * list, void * child, void * user_data);
|
||||
void *(* hash)(void * parent, const char * name, const char * key, void * value, void * user_data);
|
||||
void *(* simple)(int type, Eet_Node_Data * data, void * user_data);
|
||||
void *(*struct_alloc)(const char *type, void *user_data);
|
||||
void (*struct_add)(void *parent, const char *name, void *child, void *user_data);
|
||||
void *(*array)(Eina_Bool variable, const char *name, int count, void *user_data);
|
||||
void (*insert)(void *array, int index, void *child, void *user_data);
|
||||
void *(*list)(const char *name, void *user_data);
|
||||
void (*append)(void *list, void *child, void *user_data);
|
||||
void *(*hash)(void *parent, const char *name, const char *key, void *value, void *user_data);
|
||||
void *(*simple)(int type, Eet_Node_Data *data, void *user_data);
|
||||
};
|
||||
|
||||
EAPI void * eet_node_walk(void * parent,
|
||||
const char * name,
|
||||
Eet_Node * root,
|
||||
Eet_Node_Walk * cb,
|
||||
Eet_Node_Walk *cb,
|
||||
void * user_data);
|
||||
|
||||
/*******/
|
||||
|
@ -3130,7 +3130,7 @@ typedef struct _Eet_Connection Eet_Connection;
|
|||
*
|
||||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
typedef Eina_Bool Eet_Read_Cb (const void * eet_data, size_t size, void * user_data);
|
||||
typedef Eina_Bool Eet_Read_Cb (const void *eet_data, size_t size, void *user_data);
|
||||
|
||||
/**
|
||||
* @typedef Eet_Write_Cb
|
||||
|
@ -3138,7 +3138,7 @@ typedef Eina_Bool Eet_Read_Cb (const void * eet_data, size_t size
|
|||
*
|
||||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
typedef Eina_Bool Eet_Write_Cb (const void * data, size_t size, void * user_data);
|
||||
typedef Eina_Bool Eet_Write_Cb (const void *data, size_t size, void *user_data);
|
||||
|
||||
/**
|
||||
* Instanciate a new connection to track.
|
||||
|
@ -3153,7 +3153,7 @@ typedef Eina_Bool Eet_Write_Cb (const void * data, size_t size, v
|
|||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
EAPI Eet_Connection * eet_connection_new(Eet_Read_Cb * eet_read_cb,
|
||||
Eet_Write_Cb * eet_write_cb,
|
||||
Eet_Write_Cb *eet_write_cb,
|
||||
const void * user_data);
|
||||
|
||||
/**
|
||||
|
@ -3170,7 +3170,7 @@ EAPI Eet_Connection * eet_connection_new(Eet_Read_Cb * eet_read_cb,
|
|||
* @since 1.2.4
|
||||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
EAPI int eet_connection_received(Eet_Connection * conn,
|
||||
EAPI int eet_connection_received(Eet_Connection *conn,
|
||||
const void * data,
|
||||
size_t size);
|
||||
|
||||
|
@ -3192,7 +3192,7 @@ EAPI int eet_connection_received(Eet_Connection * conn,
|
|||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
EAPI Eina_Bool eet_connection_send(Eet_Connection * conn,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
const char * cipher_key);
|
||||
|
||||
|
@ -3212,7 +3212,7 @@ EAPI Eina_Bool eet_connection_send(Eet_Connection * conn,
|
|||
* @since 1.2.4
|
||||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
EAPI Eina_Bool eet_connection_node_send(Eet_Connection * conn,
|
||||
EAPI Eina_Bool eet_connection_node_send(Eet_Connection *conn,
|
||||
Eet_Node * node,
|
||||
const char * cipher_key);
|
||||
|
||||
|
@ -3225,7 +3225,7 @@ EAPI Eina_Bool eet_connection_node_send(Eet_Connection * conn,
|
|||
* @since 1.2.4
|
||||
* @ingroup Eet_Connection_Group
|
||||
*/
|
||||
EAPI void * eet_connection_close(Eet_Connection * conn,
|
||||
EAPI void * eet_connection_close(Eet_Connection *conn,
|
||||
Eina_Bool * on_going);
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -38,7 +38,7 @@ struct _Eet_String
|
|||
};
|
||||
struct _Eet_Dictionary
|
||||
{
|
||||
Eet_String * all;
|
||||
Eet_String *all;
|
||||
|
||||
int size;
|
||||
int offset;
|
||||
|
@ -48,8 +48,8 @@ struct _Eet_Dictionary
|
|||
int count;
|
||||
int total;
|
||||
|
||||
const char * start;
|
||||
const char * end;
|
||||
const char *start;
|
||||
const char *end;
|
||||
};
|
||||
|
||||
struct _Eet_Node
|
||||
|
@ -100,26 +100,26 @@ extern int _eet_log_dom_global;
|
|||
#define CRIT(...) EINA_LOG_DOM_CRIT(_eet_log_dom_global, __VA_ARGS__)
|
||||
|
||||
Eet_Dictionary * eet_dictionary_add(void);
|
||||
void eet_dictionary_free(Eet_Dictionary * ed);
|
||||
int eet_dictionary_string_add(Eet_Dictionary * ed,
|
||||
void eet_dictionary_free(Eet_Dictionary *ed);
|
||||
int eet_dictionary_string_add(Eet_Dictionary *ed,
|
||||
const char * string);
|
||||
int eet_dictionary_string_get_size(const Eet_Dictionary * ed,
|
||||
int eet_dictionary_string_get_size(const Eet_Dictionary *ed,
|
||||
int index);
|
||||
const char * eet_dictionary_string_get_char(const Eet_Dictionary * ed,
|
||||
const char * eet_dictionary_string_get_char(const Eet_Dictionary *ed,
|
||||
int index);
|
||||
Eina_Bool eet_dictionary_string_get_float(const Eet_Dictionary * ed,
|
||||
Eina_Bool eet_dictionary_string_get_float(const Eet_Dictionary *ed,
|
||||
int index,
|
||||
float * result);
|
||||
Eina_Bool eet_dictionary_string_get_double(const Eet_Dictionary * ed,
|
||||
Eina_Bool eet_dictionary_string_get_double(const Eet_Dictionary *ed,
|
||||
int index,
|
||||
double * result);
|
||||
Eina_Bool eet_dictionary_string_get_fp(const Eet_Dictionary * ed,
|
||||
Eina_Bool eet_dictionary_string_get_fp(const Eet_Dictionary *ed,
|
||||
int index,
|
||||
Eina_F32p32 * result);
|
||||
int eet_dictionary_string_get_hash(const Eet_Dictionary * ed,
|
||||
int eet_dictionary_string_get_hash(const Eet_Dictionary *ed,
|
||||
int index);
|
||||
|
||||
int _eet_hash_gen(const char * key, int hash_size);
|
||||
int _eet_hash_gen(const char *key, int hash_size);
|
||||
|
||||
const void * eet_identity_check(const void * data_base,
|
||||
unsigned int data_length,
|
||||
|
@ -128,7 +128,7 @@ const void * eet_identity_check(const void * data_base,
|
|||
const void * signature_base,
|
||||
unsigned int signature_length,
|
||||
const void ** raw_signature_base,
|
||||
unsigned int * raw_signature_length,
|
||||
unsigned int *raw_signature_length,
|
||||
int * x509_length);
|
||||
void * eet_identity_compute_sha1(const void * data_base,
|
||||
unsigned int data_length,
|
||||
|
@ -138,22 +138,22 @@ Eet_Error eet_cipher(const void * data,
|
|||
const char * key,
|
||||
unsigned int length,
|
||||
void ** result,
|
||||
unsigned int * result_length);
|
||||
unsigned int *result_length);
|
||||
Eet_Error eet_decipher(const void * data,
|
||||
unsigned int size,
|
||||
const char * key,
|
||||
unsigned int length,
|
||||
void ** result,
|
||||
unsigned int * result_length);
|
||||
unsigned int *result_length);
|
||||
Eet_Error eet_identity_sign(FILE * fp,
|
||||
Eet_Key * key);
|
||||
void eet_identity_unref(Eet_Key * key);
|
||||
void eet_identity_ref(Eet_Key * key);
|
||||
Eet_Key *key);
|
||||
void eet_identity_unref(Eet_Key *key);
|
||||
void eet_identity_ref(Eet_Key *key);
|
||||
|
||||
void eet_node_shutdown(void);
|
||||
int eet_node_init(void);
|
||||
Eet_Node * eet_node_new(void);
|
||||
void eet_node_free(Eet_Node * node);
|
||||
void eet_node_free(Eet_Node *node);
|
||||
|
||||
#ifndef PATH_MAX
|
||||
# define PATH_MAX 4096
|
||||
|
|
|
@ -84,11 +84,11 @@ static Eet_Error eet_hmac_sha1(const void * key,
|
|||
size_t key_len,
|
||||
const void * data,
|
||||
size_t data_len,
|
||||
unsigned char * res);
|
||||
unsigned char *res);
|
||||
# endif /* ifdef HAVE_GNUTLS */
|
||||
static Eet_Error eet_pbkdf2_sha1(const char * key,
|
||||
int key_len,
|
||||
const unsigned char * salt,
|
||||
const unsigned char *salt,
|
||||
unsigned int salt_len,
|
||||
int iter,
|
||||
unsigned char * res,
|
||||
|
@ -116,13 +116,13 @@ eet_identity_open(const char * certificate_file,
|
|||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
/* Signature declarations */
|
||||
Eet_Key * key = NULL;
|
||||
FILE * fp = NULL;
|
||||
Eet_Key *key = NULL;
|
||||
FILE *fp = NULL;
|
||||
# ifdef HAVE_GNUTLS
|
||||
/* Gnutls private declarations */
|
||||
int fd = -1;
|
||||
struct stat st;
|
||||
void * data = NULL;
|
||||
void *data = NULL;
|
||||
gnutls_datum_t load_file = { NULL, 0 };
|
||||
char pass[1024];
|
||||
|
||||
|
@ -232,8 +232,8 @@ on_error:
|
|||
|
||||
# else /* ifdef HAVE_GNUTLS */
|
||||
/* Openssl private declarations */
|
||||
EVP_PKEY * pkey = NULL;
|
||||
X509 * cert = NULL;
|
||||
EVP_PKEY *pkey = NULL;
|
||||
X509 *cert = NULL;
|
||||
|
||||
/* Load the X509 certificate in memory. */
|
||||
fp = fopen(certificate_file, "r");
|
||||
|
@ -284,7 +284,7 @@ on_error:
|
|||
} /* eet_identity_open */
|
||||
|
||||
EAPI void
|
||||
eet_identity_close(Eet_Key * key)
|
||||
eet_identity_close(Eet_Key *key)
|
||||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
if (!key || (key->references > 0))
|
||||
|
@ -302,12 +302,12 @@ eet_identity_close(Eet_Key * key)
|
|||
} /* eet_identity_close */
|
||||
|
||||
EAPI void
|
||||
eet_identity_print(Eet_Key * key,
|
||||
eet_identity_print(Eet_Key *key,
|
||||
FILE * out)
|
||||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
# ifdef HAVE_GNUTLS
|
||||
const char * names[6] = {
|
||||
const char *names[6] = {
|
||||
"Modulus",
|
||||
"Public exponent",
|
||||
"Private exponent",
|
||||
|
@ -319,7 +319,7 @@ eet_identity_print(Eet_Key * key,
|
|||
gnutls_datum_t data = { NULL, 0 };
|
||||
gnutls_datum_t rsa_raw[6];
|
||||
size_t size = 128;
|
||||
char * res = NULL;
|
||||
char *res = NULL;
|
||||
char buf[33];
|
||||
unsigned int i, j;
|
||||
|
||||
|
@ -387,9 +387,9 @@ on_error:
|
|||
|
||||
return;
|
||||
# else /* ifdef HAVE_GNUTLS */
|
||||
RSA * rsa;
|
||||
DSA * dsa;
|
||||
DH * dh;
|
||||
RSA *rsa;
|
||||
DSA *dsa;
|
||||
DH *dh;
|
||||
|
||||
if (!key)
|
||||
return;
|
||||
|
@ -424,7 +424,7 @@ on_error:
|
|||
} /* eet_identity_print */
|
||||
|
||||
void
|
||||
eet_identity_ref(Eet_Key * key)
|
||||
eet_identity_ref(Eet_Key *key)
|
||||
{
|
||||
if (key == NULL)
|
||||
return;
|
||||
|
@ -433,7 +433,7 @@ eet_identity_ref(Eet_Key * key)
|
|||
} /* eet_identity_ref */
|
||||
|
||||
void
|
||||
eet_identity_unref(Eet_Key * key)
|
||||
eet_identity_unref(Eet_Key *key)
|
||||
{
|
||||
if (key == NULL)
|
||||
return;
|
||||
|
@ -447,7 +447,7 @@ eet_identity_compute_sha1(const void * data_base,
|
|||
unsigned int data_length,
|
||||
int * sha1_length)
|
||||
{
|
||||
void * result;
|
||||
void *result;
|
||||
|
||||
#ifdef HAVE_SIGNATURE
|
||||
# ifdef HAVE_GNUTLS
|
||||
|
@ -482,16 +482,16 @@ eet_identity_compute_sha1(const void * data_base,
|
|||
|
||||
Eet_Error
|
||||
eet_identity_sign(FILE * fp,
|
||||
Eet_Key * key)
|
||||
Eet_Key *key)
|
||||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
Eet_Error err = EET_ERROR_NONE;
|
||||
struct stat st_buf;
|
||||
void * data;
|
||||
void *data;
|
||||
int fd;
|
||||
int head[3];
|
||||
unsigned char * sign = NULL;
|
||||
unsigned char * cert = NULL;
|
||||
unsigned char *sign = NULL;
|
||||
unsigned char *cert = NULL;
|
||||
# ifdef HAVE_GNUTLS
|
||||
gnutls_datum_t datum = { NULL, 0 };
|
||||
size_t sign_len = 0;
|
||||
|
@ -654,13 +654,13 @@ eet_identity_check(const void * data_base,
|
|||
const void * signature_base,
|
||||
unsigned int signature_length,
|
||||
const void ** raw_signature_base,
|
||||
unsigned int * raw_signature_length,
|
||||
unsigned int *raw_signature_length,
|
||||
int * x509_length)
|
||||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
const int * header = signature_base;
|
||||
const unsigned char * sign;
|
||||
const unsigned char * cert_der;
|
||||
const int *header = signature_base;
|
||||
const unsigned char *sign;
|
||||
const unsigned char *cert_der;
|
||||
int sign_len;
|
||||
int cert_len;
|
||||
int magic;
|
||||
|
@ -690,7 +690,7 @@ eet_identity_check(const void * data_base,
|
|||
gnutls_datum_t datum;
|
||||
gnutls_datum_t signature;
|
||||
# if EET_USE_NEW_GNUTLS_API
|
||||
unsigned char * hash;
|
||||
unsigned char *hash;
|
||||
gcry_md_hd_t md;
|
||||
int err;
|
||||
# endif /* if EET_USE_NEW_GNUTLS_API */
|
||||
|
@ -763,9 +763,9 @@ eet_identity_check(const void * data_base,
|
|||
gnutls_x509_crt_deinit(cert);
|
||||
|
||||
# else /* ifdef HAVE_GNUTLS */
|
||||
const unsigned char * tmp;
|
||||
EVP_PKEY * pkey;
|
||||
X509 * x509;
|
||||
const unsigned char *tmp;
|
||||
EVP_PKEY *pkey;
|
||||
X509 *x509;
|
||||
EVP_MD_CTX md_ctx;
|
||||
int err;
|
||||
|
||||
|
@ -818,7 +818,7 @@ eet_identity_check(const void * data_base,
|
|||
} /* eet_identity_check */
|
||||
|
||||
EAPI void
|
||||
eet_identity_certificate_print(const unsigned char * certificate,
|
||||
eet_identity_certificate_print(const unsigned char *certificate,
|
||||
int der_length,
|
||||
FILE * out)
|
||||
{
|
||||
|
@ -857,8 +857,8 @@ on_error:
|
|||
|
||||
gnutls_x509_crt_deinit(cert);
|
||||
# else /* ifdef HAVE_GNUTLS */
|
||||
const unsigned char * tmp;
|
||||
X509 * x509;
|
||||
const unsigned char *tmp;
|
||||
X509 *x509;
|
||||
|
||||
/* Strange but d2i_X509 seems to put 0 all over the place. */
|
||||
tmp = alloca(der_length);
|
||||
|
@ -886,11 +886,11 @@ eet_cipher(const void * data,
|
|||
const char * key,
|
||||
unsigned int length,
|
||||
void ** result,
|
||||
unsigned int * result_length)
|
||||
unsigned int *result_length)
|
||||
{
|
||||
#ifdef HAVE_CIPHER
|
||||
/* Cipher declarations */
|
||||
unsigned int * ret = NULL;
|
||||
unsigned int *ret = NULL;
|
||||
unsigned char iv[MAX_IV_LEN];
|
||||
unsigned char ik[MAX_KEY_LEN];
|
||||
unsigned char key_material[MAX_IV_LEN + MAX_KEY_LEN];
|
||||
|
@ -905,7 +905,7 @@ eet_cipher(const void * data,
|
|||
# else /* ifdef HAVE_GNUTLS */
|
||||
/* Openssl declarations*/
|
||||
EVP_CIPHER_CTX ctx;
|
||||
unsigned int * buffer;
|
||||
unsigned int *buffer;
|
||||
int tmp_len;
|
||||
# endif /* ifdef HAVE_GNUTLS */
|
||||
|
||||
|
@ -1063,11 +1063,11 @@ eet_decipher(const void * data,
|
|||
const char * key,
|
||||
unsigned int length,
|
||||
void ** result,
|
||||
unsigned int * result_length)
|
||||
unsigned int *result_length)
|
||||
{
|
||||
#ifdef HAVE_CIPHER
|
||||
const unsigned int * over = data;
|
||||
unsigned int * ret = NULL;
|
||||
const unsigned int *over = data;
|
||||
unsigned int *ret = NULL;
|
||||
unsigned char ik[MAX_KEY_LEN];
|
||||
unsigned char iv[MAX_IV_LEN];
|
||||
unsigned char key_material[MAX_KEY_LEN + MAX_IV_LEN];
|
||||
|
@ -1215,11 +1215,11 @@ eet_hmac_sha1(const void * key,
|
|||
size_t key_len,
|
||||
const void * data,
|
||||
size_t data_len,
|
||||
unsigned char * res)
|
||||
unsigned char *res)
|
||||
{
|
||||
size_t hlen = gcry_md_get_algo_dlen (GCRY_MD_SHA1);
|
||||
gcry_md_hd_t mdh;
|
||||
unsigned char * hash;
|
||||
unsigned char *hash;
|
||||
gpg_error_t err;
|
||||
|
||||
err = gcry_md_open(&mdh, GCRY_MD_SHA1, GCRY_MD_FLAG_HMAC);
|
||||
|
@ -1254,7 +1254,7 @@ eet_hmac_sha1(const void * key,
|
|||
static Eet_Error
|
||||
eet_pbkdf2_sha1(const char * key,
|
||||
int key_len,
|
||||
const unsigned char * salt,
|
||||
const unsigned char *salt,
|
||||
unsigned int salt_len,
|
||||
int iter,
|
||||
unsigned char * res,
|
||||
|
@ -1262,8 +1262,8 @@ eet_pbkdf2_sha1(const char * key,
|
|||
{
|
||||
unsigned char digest[20];
|
||||
unsigned char tab[4];
|
||||
unsigned char * p = res;
|
||||
unsigned char * buf;
|
||||
unsigned char *p = res;
|
||||
unsigned char *buf;
|
||||
unsigned long i;
|
||||
int digest_len = 20;
|
||||
int len = res_len;
|
||||
|
|
|
@ -51,7 +51,7 @@ struct _Eet_Message
|
|||
struct _Eet_Connection
|
||||
{
|
||||
Eet_Read_Cb * eet_read_cb;
|
||||
Eet_Write_Cb * eet_write_cb;
|
||||
Eet_Write_Cb *eet_write_cb;
|
||||
void * user_data;
|
||||
|
||||
size_t allocated;
|
||||
|
@ -63,10 +63,10 @@ struct _Eet_Connection
|
|||
|
||||
EAPI Eet_Connection *
|
||||
eet_connection_new(Eet_Read_Cb * eet_read_cb,
|
||||
Eet_Write_Cb * eet_write_cb,
|
||||
Eet_Write_Cb *eet_write_cb,
|
||||
const void * user_data)
|
||||
{
|
||||
Eet_Connection * conn;
|
||||
Eet_Connection *conn;
|
||||
|
||||
if (!eet_read_cb || !eet_write_cb)
|
||||
return NULL;
|
||||
|
@ -83,7 +83,7 @@ eet_connection_new(Eet_Read_Cb * eet_read_cb,
|
|||
} /* eet_connection_new */
|
||||
|
||||
EAPI int
|
||||
eet_connection_received(Eet_Connection * conn,
|
||||
eet_connection_received(Eet_Connection *conn,
|
||||
const void * data,
|
||||
size_t size)
|
||||
{
|
||||
|
@ -95,7 +95,7 @@ eet_connection_received(Eet_Connection * conn,
|
|||
|
||||
if (conn->size == 0)
|
||||
{
|
||||
const Eet_Message * msg;
|
||||
const Eet_Message *msg;
|
||||
size_t packet_size;
|
||||
|
||||
if (size < sizeof (Eet_Message))
|
||||
|
@ -129,7 +129,7 @@ eet_connection_received(Eet_Connection * conn,
|
|||
conn->size = packet_size;
|
||||
if (conn->allocated < conn->size)
|
||||
{
|
||||
void * tmp;
|
||||
void *tmp;
|
||||
|
||||
tmp = realloc(conn->buffer, conn->size);
|
||||
if (!tmp)
|
||||
|
@ -172,11 +172,11 @@ eet_connection_received(Eet_Connection * conn,
|
|||
} /* eet_connection_received */
|
||||
|
||||
static Eina_Bool
|
||||
_eet_connection_raw_send(Eet_Connection * conn,
|
||||
_eet_connection_raw_send(Eet_Connection *conn,
|
||||
void * data,
|
||||
int data_size)
|
||||
{
|
||||
Eet_Message * message;
|
||||
Eet_Message *message;
|
||||
|
||||
/* Message should never be above 64K */
|
||||
if (data_size > 64 * 1024)
|
||||
|
@ -196,11 +196,11 @@ _eet_connection_raw_send(Eet_Connection * conn,
|
|||
|
||||
EAPI Eina_Bool
|
||||
eet_connection_send(Eet_Connection * conn,
|
||||
Eet_Data_Descriptor * edd,
|
||||
Eet_Data_Descriptor *edd,
|
||||
const void * data_in,
|
||||
const char * cipher_key)
|
||||
{
|
||||
void * flat_data;
|
||||
void *flat_data;
|
||||
int data_size;
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
|
||||
|
@ -219,11 +219,11 @@ eet_connection_send(Eet_Connection * conn,
|
|||
} /* eet_connection_send */
|
||||
|
||||
EAPI Eina_Bool
|
||||
eet_connection_node_send(Eet_Connection * conn,
|
||||
eet_connection_node_send(Eet_Connection *conn,
|
||||
Eet_Node * node,
|
||||
const char * cipher_key)
|
||||
{
|
||||
void * data;
|
||||
void *data;
|
||||
int data_size;
|
||||
Eina_Bool ret = EINA_FALSE;
|
||||
|
||||
|
@ -239,10 +239,10 @@ eet_connection_node_send(Eet_Connection * conn,
|
|||
} /* eet_connection_node_send */
|
||||
|
||||
EAPI void *
|
||||
eet_connection_close(Eet_Connection * conn,
|
||||
eet_connection_close(Eet_Connection *conn,
|
||||
Eina_Bool * on_going)
|
||||
{
|
||||
void * user_data;
|
||||
void *user_data;
|
||||
|
||||
if (!conn)
|
||||
return NULL;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -18,7 +18,7 @@
|
|||
Eet_Dictionary *
|
||||
eet_dictionary_add(void)
|
||||
{
|
||||
Eet_Dictionary * new;
|
||||
Eet_Dictionary *new;
|
||||
|
||||
new = calloc(1, sizeof (Eet_Dictionary));
|
||||
if (!new)
|
||||
|
@ -30,7 +30,7 @@ eet_dictionary_add(void)
|
|||
} /* eet_dictionary_add */
|
||||
|
||||
void
|
||||
eet_dictionary_free(Eet_Dictionary * ed)
|
||||
eet_dictionary_free(Eet_Dictionary *ed)
|
||||
{
|
||||
if (ed)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ eet_dictionary_free(Eet_Dictionary * ed)
|
|||
} /* eet_dictionary_free */
|
||||
|
||||
static int
|
||||
_eet_dictionary_lookup(Eet_Dictionary * ed,
|
||||
_eet_dictionary_lookup(Eet_Dictionary *ed,
|
||||
const char * string,
|
||||
int hash)
|
||||
{
|
||||
|
@ -78,11 +78,11 @@ _eet_dictionary_lookup(Eet_Dictionary * ed,
|
|||
} /* _eet_dictionary_lookup */
|
||||
|
||||
int
|
||||
eet_dictionary_string_add(Eet_Dictionary * ed,
|
||||
eet_dictionary_string_add(Eet_Dictionary *ed,
|
||||
const char * string)
|
||||
{
|
||||
Eet_String * current;
|
||||
char * str;
|
||||
Eet_String *current;
|
||||
char *str;
|
||||
int hash;
|
||||
int idx;
|
||||
int len;
|
||||
|
@ -108,7 +108,7 @@ eet_dictionary_string_add(Eet_Dictionary * ed,
|
|||
|
||||
if (ed->total == ed->count)
|
||||
{
|
||||
Eet_String * new;
|
||||
Eet_String *new;
|
||||
int total;
|
||||
|
||||
total = ed->total + 8;
|
||||
|
@ -160,7 +160,7 @@ eet_dictionary_string_add(Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_add */
|
||||
|
||||
int
|
||||
eet_dictionary_string_get_size(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_size(const Eet_Dictionary *ed,
|
||||
int idx)
|
||||
{
|
||||
if (!ed)
|
||||
|
@ -176,7 +176,7 @@ eet_dictionary_string_get_size(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_size */
|
||||
|
||||
int
|
||||
eet_dictionary_string_get_hash(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_hash(const Eet_Dictionary *ed,
|
||||
int idx)
|
||||
{
|
||||
if (!ed)
|
||||
|
@ -192,7 +192,7 @@ eet_dictionary_string_get_hash(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_hash */
|
||||
|
||||
const char *
|
||||
eet_dictionary_string_get_char(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_char(const Eet_Dictionary *ed,
|
||||
int idx)
|
||||
{
|
||||
if (!ed)
|
||||
|
@ -223,7 +223,7 @@ eet_dictionary_string_get_char(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_char */
|
||||
|
||||
static inline Eina_Bool
|
||||
_eet_dictionary_string_get_me_cache(const char * s,
|
||||
_eet_dictionary_string_get_me_cache(const char *s,
|
||||
int len,
|
||||
int * mantisse,
|
||||
int * exponent)
|
||||
|
@ -240,7 +240,7 @@ _eet_dictionary_string_get_me_cache(const char * s,
|
|||
} /* _eet_dictionary_string_get_me_cache */
|
||||
|
||||
static inline Eina_Bool
|
||||
_eet_dictionary_string_get_float_cache(const char * s,
|
||||
_eet_dictionary_string_get_float_cache(const char *s,
|
||||
int len,
|
||||
float * result)
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ _eet_dictionary_string_get_float_cache(const char * s,
|
|||
} /* _eet_dictionary_string_get_float_cache */
|
||||
|
||||
static inline Eina_Bool
|
||||
_eet_dictionary_string_get_double_cache(const char * s,
|
||||
_eet_dictionary_string_get_double_cache(const char *s,
|
||||
int len,
|
||||
double * result)
|
||||
{
|
||||
|
@ -282,7 +282,7 @@ _eet_dictionary_string_get_double_cache(const char * s,
|
|||
} /* _eet_dictionary_string_get_double_cache */
|
||||
|
||||
static inline Eina_Bool
|
||||
_eet_dictionary_test(const Eet_Dictionary * ed,
|
||||
_eet_dictionary_test(const Eet_Dictionary *ed,
|
||||
int idx,
|
||||
void * result)
|
||||
{
|
||||
|
@ -302,7 +302,7 @@ _eet_dictionary_test(const Eet_Dictionary * ed,
|
|||
} /* _eet_dictionary_test */
|
||||
|
||||
Eina_Bool
|
||||
eet_dictionary_string_get_float(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_float(const Eet_Dictionary *ed,
|
||||
int idx,
|
||||
float * result)
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ eet_dictionary_string_get_float(const Eet_Dictionary * ed,
|
|||
|
||||
if (!(ed->all[idx].type & EET_D_FLOAT))
|
||||
{
|
||||
const char * str;
|
||||
const char *str;
|
||||
|
||||
str = ed->all[idx].str ? ed->all[idx].str : ed->all[idx].mmap;
|
||||
|
||||
|
@ -336,7 +336,7 @@ eet_dictionary_string_get_float(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_float */
|
||||
|
||||
Eina_Bool
|
||||
eet_dictionary_string_get_double(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_double(const Eet_Dictionary *ed,
|
||||
int idx,
|
||||
double * result)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ eet_dictionary_string_get_double(const Eet_Dictionary * ed,
|
|||
|
||||
if (!(ed->all[idx].type & EET_D_DOUBLE))
|
||||
{
|
||||
const char * str;
|
||||
const char *str;
|
||||
|
||||
str = ed->all[idx].str ? ed->all[idx].str : ed->all[idx].mmap;
|
||||
|
||||
|
@ -370,7 +370,7 @@ eet_dictionary_string_get_double(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_double */
|
||||
|
||||
Eina_Bool
|
||||
eet_dictionary_string_get_fp(const Eet_Dictionary * ed,
|
||||
eet_dictionary_string_get_fp(const Eet_Dictionary *ed,
|
||||
int idx,
|
||||
Eina_F32p32 * result)
|
||||
{
|
||||
|
@ -379,7 +379,7 @@ eet_dictionary_string_get_fp(const Eet_Dictionary * ed,
|
|||
|
||||
if (!(ed->all[idx].type & EET_D_FIXED_POINT))
|
||||
{
|
||||
const char * str;
|
||||
const char *str;
|
||||
Eina_F32p32 fp;
|
||||
|
||||
str = ed->all[idx].str ? ed->all[idx].str : ed->all[idx].mmap;
|
||||
|
@ -396,7 +396,7 @@ eet_dictionary_string_get_fp(const Eet_Dictionary * ed,
|
|||
} /* eet_dictionary_string_get_fp */
|
||||
|
||||
EAPI int
|
||||
eet_dictionary_string_check(Eet_Dictionary * ed,
|
||||
eet_dictionary_string_check(Eet_Dictionary *ed,
|
||||
const char * string)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -74,7 +74,7 @@ static boolean
|
|||
_eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo)
|
||||
{
|
||||
static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI };
|
||||
struct jpeg_membuf_src * src = (struct jpeg_membuf_src *)cinfo->src;
|
||||
struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
|
||||
|
||||
src->pub.bytes_in_buffer = sizeof(jpeg_eoi);
|
||||
src->pub.next_input_byte = jpeg_eoi;
|
||||
|
@ -86,7 +86,7 @@ static void
|
|||
_eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo,
|
||||
long num_bytes)
|
||||
{
|
||||
struct jpeg_membuf_src * src = (struct jpeg_membuf_src *)cinfo->src;
|
||||
struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src;
|
||||
|
||||
src->pub.bytes_in_buffer -= num_bytes;
|
||||
src->pub.next_input_byte += num_bytes;
|
||||
|
@ -104,7 +104,7 @@ eet_jpeg_membuf_src(j_decompress_ptr cinfo,
|
|||
const void * buf,
|
||||
size_t len)
|
||||
{
|
||||
struct jpeg_membuf_src * src;
|
||||
struct jpeg_membuf_src *src;
|
||||
|
||||
src = malloc(sizeof(*src));
|
||||
if (!src)
|
||||
|
@ -146,8 +146,8 @@ _eet_jpeg_membuf_dst_init(j_compress_ptr cinfo)
|
|||
static boolean
|
||||
_eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo)
|
||||
{
|
||||
struct jpeg_membuf_dst * dst = (struct jpeg_membuf_dst *)cinfo->dest;
|
||||
unsigned char * buf;
|
||||
struct jpeg_membuf_dst *dst = (struct jpeg_membuf_dst *)cinfo->dest;
|
||||
unsigned char *buf;
|
||||
|
||||
if (dst->len >= 0x40000000 ||
|
||||
(buf = realloc(dst->buf, dst->len * 2)) == NULL)
|
||||
|
@ -170,7 +170,7 @@ _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo)
|
|||
static void
|
||||
_eet_jpeg_membuf_dst_term(j_compress_ptr cinfo)
|
||||
{
|
||||
struct jpeg_membuf_dst * dst = (struct jpeg_membuf_dst *)cinfo->dest;
|
||||
struct jpeg_membuf_dst *dst = (struct jpeg_membuf_dst *)cinfo->dest;
|
||||
|
||||
if (dst->failed)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ eet_jpeg_membuf_dst(j_compress_ptr cinfo,
|
|||
void ** buf,
|
||||
size_t * len)
|
||||
{
|
||||
struct jpeg_membuf_dst * dst;
|
||||
struct jpeg_membuf_dst *dst;
|
||||
|
||||
dst = malloc(sizeof(*dst));
|
||||
if (!dst)
|
||||
|
@ -230,13 +230,13 @@ static void _JPEGErrorHandler2(j_common_ptr cinfo,
|
|||
|
||||
static int eet_data_image_jpeg_header_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h);
|
||||
unsigned int *w,
|
||||
unsigned int *h);
|
||||
static int eet_data_image_jpeg_rgb_decode(const void * data,
|
||||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride);
|
||||
|
@ -244,7 +244,7 @@ static void * eet_data_image_jpeg_alpha_decode(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride);
|
||||
|
@ -353,8 +353,8 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__,
|
|||
static int
|
||||
eet_data_image_jpeg_header_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h)
|
||||
unsigned int *w,
|
||||
unsigned int *h)
|
||||
{
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
|
@ -401,15 +401,15 @@ eet_data_image_jpeg_rgb_decode(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride)
|
||||
{
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
unsigned char * ptr, * line[16], * tdata = NULL;
|
||||
unsigned int * ptr2, * tmp;
|
||||
unsigned char *ptr, *line[16], *tdata = NULL;
|
||||
unsigned int *ptr2, *tmp;
|
||||
unsigned int iw, ih;
|
||||
unsigned int x, y, l, scans;
|
||||
unsigned int i;
|
||||
|
@ -554,15 +554,15 @@ eet_data_image_jpeg_alpha_decode(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride)
|
||||
{
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
unsigned char * ptr, * line[16], * tdata = NULL;
|
||||
unsigned int * ptr2, * tmp;
|
||||
unsigned char *ptr, *line[16], *tdata = NULL;
|
||||
unsigned int *ptr2, *tmp;
|
||||
unsigned int x, y, l, scans;
|
||||
unsigned int i, iw;
|
||||
|
||||
|
@ -677,8 +677,8 @@ eet_data_image_lossless_convert(int * size,
|
|||
}
|
||||
|
||||
{
|
||||
unsigned char * d;
|
||||
int * header;
|
||||
unsigned char *d;
|
||||
int *header;
|
||||
|
||||
d = malloc((w * h * 4) + (8 * 4));
|
||||
if (!d)
|
||||
|
@ -726,9 +726,9 @@ eet_data_image_lossless_compressed_convert(int * size,
|
|||
}
|
||||
|
||||
{
|
||||
unsigned char * d;
|
||||
unsigned char * comp;
|
||||
int * header;
|
||||
unsigned char *d;
|
||||
unsigned char *comp;
|
||||
int *header;
|
||||
int ret;
|
||||
uLongf buflen;
|
||||
|
||||
|
@ -790,11 +790,11 @@ eet_data_image_jpeg_convert(int * size,
|
|||
{
|
||||
struct jpeg_compress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
const int * ptr;
|
||||
void * d = NULL;
|
||||
const int *ptr;
|
||||
void *d = NULL;
|
||||
size_t sz = 0;
|
||||
JSAMPROW * jbuf;
|
||||
unsigned char * buf;
|
||||
JSAMPROW *jbuf;
|
||||
unsigned char *buf;
|
||||
|
||||
(void)alpha; /* unused */
|
||||
|
||||
|
@ -867,9 +867,9 @@ eet_data_image_jpeg_alpha_convert(int * size,
|
|||
int alpha,
|
||||
int quality)
|
||||
{
|
||||
unsigned char * d1, * d2;
|
||||
unsigned char * d;
|
||||
int * header;
|
||||
unsigned char *d1, *d2;
|
||||
unsigned char *d;
|
||||
int *header;
|
||||
int sz1, sz2;
|
||||
|
||||
(void)alpha; /* unused */
|
||||
|
@ -886,13 +886,13 @@ eet_data_image_jpeg_alpha_convert(int * size,
|
|||
}
|
||||
|
||||
{
|
||||
const int * ptr;
|
||||
void * dst = NULL;
|
||||
const int *ptr;
|
||||
void *dst = NULL;
|
||||
size_t sz = 0;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
JSAMPROW * jbuf;
|
||||
JSAMPROW *jbuf;
|
||||
struct jpeg_compress_struct cinfo;
|
||||
unsigned char * buf;
|
||||
unsigned char *buf;
|
||||
|
||||
buf = alloca(3 * w);
|
||||
|
||||
|
@ -952,13 +952,13 @@ eet_data_image_jpeg_alpha_convert(int * size,
|
|||
sz1 = sz;
|
||||
}
|
||||
{
|
||||
const int * ptr;
|
||||
void * dst = NULL;
|
||||
const int *ptr;
|
||||
void *dst = NULL;
|
||||
size_t sz = 0;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
JSAMPROW * jbuf;
|
||||
JSAMPROW *jbuf;
|
||||
struct jpeg_compress_struct cinfo;
|
||||
unsigned char * buf;
|
||||
unsigned char *buf;
|
||||
|
||||
buf = alloca(3 * w);
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ eet_data_image_write_cipher(Eet_File * ef,
|
|||
int quality,
|
||||
int lossy)
|
||||
{
|
||||
void * d = NULL;
|
||||
void *d = NULL;
|
||||
int size = 0;
|
||||
|
||||
d = eet_data_image_encode(data, &size, w, h, alpha, comp, quality, lossy);
|
||||
|
@ -1102,15 +1102,15 @@ EAPI void *
|
|||
eet_data_image_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
int * lossy)
|
||||
{
|
||||
unsigned int * d = NULL;
|
||||
void * data = NULL;
|
||||
unsigned int *d = NULL;
|
||||
void *data = NULL;
|
||||
int free_data = 0;
|
||||
int size;
|
||||
|
||||
|
@ -1136,8 +1136,8 @@ eet_data_image_read_cipher(Eet_File * ef,
|
|||
EAPI void *
|
||||
eet_data_image_read(Eet_File * ef,
|
||||
const char * name,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
|
@ -1153,7 +1153,7 @@ eet_data_image_read_to_surface_cipher(Eet_File * ef,
|
|||
const char * cipher_key,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1162,7 +1162,7 @@ eet_data_image_read_to_surface_cipher(Eet_File * ef,
|
|||
int * quality,
|
||||
int * lossy)
|
||||
{
|
||||
void * data = NULL;
|
||||
void *data = NULL;
|
||||
int free_data = 0;
|
||||
int res = 1;
|
||||
int size;
|
||||
|
@ -1193,7 +1193,7 @@ eet_data_image_read_to_surface(Eet_File * ef,
|
|||
const char * name,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1213,14 +1213,14 @@ EAPI int
|
|||
eet_data_image_header_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * cipher_key,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
int * lossy)
|
||||
{
|
||||
void * data = NULL;
|
||||
void *data = NULL;
|
||||
int size = 0;
|
||||
int free_data = 0;
|
||||
int d;
|
||||
|
@ -1247,8 +1247,8 @@ eet_data_image_header_read_cipher(Eet_File * ef,
|
|||
EAPI int
|
||||
eet_data_image_header_read(Eet_File * ef,
|
||||
const char * name,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
|
@ -1270,8 +1270,8 @@ eet_data_image_encode_cipher(const void * data,
|
|||
int lossy,
|
||||
int * size_ret)
|
||||
{
|
||||
void * d = NULL;
|
||||
void * ciphered_d = NULL;
|
||||
void *d = NULL;
|
||||
void *ciphered_d = NULL;
|
||||
unsigned int ciphered_sz = 0;
|
||||
int size = 0;
|
||||
|
||||
|
@ -1335,15 +1335,15 @@ EAPI int
|
|||
eet_data_image_header_decode_cipher(const void * data,
|
||||
const char * cipher_key,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
int * lossy)
|
||||
{
|
||||
int header[8];
|
||||
void * deciphered_d = NULL;
|
||||
void *deciphered_d = NULL;
|
||||
unsigned int deciphered_sz = 0;
|
||||
|
||||
if (cipher_key)
|
||||
|
@ -1418,7 +1418,7 @@ eet_data_image_header_decode_cipher(const void * data,
|
|||
else if ((unsigned)header[0] == 0xbeeff00d)
|
||||
{
|
||||
unsigned int iw = 0, ih = 0;
|
||||
unsigned const char * dt;
|
||||
unsigned const char *dt;
|
||||
int sz1;
|
||||
int ok;
|
||||
|
||||
|
@ -1486,8 +1486,8 @@ eet_data_image_header_decode_cipher(const void * data,
|
|||
EAPI int
|
||||
eet_data_image_header_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
|
@ -1505,7 +1505,7 @@ eet_data_image_header_decode(const void * data,
|
|||
} /* eet_data_image_header_decode */
|
||||
|
||||
static void
|
||||
_eet_data_image_copy_buffer(const unsigned int * src,
|
||||
_eet_data_image_copy_buffer(const unsigned int *src,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int src_w,
|
||||
|
@ -1520,7 +1520,7 @@ _eet_data_image_copy_buffer(const unsigned int * src,
|
|||
memcpy(dst, src, row_stride * h);
|
||||
else
|
||||
{
|
||||
unsigned int * over = dst;
|
||||
unsigned int *over = dst;
|
||||
unsigned int y;
|
||||
|
||||
for (y = 0; y < h; ++y, src += src_w, over += row_stride)
|
||||
|
@ -1535,7 +1535,7 @@ _eet_data_image_decode_inside(const void * data,
|
|||
unsigned int src_y,
|
||||
unsigned int src_w,
|
||||
unsigned int src_h,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1546,7 +1546,7 @@ _eet_data_image_decode_inside(const void * data,
|
|||
{
|
||||
if (lossy == 0 && quality == 100)
|
||||
{
|
||||
unsigned int * body;
|
||||
unsigned int *body;
|
||||
|
||||
body = ((unsigned int *)data) + 8;
|
||||
if (!comp)
|
||||
|
@ -1564,7 +1564,7 @@ _eet_data_image_decode_inside(const void * data,
|
|||
}
|
||||
else
|
||||
{
|
||||
Bytef * dtmp;
|
||||
Bytef *dtmp;
|
||||
uLongf dlen = src_w * src_h * 4;
|
||||
|
||||
/* FIXME: This could create a huge alloc. So compressed data and tile could not always work. */
|
||||
|
@ -1594,7 +1594,7 @@ _eet_data_image_decode_inside(const void * data,
|
|||
{
|
||||
if (alpha)
|
||||
{
|
||||
unsigned const char * dt;
|
||||
unsigned const char *dt;
|
||||
int header[8];
|
||||
int sz1, sz2;
|
||||
|
||||
|
@ -1634,17 +1634,17 @@ EAPI void *
|
|||
eet_data_image_decode_cipher(const void * data,
|
||||
const char * cipher_key,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
int * lossy)
|
||||
{
|
||||
unsigned int * d = NULL;
|
||||
unsigned int *d = NULL;
|
||||
unsigned int iw, ih;
|
||||
int ialpha, icompress, iquality, ilossy;
|
||||
void * deciphered_d = NULL;
|
||||
void *deciphered_d = NULL;
|
||||
unsigned int deciphered_sz = 0;
|
||||
|
||||
if (cipher_key)
|
||||
|
@ -1700,8 +1700,8 @@ eet_data_image_decode_cipher(const void * data,
|
|||
EAPI void *
|
||||
eet_data_image_decode(const void * data,
|
||||
int size,
|
||||
unsigned int * w,
|
||||
unsigned int * h,
|
||||
unsigned int *w,
|
||||
unsigned int *h,
|
||||
int * alpha,
|
||||
int * comp,
|
||||
int * quality,
|
||||
|
@ -1717,7 +1717,7 @@ eet_data_image_decode_to_surface_cipher(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
@ -1728,7 +1728,7 @@ eet_data_image_decode_to_surface_cipher(const void * data,
|
|||
{
|
||||
unsigned int iw, ih;
|
||||
int ialpha, icompress, iquality, ilossy;
|
||||
void * deciphered_d = NULL;
|
||||
void *deciphered_d = NULL;
|
||||
unsigned int deciphered_sz = 0;
|
||||
|
||||
if (cipher_key)
|
||||
|
@ -1783,7 +1783,7 @@ eet_data_image_decode_to_surface(const void * data,
|
|||
int size,
|
||||
unsigned int src_x,
|
||||
unsigned int src_y,
|
||||
unsigned int * d,
|
||||
unsigned int *d,
|
||||
unsigned int w,
|
||||
unsigned int h,
|
||||
unsigned int row_stride,
|
||||
|
|
|
@ -73,7 +73,7 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
|||
#include "Eet_private.h"
|
||||
|
||||
static Eet_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
||||
EAPI Eet_Version * eet_version = &_version;
|
||||
EAPI Eet_Version *eet_version = &_version;
|
||||
|
||||
#ifdef HAVE_REALPATH
|
||||
# undef HAVE_REALPATH
|
||||
|
@ -95,7 +95,7 @@ struct _Eet_File
|
|||
Eet_File_Header * header;
|
||||
Eet_Dictionary * ed;
|
||||
Eet_Key * key;
|
||||
const unsigned char * data;
|
||||
const unsigned char *data;
|
||||
const void * x509_der;
|
||||
const void * signature;
|
||||
void * sha1;
|
||||
|
@ -127,20 +127,20 @@ struct _Eet_File
|
|||
struct _Eet_File_Header
|
||||
{
|
||||
int magic;
|
||||
Eet_File_Directory * directory;
|
||||
Eet_File_Directory *directory;
|
||||
};
|
||||
|
||||
struct _Eet_File_Directory
|
||||
{
|
||||
int size;
|
||||
Eet_File_Node ** nodes;
|
||||
Eet_File_Node **nodes;
|
||||
};
|
||||
|
||||
struct _Eet_File_Node
|
||||
{
|
||||
char * name;
|
||||
void * data;
|
||||
Eet_File_Node * next; /* FIXME: make buckets linked lists */
|
||||
Eet_File_Node *next; /* FIXME: make buckets linked lists */
|
||||
|
||||
int offset;
|
||||
int dictionary_offset;
|
||||
|
@ -224,29 +224,29 @@ char x509[x509_length]; /* The public certificate. */
|
|||
EET_FILE2_DICTIONARY_ENTRY_COUNT)
|
||||
|
||||
/* prototypes of internal calls */
|
||||
static Eet_File * eet_cache_find(const char * path,
|
||||
static Eet_File * eet_cache_find(const char *path,
|
||||
Eet_File ** cache,
|
||||
int cache_num);
|
||||
static void eet_cache_add(Eet_File * ef,
|
||||
Eet_File *** cache,
|
||||
Eet_File ***cache,
|
||||
int * cache_num,
|
||||
int * cache_alloc);
|
||||
static void eet_cache_del(Eet_File * ef,
|
||||
Eet_File *** cache,
|
||||
Eet_File ***cache,
|
||||
int * cache_num,
|
||||
int * cache_alloc);
|
||||
static int eet_string_match(const char * s1, const char * s2);
|
||||
static int eet_string_match(const char *s1, const char *s2);
|
||||
#if 0 /* Unused */
|
||||
static Eet_Error eet_flush(Eet_File * ef);
|
||||
static Eet_Error eet_flush(Eet_File *ef);
|
||||
#endif /* if 0 */
|
||||
static Eet_Error eet_flush2(Eet_File * ef);
|
||||
static Eet_File_Node * find_node_by_name(Eet_File * ef, const char * name);
|
||||
static Eet_Error eet_flush2(Eet_File *ef);
|
||||
static Eet_File_Node * find_node_by_name(Eet_File *ef, const char *name);
|
||||
static int read_data_from_disk(Eet_File * ef,
|
||||
Eet_File_Node * efn,
|
||||
Eet_File_Node *efn,
|
||||
void * buf,
|
||||
int len);
|
||||
|
||||
static Eet_Error eet_internal_close(Eet_File * ef, Eina_Bool locked);
|
||||
static Eet_Error eet_internal_close(Eet_File *ef, Eina_Bool locked);
|
||||
|
||||
#ifdef EFL_HAVE_THREADS
|
||||
|
||||
|
@ -291,10 +291,10 @@ static HANDLE eet_cache_lock = NULL;
|
|||
/* cache. i don't expect this to ever be large, so arrays will do */
|
||||
static int eet_writers_num = 0;
|
||||
static int eet_writers_alloc = 0;
|
||||
static Eet_File ** eet_writers = NULL;
|
||||
static Eet_File **eet_writers = NULL;
|
||||
static int eet_readers_num = 0;
|
||||
static int eet_readers_alloc = 0;
|
||||
static Eet_File ** eet_readers = NULL;
|
||||
static Eet_File **eet_readers = NULL;
|
||||
static int eet_init_count = 0;
|
||||
|
||||
/* log domain variable */
|
||||
|
@ -302,7 +302,7 @@ int _eet_log_dom_global = -1;
|
|||
|
||||
/* Check to see its' an eet file pointer */
|
||||
static inline int
|
||||
eet_check_pointer(const Eet_File * ef)
|
||||
eet_check_pointer(const Eet_File *ef)
|
||||
{
|
||||
if ((!ef) || (ef->magic != EET_MAGIC_FILE))
|
||||
return 1;
|
||||
|
@ -311,7 +311,7 @@ eet_check_pointer(const Eet_File * ef)
|
|||
} /* eet_check_pointer */
|
||||
|
||||
static inline int
|
||||
eet_check_header(const Eet_File * ef)
|
||||
eet_check_header(const Eet_File *ef)
|
||||
{
|
||||
if (!ef->header)
|
||||
return 1;
|
||||
|
@ -324,7 +324,7 @@ eet_check_header(const Eet_File * ef)
|
|||
|
||||
static inline int
|
||||
eet_test_close(int test,
|
||||
Eet_File * ef)
|
||||
Eet_File *ef)
|
||||
{
|
||||
if (test)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ eet_test_close(int test,
|
|||
|
||||
/* find an eet file in the currently in use cache */
|
||||
static Eet_File *
|
||||
eet_cache_find(const char * path,
|
||||
eet_cache_find(const char *path,
|
||||
Eet_File ** cache,
|
||||
int cache_num)
|
||||
{
|
||||
|
@ -361,18 +361,18 @@ eet_cache_find(const char * path,
|
|||
/* this should only be called when the cache lock is already held */
|
||||
static void
|
||||
eet_cache_add(Eet_File * ef,
|
||||
Eet_File *** cache,
|
||||
Eet_File ***cache,
|
||||
int * cache_num,
|
||||
int * cache_alloc)
|
||||
{
|
||||
Eet_File ** new_cache;
|
||||
Eet_File **new_cache;
|
||||
int new_cache_num;
|
||||
int new_cache_alloc;
|
||||
|
||||
new_cache_num = *cache_num;
|
||||
if (new_cache_num >= 64) /* avoid fd overruns - limit to 128 (most recent) in the cache */
|
||||
{
|
||||
Eet_File * del_ef = NULL;
|
||||
Eet_File *del_ef = NULL;
|
||||
int i;
|
||||
|
||||
new_cache = *cache;
|
||||
|
@ -417,11 +417,11 @@ eet_cache_add(Eet_File * ef,
|
|||
/* this should only be called when the cache lock is already held */
|
||||
static void
|
||||
eet_cache_del(Eet_File * ef,
|
||||
Eet_File *** cache,
|
||||
Eet_File ***cache,
|
||||
int * cache_num,
|
||||
int * cache_alloc)
|
||||
{
|
||||
Eet_File ** new_cache;
|
||||
Eet_File **new_cache;
|
||||
int new_cache_num, new_cache_alloc;
|
||||
int i, j;
|
||||
|
||||
|
@ -470,8 +470,8 @@ eet_cache_del(Eet_File * ef,
|
|||
|
||||
/* internal string match. null friendly, catches same ptr */
|
||||
static int
|
||||
eet_string_match(const char * s1,
|
||||
const char * s2)
|
||||
eet_string_match(const char *s1,
|
||||
const char *s2)
|
||||
{
|
||||
/* both null- no match */
|
||||
if ((!s1) || (!s2))
|
||||
|
@ -485,10 +485,10 @@ eet_string_match(const char * s1,
|
|||
|
||||
/* flush out writes to a v2 eet file */
|
||||
static Eet_Error
|
||||
eet_flush2(Eet_File * ef)
|
||||
eet_flush2(Eet_File *ef)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
FILE * fp;
|
||||
Eet_File_Node *efn;
|
||||
FILE *fp;
|
||||
Eet_Error error = EET_ERROR_NONE;
|
||||
int head[EET_FILE2_HEADER_COUNT];
|
||||
int num_directory_entries = 0;
|
||||
|
@ -802,7 +802,7 @@ eet_shutdown(void)
|
|||
} /* eet_shutdown */
|
||||
|
||||
EAPI Eet_Error
|
||||
eet_sync(Eet_File * ef)
|
||||
eet_sync(Eet_File *ef)
|
||||
{
|
||||
Eet_Error ret;
|
||||
|
||||
|
@ -849,7 +849,7 @@ eet_clearcache(void)
|
|||
|
||||
if (num > 0)
|
||||
{
|
||||
Eet_File ** closelist = NULL;
|
||||
Eet_File **closelist = NULL;
|
||||
|
||||
closelist = alloca(num * sizeof(Eet_File *));
|
||||
num = 0;
|
||||
|
@ -884,10 +884,10 @@ eet_clearcache(void)
|
|||
|
||||
/* FIXME: MMAP race condition in READ_WRITE_MODE */
|
||||
static Eet_File *
|
||||
eet_internal_read2(Eet_File * ef)
|
||||
eet_internal_read2(Eet_File *ef)
|
||||
{
|
||||
const int * data = (const int *)ef->data;
|
||||
const char * start = (const char *)ef->data;
|
||||
const int *data = (const int *)ef->data;
|
||||
const char *start = (const char *)ef->data;
|
||||
int idx = 0;
|
||||
int num_directory_entries;
|
||||
int bytes_directory_entries;
|
||||
|
@ -953,8 +953,8 @@ eet_internal_read2(Eet_File * ef)
|
|||
/* actually read the directory block - all of it, into ram */
|
||||
for (i = 0; i < num_directory_entries; ++i)
|
||||
{
|
||||
const char * name;
|
||||
Eet_File_Node * efn;
|
||||
const char *name;
|
||||
Eet_File_Node *efn;
|
||||
int name_offset;
|
||||
int name_size;
|
||||
int hash;
|
||||
|
@ -1029,7 +1029,7 @@ eet_internal_read2(Eet_File * ef)
|
|||
|
||||
if (num_dictionary_entries)
|
||||
{
|
||||
const int * dico = (const int *)ef->data +
|
||||
const int *dico = (const int *)ef->data +
|
||||
EET_FILE2_DIRECTORY_ENTRY_COUNT * num_directory_entries +
|
||||
EET_FILE2_HEADER_COUNT;
|
||||
int j;
|
||||
|
@ -1109,7 +1109,7 @@ eet_internal_read2(Eet_File * ef)
|
|||
if (signature_base_offset < ef->data_size)
|
||||
{
|
||||
#ifdef HAVE_SIGNATURE
|
||||
const unsigned char * buffer = ((const unsigned char *)ef->data) +
|
||||
const unsigned char *buffer = ((const unsigned char *)ef->data) +
|
||||
signature_base_offset;
|
||||
ef->x509_der = eet_identity_check(ef->data,
|
||||
signature_base_offset,
|
||||
|
@ -1135,10 +1135,10 @@ eet_internal_read2(Eet_File * ef)
|
|||
|
||||
#if EET_OLD_EET_FILE_FORMAT
|
||||
static Eet_File *
|
||||
eet_internal_read1(Eet_File * ef)
|
||||
eet_internal_read1(Eet_File *ef)
|
||||
{
|
||||
const unsigned char * dyn_buf = NULL;
|
||||
const unsigned char * p = NULL;
|
||||
const unsigned char *dyn_buf = NULL;
|
||||
const unsigned char *p = NULL;
|
||||
int idx = 0;
|
||||
int num_entries;
|
||||
int byte_entries;
|
||||
|
@ -1207,8 +1207,8 @@ eet_internal_read1(Eet_File * ef)
|
|||
|
||||
for (i = 0; i < num_entries; i++)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
void * data = NULL;
|
||||
Eet_File_Node *efn;
|
||||
void *data = NULL;
|
||||
int indexn = 0;
|
||||
int name_size;
|
||||
int hash;
|
||||
|
@ -1318,9 +1318,9 @@ eet_internal_read1(Eet_File * ef)
|
|||
* to just require that it is always held.)
|
||||
*/
|
||||
static Eet_File *
|
||||
eet_internal_read(Eet_File * ef)
|
||||
eet_internal_read(Eet_File *ef)
|
||||
{
|
||||
const int * data = (const int *)ef->data;
|
||||
const int *data = (const int *)ef->data;
|
||||
|
||||
if (eet_test_close((ef->data == (void *)-1) || (ef->data == NULL), ef))
|
||||
return NULL;
|
||||
|
@ -1348,7 +1348,7 @@ eet_internal_read(Eet_File * ef)
|
|||
} /* eet_internal_read */
|
||||
|
||||
static Eet_Error
|
||||
eet_internal_close(Eet_File * ef,
|
||||
eet_internal_close(Eet_File *ef,
|
||||
Eina_Bool locked)
|
||||
{
|
||||
Eet_Error err;
|
||||
|
@ -1403,7 +1403,7 @@ eet_internal_close(Eet_File * ef,
|
|||
num = (1 << ef->header->directory->size);
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
Eet_File_Node *efn;
|
||||
|
||||
while ((efn = ef->header->directory->nodes[i]))
|
||||
{
|
||||
|
@ -1453,10 +1453,10 @@ on_error:
|
|||
} /* eet_internal_close */
|
||||
|
||||
EAPI Eet_File *
|
||||
eet_memopen_read(const void * data,
|
||||
eet_memopen_read(const void *data,
|
||||
size_t size)
|
||||
{
|
||||
Eet_File * ef;
|
||||
Eet_File *ef;
|
||||
|
||||
if (data == NULL || size == 0)
|
||||
return NULL;
|
||||
|
@ -1492,8 +1492,8 @@ EAPI Eet_File *
|
|||
eet_open(const char * file,
|
||||
Eet_File_Mode mode)
|
||||
{
|
||||
FILE * fp;
|
||||
Eet_File * ef;
|
||||
FILE *fp;
|
||||
Eet_File *ef;
|
||||
int file_len;
|
||||
struct stat file_stat;
|
||||
|
||||
|
@ -1664,7 +1664,7 @@ on_error:
|
|||
} /* eet_open */
|
||||
|
||||
EAPI Eet_File_Mode
|
||||
eet_mode_get(Eet_File * ef)
|
||||
eet_mode_get(Eet_File *ef)
|
||||
{
|
||||
/* check to see its' an eet file pointer */
|
||||
if ((!ef) || (ef->magic != EET_MAGIC_FILE))
|
||||
|
@ -1674,7 +1674,7 @@ eet_mode_get(Eet_File * ef)
|
|||
} /* eet_mode_get */
|
||||
|
||||
EAPI const void *
|
||||
eet_identity_x509(Eet_File * ef,
|
||||
eet_identity_x509(Eet_File *ef,
|
||||
int * der_length)
|
||||
{
|
||||
if (!ef->x509_der)
|
||||
|
@ -1687,7 +1687,7 @@ eet_identity_x509(Eet_File * ef,
|
|||
} /* eet_identity_x509 */
|
||||
|
||||
EAPI const void *
|
||||
eet_identity_signature(Eet_File * ef,
|
||||
eet_identity_signature(Eet_File *ef,
|
||||
int * signature_length)
|
||||
{
|
||||
if (!ef->signature)
|
||||
|
@ -1700,7 +1700,7 @@ eet_identity_signature(Eet_File * ef,
|
|||
} /* eet_identity_signature */
|
||||
|
||||
EAPI const void *
|
||||
eet_identity_sha1(Eet_File * ef,
|
||||
eet_identity_sha1(Eet_File *ef,
|
||||
int * sha1_length)
|
||||
{
|
||||
if (!ef->sha1)
|
||||
|
@ -1715,10 +1715,10 @@ eet_identity_sha1(Eet_File * ef,
|
|||
} /* eet_identity_sha1 */
|
||||
|
||||
EAPI Eet_Error
|
||||
eet_identity_set(Eet_File * ef,
|
||||
eet_identity_set(Eet_File *ef,
|
||||
Eet_Key * key)
|
||||
{
|
||||
Eet_Key * tmp = ef->key;
|
||||
Eet_Key *tmp = ef->key;
|
||||
|
||||
if (!ef)
|
||||
return EET_ERROR_BAD_OBJECT;
|
||||
|
@ -1734,19 +1734,19 @@ eet_identity_set(Eet_File * ef,
|
|||
} /* eet_identity_set */
|
||||
|
||||
EAPI Eet_Error
|
||||
eet_close(Eet_File * ef)
|
||||
eet_close(Eet_File *ef)
|
||||
{
|
||||
return eet_internal_close(ef, EINA_FALSE);
|
||||
} /* eet_close */
|
||||
|
||||
EAPI void *
|
||||
eet_read_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret,
|
||||
const char * cipher_key)
|
||||
const char *cipher_key)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
char * data = NULL;
|
||||
Eet_File_Node *efn;
|
||||
char *data = NULL;
|
||||
int size = 0;
|
||||
|
||||
if (size_ret)
|
||||
|
@ -1785,7 +1785,7 @@ eet_read_cipher(Eet_File * ef,
|
|||
/* uncompressed data */
|
||||
if (efn->compression == 0)
|
||||
{
|
||||
void * data_deciphered = NULL;
|
||||
void *data_deciphered = NULL;
|
||||
unsigned int data_deciphered_sz = 0;
|
||||
/* if we alreayd have the data in ram... copy that */
|
||||
|
||||
|
@ -1814,8 +1814,8 @@ eet_read_cipher(Eet_File * ef,
|
|||
/* compressed data */
|
||||
else
|
||||
{
|
||||
void * tmp_data;
|
||||
void * data_deciphered = NULL;
|
||||
void *tmp_data;
|
||||
void *data_deciphered = NULL;
|
||||
unsigned int data_deciphered_sz = 0;
|
||||
int free_tmp = 0;
|
||||
int compr_size = efn->size;
|
||||
|
@ -1874,7 +1874,7 @@ eet_read_cipher(Eet_File * ef,
|
|||
/* handle alias */
|
||||
if (efn->alias)
|
||||
{
|
||||
void * tmp;
|
||||
void *tmp;
|
||||
|
||||
if (data[size - 1] != '\0')
|
||||
goto on_error;
|
||||
|
@ -1900,7 +1900,7 @@ on_error:
|
|||
|
||||
EAPI void *
|
||||
eet_read(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret)
|
||||
{
|
||||
return eet_read_cipher(ef, name, size_ret, NULL);
|
||||
|
@ -1908,11 +1908,11 @@ eet_read(Eet_File * ef,
|
|||
|
||||
EAPI const void *
|
||||
eet_read_direct(Eet_File * ef,
|
||||
const char * name,
|
||||
const char *name,
|
||||
int * size_ret)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
const char * data = NULL;
|
||||
Eet_File_Node *efn;
|
||||
const char *data = NULL;
|
||||
int size = 0;
|
||||
|
||||
if (size_ret)
|
||||
|
@ -1953,7 +1953,7 @@ eet_read_direct(Eet_File * ef,
|
|||
/* handle alias case */
|
||||
if (efn->compression)
|
||||
{
|
||||
char * tmp;
|
||||
char *tmp;
|
||||
int compr_size = efn->size;
|
||||
uLongf dlen;
|
||||
|
||||
|
@ -2001,12 +2001,12 @@ on_error:
|
|||
|
||||
EAPI Eina_Bool
|
||||
eet_alias(Eet_File * ef,
|
||||
const char * name,
|
||||
const char * destination,
|
||||
const char *name,
|
||||
const char *destination,
|
||||
int comp)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
void * data2;
|
||||
Eet_File_Node *efn;
|
||||
void *data2;
|
||||
Eina_Bool exists_already = EINA_FALSE;
|
||||
int data_size;
|
||||
int hash;
|
||||
|
@ -2090,7 +2090,7 @@ eet_alias(Eet_File * ef,
|
|||
}
|
||||
else
|
||||
{
|
||||
void * data3;
|
||||
void *data3;
|
||||
|
||||
data3 = realloc(data2, data_size);
|
||||
if (data3)
|
||||
|
@ -2156,14 +2156,14 @@ on_error:
|
|||
|
||||
EAPI int
|
||||
eet_write_cipher(Eet_File * ef,
|
||||
const char * name,
|
||||
const void * data,
|
||||
const char *name,
|
||||
const void *data,
|
||||
int size,
|
||||
int comp,
|
||||
const char * cipher_key)
|
||||
const char *cipher_key)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
void * data2 = NULL;
|
||||
Eet_File_Node *efn;
|
||||
void *data2 = NULL;
|
||||
int exists_already = 0;
|
||||
int data_size;
|
||||
int hash;
|
||||
|
@ -2247,7 +2247,7 @@ eet_write_cipher(Eet_File * ef,
|
|||
}
|
||||
else
|
||||
{
|
||||
void * data3;
|
||||
void *data3;
|
||||
|
||||
data3 = realloc(data2, data_size);
|
||||
if (data3)
|
||||
|
@ -2257,9 +2257,9 @@ eet_write_cipher(Eet_File * ef,
|
|||
|
||||
if (cipher_key)
|
||||
{
|
||||
void * data_ciphered = NULL;
|
||||
void *data_ciphered = NULL;
|
||||
unsigned int data_ciphered_sz = 0;
|
||||
const void * tmp;
|
||||
const void *tmp;
|
||||
|
||||
tmp = data2 ? data2 : data;
|
||||
if (!eet_cipher(tmp, data_size, cipher_key, strlen(cipher_key),
|
||||
|
@ -2338,8 +2338,8 @@ on_error:
|
|||
|
||||
EAPI int
|
||||
eet_write(Eet_File * ef,
|
||||
const char * name,
|
||||
const void * data,
|
||||
const char *name,
|
||||
const void *data,
|
||||
int size,
|
||||
int comp)
|
||||
{
|
||||
|
@ -2348,10 +2348,10 @@ eet_write(Eet_File * ef,
|
|||
|
||||
EAPI int
|
||||
eet_delete(Eet_File * ef,
|
||||
const char * name)
|
||||
const char *name)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
Eet_File_Node * pefn;
|
||||
Eet_File_Node *efn;
|
||||
Eet_File_Node *pefn;
|
||||
int hash;
|
||||
int exists_already = 0;
|
||||
|
||||
|
@ -2409,7 +2409,7 @@ eet_delete(Eet_File * ef,
|
|||
} /* eet_delete */
|
||||
|
||||
EAPI Eet_Dictionary *
|
||||
eet_dictionary_get(Eet_File * ef)
|
||||
eet_dictionary_get(Eet_File *ef)
|
||||
{
|
||||
if (eet_check_pointer(ef))
|
||||
return NULL;
|
||||
|
@ -2419,11 +2419,11 @@ eet_dictionary_get(Eet_File * ef)
|
|||
|
||||
EAPI char **
|
||||
eet_list(Eet_File * ef,
|
||||
const char * glob,
|
||||
const char *glob,
|
||||
int * count_ret)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
char ** list_ret = NULL;
|
||||
Eet_File_Node *efn;
|
||||
char **list_ret = NULL;
|
||||
int list_count = 0;
|
||||
int list_count_alloc = 0;
|
||||
int i, num;
|
||||
|
@ -2463,7 +2463,7 @@ eet_list(Eet_File * ef,
|
|||
/* only realloc in 32 entry chunks */
|
||||
if (list_count > list_count_alloc)
|
||||
{
|
||||
char ** new_list = NULL;
|
||||
char **new_list = NULL;
|
||||
|
||||
list_count_alloc += 64;
|
||||
new_list =
|
||||
|
@ -2502,10 +2502,10 @@ on_error:
|
|||
} /* eet_list */
|
||||
|
||||
EAPI int
|
||||
eet_num_entries(Eet_File * ef)
|
||||
eet_num_entries(Eet_File *ef)
|
||||
{
|
||||
int i, num, ret = 0;
|
||||
Eet_File_Node * efn;
|
||||
Eet_File_Node *efn;
|
||||
|
||||
/* check to see its' an eet file pointer */
|
||||
if (eet_check_pointer(ef) || eet_check_header(ef) ||
|
||||
|
@ -2530,9 +2530,9 @@ eet_num_entries(Eet_File * ef)
|
|||
|
||||
static Eet_File_Node *
|
||||
find_node_by_name(Eet_File * ef,
|
||||
const char * name)
|
||||
const char *name)
|
||||
{
|
||||
Eet_File_Node * efn;
|
||||
Eet_File_Node *efn;
|
||||
int hash;
|
||||
|
||||
/* get hash bucket this should be in */
|
||||
|
@ -2549,7 +2549,7 @@ find_node_by_name(Eet_File * ef,
|
|||
|
||||
static int
|
||||
read_data_from_disk(Eet_File * ef,
|
||||
Eet_File_Node * efn,
|
||||
Eet_File_Node *efn,
|
||||
void * buf,
|
||||
int len)
|
||||
{
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
static Eina_Mempool * _eet_node_mp = NULL;
|
||||
static Eina_Mempool *_eet_node_mp = NULL;
|
||||
|
||||
Eet_Node *
|
||||
eet_node_new(void)
|
||||
{
|
||||
Eet_Node * result;
|
||||
Eet_Node *result;
|
||||
|
||||
result = eina_mempool_malloc(_eet_node_mp, sizeof (Eet_Node));
|
||||
if (!result)
|
||||
|
@ -34,16 +34,16 @@ eet_node_new(void)
|
|||
} /* eet_node_new */
|
||||
|
||||
void
|
||||
eet_node_free(Eet_Node * node)
|
||||
eet_node_free(Eet_Node *node)
|
||||
{
|
||||
eina_mempool_free(_eet_node_mp, node);
|
||||
} /* eet_node_free */
|
||||
|
||||
static Eet_Node *
|
||||
_eet_node_new(const char * name,
|
||||
_eet_node_new(const char *name,
|
||||
int type)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = eet_node_new();
|
||||
if (!n)
|
||||
|
@ -56,10 +56,10 @@ _eet_node_new(const char * name,
|
|||
} /* _eet_node_new */
|
||||
|
||||
static void
|
||||
_eet_node_append(Eet_Node * n, Eina_List * nodes)
|
||||
_eet_node_append(Eet_Node *n, Eina_List *nodes)
|
||||
{
|
||||
Eet_Node * value;
|
||||
Eina_List * l;
|
||||
Eet_Node *value;
|
||||
Eina_List *l;
|
||||
|
||||
EINA_LIST_REVERSE_FOREACH(nodes, l, value)
|
||||
{
|
||||
|
@ -70,9 +70,9 @@ _eet_node_append(Eet_Node * n, Eina_List * nodes)
|
|||
|
||||
#define EET_NODE_NEW(Eet_type, Name, Value, Type)\
|
||||
EAPI Eet_Node *\
|
||||
eet_node_ ## Name ## _new(const char * name, Type Value)\
|
||||
eet_node_ ## Name ## _new(const char *name, Type Value)\
|
||||
{\
|
||||
Eet_Node * n;\
|
||||
Eet_Node *n;\
|
||||
\
|
||||
n = _eet_node_new(name, Eet_type);\
|
||||
if (!n) { return NULL; }\
|
||||
|
@ -84,9 +84,9 @@ _eet_node_append(Eet_Node * n, Eina_List * nodes)
|
|||
|
||||
#define EET_NODE_STR_NEW(Eet_type, Name, Value, Type)\
|
||||
EAPI Eet_Node *\
|
||||
eet_node_ ## Name ## _new(const char * name, Type Value)\
|
||||
eet_node_ ## Name ## _new(const char *name, Type Value)\
|
||||
{\
|
||||
Eet_Node * n;\
|
||||
Eet_Node *n;\
|
||||
\
|
||||
n = _eet_node_new(name, Eet_type);\
|
||||
if (!n) { return NULL; }\
|
||||
|
@ -110,9 +110,9 @@ EET_NODE_STR_NEW(EET_T_STRING, string, str, const char *)
|
|||
EET_NODE_STR_NEW(EET_T_INLINED_STRING, inlined_string, str, const char *)
|
||||
|
||||
Eet_Node *
|
||||
eet_node_null_new(const char * name)
|
||||
eet_node_null_new(const char *name)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = _eet_node_new(name, EET_T_NULL);
|
||||
if (!n)
|
||||
|
@ -124,10 +124,10 @@ eet_node_null_new(const char * name)
|
|||
}
|
||||
|
||||
Eet_Node *
|
||||
eet_node_list_new(const char * name,
|
||||
eet_node_list_new(const char *name,
|
||||
Eina_List * nodes)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = _eet_node_new(name, EET_G_LIST);
|
||||
if (!n)
|
||||
|
@ -139,11 +139,11 @@ eet_node_list_new(const char * name,
|
|||
} /* eet_node_list_new */
|
||||
|
||||
Eet_Node *
|
||||
eet_node_array_new(const char * name,
|
||||
eet_node_array_new(const char *name,
|
||||
int count,
|
||||
Eina_List * nodes)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = _eet_node_new(name, EET_G_ARRAY);
|
||||
if (!n)
|
||||
|
@ -157,10 +157,10 @@ eet_node_array_new(const char * name,
|
|||
} /* eet_node_array_new */
|
||||
|
||||
Eet_Node *
|
||||
eet_node_var_array_new(const char * name,
|
||||
eet_node_var_array_new(const char *name,
|
||||
Eina_List * nodes)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = _eet_node_new(name, EET_G_VAR_ARRAY);
|
||||
if (!n)
|
||||
|
@ -174,12 +174,12 @@ eet_node_var_array_new(const char * name,
|
|||
} /* eet_node_var_array_new */
|
||||
|
||||
Eet_Node *
|
||||
eet_node_hash_new(const char * name,
|
||||
const char * key,
|
||||
eet_node_hash_new(const char *name,
|
||||
const char *key,
|
||||
Eet_Node * node)
|
||||
{
|
||||
Eina_List * nodes;
|
||||
Eet_Node * n;
|
||||
Eina_List *nodes;
|
||||
Eet_Node *n;
|
||||
|
||||
if (!node)
|
||||
return NULL;
|
||||
|
@ -197,10 +197,10 @@ eet_node_hash_new(const char * name,
|
|||
} /* eet_node_hash_new */
|
||||
|
||||
Eet_Node *
|
||||
eet_node_struct_new(const char * name,
|
||||
eet_node_struct_new(const char *name,
|
||||
Eina_List * nodes)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
n = _eet_node_new(name, EET_G_UNKNOWN);
|
||||
if (!n)
|
||||
|
@ -212,10 +212,10 @@ eet_node_struct_new(const char * name,
|
|||
} /* eet_node_struct_new */
|
||||
|
||||
Eet_Node *
|
||||
eet_node_struct_child_new(const char * parent,
|
||||
eet_node_struct_child_new(const char *parent,
|
||||
Eet_Node * child)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
if (child->type != EET_G_UNKNOWN)
|
||||
return child;
|
||||
|
@ -231,18 +231,18 @@ eet_node_struct_child_new(const char * parent,
|
|||
|
||||
void
|
||||
eet_node_list_append(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char *name,
|
||||
Eet_Node * child)
|
||||
{
|
||||
const char * tmp;
|
||||
Eet_Node * nn;
|
||||
const char *tmp;
|
||||
Eet_Node *nn;
|
||||
|
||||
tmp = eina_stringshare_add(name);
|
||||
|
||||
for (nn = parent->values; nn; nn = nn->next)
|
||||
if (nn->name == tmp && nn->type == EET_G_LIST)
|
||||
{
|
||||
Eet_Node * n;
|
||||
Eet_Node *n;
|
||||
|
||||
if (!nn->values)
|
||||
nn->values = child;
|
||||
|
@ -272,12 +272,12 @@ eet_node_list_append(Eet_Node * parent,
|
|||
|
||||
void
|
||||
eet_node_struct_append(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char *name,
|
||||
Eet_Node * child)
|
||||
{
|
||||
const char * tmp;
|
||||
Eet_Node * prev;
|
||||
Eet_Node * nn;
|
||||
const char *tmp;
|
||||
Eet_Node *prev;
|
||||
Eet_Node *nn;
|
||||
|
||||
if (parent->type != EET_G_UNKNOWN)
|
||||
{
|
||||
|
@ -320,11 +320,11 @@ eet_node_struct_append(Eet_Node * parent,
|
|||
|
||||
void
|
||||
eet_node_hash_add(Eet_Node * parent,
|
||||
const char * name,
|
||||
const char * key,
|
||||
const char *name,
|
||||
const char *key,
|
||||
Eet_Node * child)
|
||||
{
|
||||
Eet_Node * nn;
|
||||
Eet_Node *nn;
|
||||
|
||||
/* No list found, so create it. */
|
||||
nn = eet_node_hash_new(name, key, child);
|
||||
|
@ -335,10 +335,10 @@ eet_node_hash_add(Eet_Node * parent,
|
|||
} /* eet_node_hash_add */
|
||||
|
||||
void
|
||||
eet_node_del(Eet_Node * n)
|
||||
eet_node_del(Eet_Node *n)
|
||||
{
|
||||
Eet_Node * nn;
|
||||
Eet_Node * tmp;
|
||||
Eet_Node *nn;
|
||||
Eet_Node *tmp;
|
||||
|
||||
if (!n)
|
||||
return;
|
||||
|
@ -381,7 +381,7 @@ eet_node_del(Eet_Node * n)
|
|||
eet_node_free(n);
|
||||
} /* eet_node_del */
|
||||
|
||||
static const char * eet_node_dump_g_name[6] = {
|
||||
static const char *eet_node_dump_g_name[6] = {
|
||||
"struct",
|
||||
"array",
|
||||
"var_array",
|
||||
|
@ -390,7 +390,7 @@ static const char * eet_node_dump_g_name[6] = {
|
|||
"???"
|
||||
};
|
||||
|
||||
static const char * eet_node_dump_t_name[14][2] = {
|
||||
static const char *eet_node_dump_t_name[14][2] = {
|
||||
{ "???: ", "???" },
|
||||
{ "char: ", "%hhi" },
|
||||
{ "short: ", "%hi" },
|
||||
|
@ -407,8 +407,8 @@ static const char * eet_node_dump_t_name[14][2] = {
|
|||
|
||||
static void
|
||||
eet_node_dump_level(int level,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata)
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -416,10 +416,10 @@ eet_node_dump_level(int level,
|
|||
} /* eet_node_dump_level */
|
||||
|
||||
static char *
|
||||
eet_node_string_escape(const char * str)
|
||||
eet_node_string_escape(const char *str)
|
||||
{
|
||||
char * s, * sp;
|
||||
const char * strp;
|
||||
char *s, *sp;
|
||||
const char *strp;
|
||||
int sz = 0;
|
||||
|
||||
for (strp = str; *strp; strp++)
|
||||
|
@ -457,11 +457,11 @@ eet_node_string_escape(const char * str)
|
|||
} /* eet_node_string_escape */
|
||||
|
||||
static void
|
||||
eet_node_dump_string_escape(void * dumpdata,
|
||||
void dumpfunc(void * data, const char * str),
|
||||
const char * str)
|
||||
eet_node_dump_string_escape(void *dumpdata,
|
||||
void dumpfunc(void *data, const char *str),
|
||||
const char *str)
|
||||
{
|
||||
char * s;
|
||||
char *s;
|
||||
|
||||
s = eet_node_string_escape(str);
|
||||
if (!s)
|
||||
|
@ -472,11 +472,11 @@ eet_node_dump_string_escape(void * dumpdata,
|
|||
} /* eet_node_dump_string_escape */
|
||||
|
||||
static void
|
||||
eet_node_dump_simple_type(Eet_Node * n, int level,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata)
|
||||
eet_node_dump_simple_type(Eet_Node *n, int level,
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata)
|
||||
{
|
||||
const char * type_name = NULL;
|
||||
const char *type_name = NULL;
|
||||
char tbuf[256];
|
||||
|
||||
eet_node_dump_level(level, dumpfunc, dumpdata);
|
||||
|
@ -539,10 +539,10 @@ eet_node_dump_simple_type(Eet_Node * n, int level,
|
|||
|
||||
static void
|
||||
eet_node_dump_group_start(int level,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata,
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata,
|
||||
int group_type,
|
||||
const char * name)
|
||||
const char *name)
|
||||
{
|
||||
int chnk_type;
|
||||
|
||||
|
@ -560,20 +560,20 @@ eet_node_dump_group_start(int level,
|
|||
|
||||
static void
|
||||
eet_node_dump_group_end(int level,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata)
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata)
|
||||
{
|
||||
eet_node_dump_level(level, dumpfunc, dumpdata);
|
||||
dumpfunc(dumpdata, "}\n");
|
||||
} /* eet_node_dump_group_end */
|
||||
|
||||
void
|
||||
eet_node_dump(Eet_Node * n,
|
||||
eet_node_dump(Eet_Node *n,
|
||||
int dumplevel,
|
||||
void (* dumpfunc)(void * data, const char * str),
|
||||
void * dumpdata)
|
||||
void (*dumpfunc)(void *data, const char *str),
|
||||
void *dumpdata)
|
||||
{
|
||||
Eet_Node * it;
|
||||
Eet_Node *it;
|
||||
|
||||
if (!n)
|
||||
return;
|
||||
|
@ -637,11 +637,11 @@ void *
|
|||
eet_node_walk(void * parent,
|
||||
const char * name,
|
||||
Eet_Node * root,
|
||||
Eet_Node_Walk * cb,
|
||||
Eet_Node_Walk *cb,
|
||||
void * user_data)
|
||||
{
|
||||
Eet_Node * it;
|
||||
void * me = NULL;
|
||||
Eet_Node *it;
|
||||
void *me = NULL;
|
||||
int i;
|
||||
|
||||
if (!root)
|
||||
|
@ -724,8 +724,8 @@ eet_node_walk(void * parent,
|
|||
int
|
||||
eet_node_init(void)
|
||||
{
|
||||
const char * choice;
|
||||
const char * tmp;
|
||||
const char *choice;
|
||||
const char *tmp;
|
||||
|
||||
choice = "chained_mempool";
|
||||
tmp = getenv("EET_MEMPOOL");
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
#include "Eet_private.h"
|
||||
|
||||
int
|
||||
_eet_hash_gen(const char * key,
|
||||
_eet_hash_gen(const char *key,
|
||||
int hash_size)
|
||||
{
|
||||
int hash_num = 0;
|
||||
int value, i;
|
||||
int mask;
|
||||
unsigned char * ptr;
|
||||
unsigned char *ptr;
|
||||
|
||||
/* no string - index 0 */
|
||||
if (!key)
|
||||
|
|
Loading…
Reference in New Issue