diff --git a/legacy/eet/src/lib/Eet.h b/legacy/eet/src/lib/Eet.h index 96ebbeeb2f..74f3a2c415 100644 --- a/legacy/eet/src/lib/Eet.h +++ b/legacy/eet/src/lib/Eet.h @@ -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,8 +272,8 @@ 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, - size_t size); +EAPI Eet_File * eet_memopen_read(const void *data, + size_t size); /** * Get the mode an Eet_File was opened with. @@ -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,8 +346,8 @@ 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, - const char * string); +EAPI int eet_dictionary_string_check(Eet_Dictionary *ed, + const char * string); /** * Read a specified entry from an eet file and return data @@ -371,9 +371,9 @@ EAPI int eet_dictionary_string_check(Eet_Dictionary * ed, * @since 1.0.0 * @ingroup Eet_File_Group */ -EAPI void * eet_read(Eet_File * ef, - const char * name, - int * size_ret); +EAPI void * eet_read(Eet_File * ef, + const char *name, + int * size_ret); /** * Read a specified entry from an eet file and return data @@ -395,9 +395,9 @@ EAPI void * eet_read(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Group */ -EAPI const void * eet_read_direct(Eet_File * ef, - const char * name, - int * size_ret); +EAPI const void * eet_read_direct(Eet_File * ef, + const char *name, + int * size_ret); /** * Write a specified entry to an eet file handle @@ -427,11 +427,11 @@ EAPI const void * eet_read_direct(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Group */ -EAPI int eet_write(Eet_File * ef, - const char * name, - const void * data, - int size, - int compress); +EAPI int eet_write(Eet_File * ef, + const char *name, + const void *data, + int size, + int compress); /** * Delete a specified entry from an Eet file being written or re-written @@ -451,8 +451,8 @@ EAPI int eet_write(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Group */ -EAPI int eet_delete(Eet_File * ef, - const char * name); +EAPI int eet_delete(Eet_File * ef, + const char *name); /** * Alias a specific section to another one. Destination may exist or not, @@ -468,10 +468,10 @@ EAPI int eet_delete(Eet_File * ef, * @since 1.3.3 * @ingroup Eet_File_Group */ -EAPI Eina_Bool eet_alias(Eet_File * ef, - const char * name, - const char * destination, - int compress); +EAPI Eina_Bool eet_alias(Eet_File * ef, + const char *name, + const char *destination, + int compress); /** * List all entries in eet file matching shell glob. @@ -503,9 +503,9 @@ EAPI Eina_Bool eet_alias(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Group */ -EAPI char ** eet_list(Eet_File * ef, - const char * glob, - int * count_ret); +EAPI char ** eet_list(Eet_File * ef, + const char *glob, + int * count_ret); /** * Return the number of entries in the specified eet file. @@ -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 @@ -552,10 +552,10 @@ EAPI int eet_num_entries(Eet_File * ef); * @since 1.0.0 * @ingroup Eet_File_Cipher_Group */ -EAPI void * eet_read_cipher(Eet_File * ef, - const char * name, - int * size_ret, - const char * cipher_key); +EAPI void * eet_read_cipher(Eet_File * ef, + const char *name, + int * size_ret, + const char *cipher_key); /** * Write a specified entry to an eet file handle using a cipher. @@ -586,12 +586,12 @@ EAPI void * eet_read_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Cipher_Group */ -EAPI int eet_write_cipher(Eet_File * ef, - const char * name, - const void * data, - int size, - int compress, - const char * cipher_key); +EAPI int eet_write_cipher(Eet_File * ef, + const char *name, + const void *data, + int size, + int compress, + const char *cipher_key); /** * @defgroup Eet_File_Image_Group Image Store and Load @@ -636,14 +636,14 @@ EAPI int eet_write_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Image_Group */ -EAPI int eet_data_image_header_read(Eet_File * ef, - const char * name, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_header_read(Eet_File * ef, + const char * name, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Read image data from the named key in the eet file. @@ -683,14 +683,14 @@ EAPI int eet_data_image_header_read(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Image_Group */ -EAPI void * eet_data_image_read(Eet_File * ef, - const char * name, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI void * eet_data_image_read(Eet_File * ef, + const char * name, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Read image data from the named key in the eet file. @@ -732,18 +732,18 @@ EAPI void * eet_data_image_read(Eet_File * ef, * @since 1.0.2 * @ingroup Eet_File_Image_Group */ -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 w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * compress, - int * quality, - int * lossy); +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 w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Write image data to the named key in an eet file. @@ -826,14 +826,14 @@ EAPI int eet_data_image_write(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Image_Group */ -EAPI int eet_data_image_header_decode(const void * data, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_header_decode(const void * data, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Decode Image data into pixel data. @@ -873,14 +873,14 @@ EAPI int eet_data_image_header_decode(const void * data, * @since 1.0.0 * @ingroup Eet_File_Image_Group */ -EAPI void * eet_data_image_decode(const void * data, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI void * eet_data_image_decode(const void * data, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Decode Image data into pixel data. @@ -922,18 +922,18 @@ EAPI void * eet_data_image_decode(const void * data, * @since 1.0.2 * @ingroup Eet_File_Image_Group */ -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 w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * compress, - int * quality, - int * lossy); +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 w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Encode image data for storage or transmission. @@ -1026,15 +1026,15 @@ EAPI void * eet_data_image_encode(const void * data, * @since 1.0.0 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI int eet_data_image_header_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_header_read_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Read image data from the named key in the eet file using a cipher. @@ -1075,15 +1075,15 @@ EAPI int eet_data_image_header_read_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI void * eet_data_image_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI void * eet_data_image_read_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Read image data from the named key in the eet file using a cipher. @@ -1126,19 +1126,19 @@ EAPI void * eet_data_image_read_cipher(Eet_File * ef, * @since 1.0.2 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI int eet_data_image_read_to_surface_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int src_x, - unsigned int src_y, - unsigned int * d, - unsigned int w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_read_to_surface_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + unsigned int src_x, + unsigned int src_y, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Write image data to the named key in an eet file using a cipher. @@ -1224,15 +1224,15 @@ EAPI int eet_data_image_write_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI int eet_data_image_header_decode_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_header_decode_cipher(const void * data, + const char * cipher_key, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Decode Image data into pixel data using a cipher. @@ -1273,15 +1273,15 @@ EAPI int eet_data_image_header_decode_cipher(const void * data, * @since 1.0.0 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI void * eet_data_image_decode_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI void * eet_data_image_decode_cipher(const void * data, + const char * cipher_key, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Decode Image data into pixel data using a cipher. @@ -1324,19 +1324,19 @@ EAPI void * eet_data_image_decode_cipher(const void * data, * @since 1.0.2 * @ingroup Eet_File_Image_Cipher_Group */ -EAPI int eet_data_image_decode_to_surface_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int src_x, - unsigned int src_y, - unsigned int * d, - unsigned int w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * compress, - int * quality, - int * lossy); +EAPI int eet_data_image_decode_to_surface_cipher(const void * data, + const char * cipher_key, + int size, + unsigned int src_x, + unsigned int src_y, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * compress, + int * quality, + int * lossy); /** * Encode image data for storage or transmission using a cipher. @@ -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,8 +1465,8 @@ 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, - Eet_Key * key); +EAPI Eet_Error eet_identity_set(Eet_File *ef, + Eet_Key * key); /** * Display both private and public key of an Eet_Key. @@ -1477,8 +1477,8 @@ 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, - FILE * out); +EAPI void eet_identity_print(Eet_Key *key, + FILE * out); /** * Get the x509 der certificate associated with an Eet_File. Will return NULL @@ -1491,8 +1491,8 @@ 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, - int * der_length); +EAPI const void * eet_identity_x509(Eet_File *ef, + int * der_length); /** * Get the raw signature associated with an Eet_File. Will return NULL @@ -1504,8 +1504,8 @@ EAPI const void * eet_identity_x509(Eet_File * ef, * * @ingroup Eet_Cipher_Group */ -EAPI const void * eet_identity_signature(Eet_File * ef, - int * signature_length); +EAPI const void * eet_identity_signature(Eet_File *ef, + int * signature_length); /** * Get the SHA1 associated with a file. Could be the one used to @@ -1519,8 +1519,8 @@ 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, - int * sha1_length); +EAPI const void * eet_identity_sha1(Eet_File *ef, + int * sha1_length); /** * Display the x509 der certificate to out. @@ -1532,9 +1532,9 @@ 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, - int der_length, - FILE * out); +EAPI void eet_identity_certificate_print(const unsigned char *certificate, + int der_length, + FILE * out); /** * @defgroup Eet_Data_Group Eet Data Serialization @@ -1758,26 +1758,26 @@ 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 */ - int size; /**< Size in bytes of data type to be serialized */ + int version; /**< ABI version as #EET_DATA_DESCRIPTOR_CLASS_VERSION */ + 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 * dt, - void * fdt), void * fdt), - void *(*func_hash_add)(void * h, const char * k, void * d), - void (* func_hash_free)(void * h)); + 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)); /* * 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,9 +1913,9 @@ 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, - const char * name, - int size); +EAPI Eina_Bool eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, + const char * name, + int size); /** * This macro is an helper that set all the parameter of an @@ -1947,9 +1947,9 @@ 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, - const char * name, - int size); +EAPI Eina_Bool eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, + const char * name, + int size); /** * This macro is an helper that set all the parameter of an @@ -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,15 +2006,15 @@ 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, - const char * name, - int type, - int group_type, - int offset, +EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, + const char * name, + int type, + int group_type, + int offset, /* int count_offset, */ - int count, - const char * counter_name, - Eet_Data_Descriptor * subtype); + int count, + const char * counter_name, + Eet_Data_Descriptor *subtype); /** * Read a data structure from an eet file and decodes it. @@ -2043,9 +2043,9 @@ EAPI void eet_data_descriptor_element_add(Eet_Data_Descriptor * edd, * @since 1.0.0 * @ingroup Eet_Data_Group */ -EAPI void * eet_data_read(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name); +EAPI void * eet_data_read(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name); /** * Write a data structure from memory and store in an eet file. @@ -2064,11 +2064,11 @@ EAPI void * eet_data_read(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_Data_Group */ -EAPI int eet_data_write(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const void * data, - int compress); +EAPI int eet_data_write(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const void * data, + int compress); /** * Dump an eet encoded data structure into ascii text @@ -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,9 +2141,9 @@ 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, - int textlen, - int * size_ret); +EAPI void * eet_data_text_undump(const char *text, + int textlen, + int * size_ret); /** * Dump an eet encoded data structure from an eet file into ascii text @@ -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. @@ -2195,11 +2195,11 @@ EAPI int eet_data_dump(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_Data_Group */ -EAPI int eet_data_undump(Eet_File * ef, - const char * name, - const char * text, - int textlen, - int compress); +EAPI int eet_data_undump(Eet_File * ef, + const char *name, + const char *text, + int textlen, + int compress); /** * Decode a data structure from an arbitary location in memory. @@ -2228,9 +2228,9 @@ 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, - const void * data_in, - int size_in); +EAPI void * eet_data_descriptor_decode(Eet_Data_Descriptor *edd, + const void * data_in, + int size_in); /** * Encode a dsata struct to memory and return that encoded data. @@ -2261,9 +2261,9 @@ 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, - const void * data_in, - int * size_ret); +EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor *edd, + const void * data_in, + int * size_ret); /** * Add a basic data element to a data descriptor. @@ -2580,10 +2580,10 @@ EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor * edd, * @since 1.0.0 * @ingroup Eet_Data_Cipher_Group */ -EAPI void * eet_data_read_cipher(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const char * cipher_key); +EAPI void * eet_data_read_cipher(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const char * cipher_key); /** * Write a data structure from memory and store in an eet file @@ -2604,12 +2604,12 @@ EAPI void * eet_data_read_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_Data_Cipher_Group */ -EAPI int eet_data_write_cipher(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const char * cipher_key, - const void * data, - int compress); +EAPI int eet_data_write_cipher(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const char * cipher_key, + const void * data, + int compress); /** * Dump an eet encoded data structure into ascii text using a cipher. @@ -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,10 +2686,10 @@ 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, - int textlen, - int * size_ret); +EAPI void * eet_data_text_undump_cipher(const char *text, + const char *cipher_key, + int textlen, + int * size_ret); /** * Dump an eet encoded data structure from an eet file into ascii @@ -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 @@ -2746,12 +2746,12 @@ EAPI int eet_data_dump_cipher(Eet_File * ef, * @since 1.0.0 * @ingroup Eet_Data_Cipher_Group */ -EAPI int eet_data_undump_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - const char * text, - int textlen, - int compress); +EAPI int eet_data_undump_cipher(Eet_File * ef, + const char *name, + const char *cipher_key, + const char *text, + int textlen, + int compress); /** * Decode a data structure from an arbitary location in memory @@ -2782,10 +2782,10 @@ 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, - const void * data_in, - const char * cipher_key, - int size_in); +EAPI void * eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, + const void * data_in, + const char * cipher_key, + int size_in); /** * Encode a data struct to memory and return that encoded data @@ -2818,10 +2818,10 @@ 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, - const void * data_in, - const char * cipher_key, - int * size_ret); +EAPI void * eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, + const void * data_in, + const char * cipher_key, + int * size_ret); /** * @defgroup Eet_Node_Group Low-level Serialization Structures. @@ -2873,43 +2873,43 @@ struct _Eet_Node_Data * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI Eet_Node * eet_node_char_new(const char * name, - char c); +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, - short s); +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, - int i); +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, - long long l); +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, - float f); +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, - double d); +EAPI Eet_Node * eet_node_double_new(const char *name, + double d); /** * TODO FIX ME @@ -2943,139 +2943,139 @@ 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, - Eina_List * nodes); +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, - int count, - Eina_List * nodes); +EAPI Eet_Node * eet_node_array_new(const char *name, + int count, + Eina_List * nodes); /** * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI Eet_Node * eet_node_var_array_new(const char * name, - Eina_List * nodes); +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, - Eet_Node * node); +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, - Eina_List * nodes); +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, - Eet_Node * child); +EAPI Eet_Node * eet_node_struct_child_new(const char *parent, + Eet_Node * child); /** * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI void eet_node_list_append(Eet_Node * parent, - const char * name, - Eet_Node * child); +EAPI void eet_node_list_append(Eet_Node * parent, + const char *name, + Eet_Node * child); /** * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI void eet_node_struct_append(Eet_Node * parent, - const char * name, - Eet_Node * child); +EAPI void eet_node_struct_append(Eet_Node * parent, + const char *name, + Eet_Node * child); /** * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI void eet_node_hash_add(Eet_Node * parent, - const char * name, - const char * key, - Eet_Node * child); +EAPI void eet_node_hash_add(Eet_Node * parent, + 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, - int * size_ret); +EAPI void * eet_data_node_encode_cipher(Eet_Node * node, + 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, - int size_in); +EAPI Eet_Node * eet_data_node_decode_cipher(const void *data_in, + const char *cipher_key, + int size_in); /** * TODO FIX ME * @ingroup Eet_Node_Group */ -EAPI Eet_Node * eet_data_node_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key); +EAPI Eet_Node * eet_data_node_read_cipher(Eet_File * ef, + 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, - Eet_Node * node, - int compress); +EAPI int eet_data_node_write_cipher(Eet_File * ef, + const char *name, + const char *cipher_key, + Eet_Node * node, + int compress); /* EXPERIMENTAL: THIS API MAY CHANGE IN THE FUTURE, USE IT ONLY IF YOU KNOW WHAT YOU ARE DOING. */ @@ -3091,21 +3091,21 @@ 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, - void * user_data); +EAPI void * eet_node_walk(void * parent, + const char * name, + Eet_Node * root, + 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. @@ -3152,9 +3152,9 @@ typedef Eina_Bool Eet_Write_Cb (const void * data, size_t size, v * @since 1.2.4 * @ingroup Eet_Connection_Group */ -EAPI Eet_Connection * eet_connection_new(Eet_Read_Cb * eet_read_cb, - Eet_Write_Cb * eet_write_cb, - const void * user_data); +EAPI Eet_Connection * eet_connection_new(Eet_Read_Cb * eet_read_cb, + Eet_Write_Cb *eet_write_cb, + const void * user_data); /** * Process a raw packet received over the link @@ -3170,9 +3170,9 @@ 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, - const void * data, - size_t size); +EAPI int eet_connection_received(Eet_Connection *conn, + const void * data, + size_t size); /** * Convert a complex structure and prepare it to be send. @@ -3191,10 +3191,10 @@ EAPI int eet_connection_received(Eet_Connection * conn, * @since 1.2.4 * @ingroup Eet_Connection_Group */ -EAPI Eina_Bool eet_connection_send(Eet_Connection * conn, - Eet_Data_Descriptor * edd, - const void * data_in, - const char * cipher_key); +EAPI Eina_Bool eet_connection_send(Eet_Connection * conn, + Eet_Data_Descriptor *edd, + const void * data_in, + const char * cipher_key); /** * Convert a Eet_Node tree and prepare it to be send. @@ -3212,9 +3212,9 @@ 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, - Eet_Node * node, - const char * cipher_key); +EAPI Eina_Bool eet_connection_node_send(Eet_Connection *conn, + Eet_Node * node, + const char * cipher_key); /** * Close a connection and lost its track. @@ -3225,8 +3225,8 @@ 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, - Eina_Bool * on_going); +EAPI void * eet_connection_close(Eet_Connection *conn, + Eina_Bool * on_going); /***************************************************************************/ diff --git a/legacy/eet/src/lib/Eet_private.h b/legacy/eet/src/lib/Eet_private.h index 9e2221f1a4..fdb4d70d84 100644 --- a/legacy/eet/src/lib/Eet_private.h +++ b/legacy/eet/src/lib/Eet_private.h @@ -38,18 +38,18 @@ struct _Eet_String }; struct _Eet_Dictionary { - Eet_String * all; + Eet_String *all; - int size; - int offset; + int size; + int offset; - int hash[256]; + int hash[256]; - int count; - int total; + int count; + int total; - const char * start; - const char * end; + const char *start; + const char *end; }; struct _Eet_Node @@ -100,60 +100,60 @@ 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, - const char * string); -int eet_dictionary_string_get_size(const Eet_Dictionary * ed, - int index); -const char * eet_dictionary_string_get_char(const Eet_Dictionary * ed, - int index); -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, - int index, - double * result); -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 index); +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 index); +const char * eet_dictionary_string_get_char(const Eet_Dictionary *ed, + int index); +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, + int index, + double * result); +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 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, - void ** sha1, - int * sha1_length, - const void * signature_base, - unsigned int signature_length, - const void ** raw_signature_base, - unsigned int * raw_signature_length, - int * x509_length); +const void * eet_identity_check(const void * data_base, + unsigned int data_length, + void ** sha1, + int * sha1_length, + const void * signature_base, + unsigned int signature_length, + const void ** raw_signature_base, + unsigned int *raw_signature_length, + int * x509_length); void * eet_identity_compute_sha1(const void * data_base, unsigned int data_length, int * sha1_length); -Eet_Error eet_cipher(const void * data, - unsigned int size, - const char * key, - unsigned int length, - void ** result, - 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); -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_Error eet_cipher(const void * data, + unsigned int size, + const char * key, + unsigned int length, + void ** result, + 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); +Eet_Error eet_identity_sign(FILE * fp, + 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 diff --git a/legacy/eet/src/lib/eet_cipher.c b/legacy/eet/src/lib/eet_cipher.c index bc60e603e6..4161252723 100644 --- a/legacy/eet/src/lib/eet_cipher.c +++ b/legacy/eet/src/lib/eet_cipher.c @@ -80,19 +80,19 @@ void * alloca (size_t); #ifdef HAVE_CIPHER # ifdef HAVE_GNUTLS -static Eet_Error eet_hmac_sha1(const void * key, - size_t key_len, - const void * data, - size_t data_len, - unsigned char * res); +static Eet_Error eet_hmac_sha1(const void * key, + size_t key_len, + const void * data, + size_t data_len, + unsigned char *res); # endif /* ifdef HAVE_GNUTLS */ -static Eet_Error eet_pbkdf2_sha1(const char * key, - int key_len, - const unsigned char * salt, - unsigned int salt_len, - int iter, - unsigned char * res, - int res_len); +static Eet_Error eet_pbkdf2_sha1(const char * key, + int key_len, + const unsigned char *salt, + unsigned int salt_len, + int iter, + unsigned char * res, + int res_len); #endif /* ifdef HAVE_CIPHER */ struct _Eet_Key @@ -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, - FILE * out) +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 @@ -481,17 +481,17 @@ eet_identity_compute_sha1(const void * data_base, } /* eet_identity_compute_sha1 */ Eet_Error -eet_identity_sign(FILE * fp, - Eet_Key * key) +eet_identity_sign(FILE * fp, + 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; @@ -647,20 +647,20 @@ on_error: } /* eet_identity_sign */ const void * -eet_identity_check(const void * data_base, - unsigned int data_length, - void ** sha1, - int * sha1_length, - const void * signature_base, - unsigned int signature_length, - const void ** raw_signature_base, - unsigned int * raw_signature_length, - int * x509_length) +eet_identity_check(const void * data_base, + unsigned int data_length, + void ** sha1, + int * sha1_length, + const void * signature_base, + unsigned int signature_length, + const void ** raw_signature_base, + 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,9 +818,9 @@ eet_identity_check(const void * data_base, } /* eet_identity_check */ EAPI void -eet_identity_certificate_print(const unsigned char * certificate, - int der_length, - FILE * out) +eet_identity_certificate_print(const unsigned char *certificate, + int der_length, + FILE * out) { #ifdef HAVE_SIGNATURE if (!certificate || !out || der_length <= 0) @@ -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); @@ -881,16 +881,16 @@ on_error: } /* eet_identity_certificate_print */ Eet_Error -eet_cipher(const void * data, - unsigned int size, - const char * key, - unsigned int length, - void ** result, - unsigned int * result_length) +eet_cipher(const void * data, + unsigned int size, + const char * key, + unsigned int length, + void ** result, + 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 */ @@ -1058,16 +1058,16 @@ on_error: } /* eet_cipher */ Eet_Error -eet_decipher(const void * data, - unsigned int size, - const char * key, - unsigned int length, - void ** result, - unsigned int * result_length) +eet_decipher(const void * data, + unsigned int size, + const char * key, + unsigned int length, + void ** result, + 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]; @@ -1211,15 +1211,15 @@ on_error: #ifdef HAVE_CIPHER # ifdef HAVE_GNUTLS static Eet_Error -eet_hmac_sha1(const void * key, - size_t key_len, - const void * data, - size_t data_len, - unsigned char * res) +eet_hmac_sha1(const void * key, + size_t key_len, + const void * data, + size_t data_len, + 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); @@ -1252,18 +1252,18 @@ eet_hmac_sha1(const void * key, # endif /* ifdef HAVE_GNUTLS */ static Eet_Error -eet_pbkdf2_sha1(const char * key, - int key_len, - const unsigned char * salt, - unsigned int salt_len, - int iter, - unsigned char * res, - int res_len) +eet_pbkdf2_sha1(const char * key, + int key_len, + const unsigned char *salt, + unsigned int salt_len, + int iter, + unsigned char * res, + int res_len) { 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; diff --git a/legacy/eet/src/lib/eet_connection.c b/legacy/eet/src/lib/eet_connection.c index 66b4911636..474cccb162 100644 --- a/legacy/eet/src/lib/eet_connection.c +++ b/legacy/eet/src/lib/eet_connection.c @@ -50,23 +50,23 @@ struct _Eet_Message struct _Eet_Connection { - Eet_Read_Cb * eet_read_cb; - Eet_Write_Cb * eet_write_cb; - void * user_data; + Eet_Read_Cb * eet_read_cb; + Eet_Write_Cb *eet_write_cb; + void * user_data; - size_t allocated; - size_t size; - size_t received; + size_t allocated; + size_t size; + size_t received; - void * buffer; + void * buffer; }; EAPI Eet_Connection * -eet_connection_new(Eet_Read_Cb * eet_read_cb, - Eet_Write_Cb * eet_write_cb, - const void * user_data) +eet_connection_new(Eet_Read_Cb * eet_read_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,9 +83,9 @@ eet_connection_new(Eet_Read_Cb * eet_read_cb, } /* eet_connection_new */ EAPI int -eet_connection_received(Eet_Connection * conn, - const void * data, - size_t size) +eet_connection_received(Eet_Connection *conn, + const void * data, + size_t size) { if ((!conn) || (!data) || (!size)) return 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, - void * data, - int data_size) +_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) @@ -195,12 +195,12 @@ _eet_connection_raw_send(Eet_Connection * conn, } /* _eet_connection_raw_send */ EAPI Eina_Bool -eet_connection_send(Eet_Connection * conn, - Eet_Data_Descriptor * edd, - const void * data_in, - const char * cipher_key) +eet_connection_send(Eet_Connection * conn, + 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_Node * node, - const char * cipher_key) +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, - Eina_Bool * on_going) +eet_connection_close(Eet_Connection *conn, + Eina_Bool * on_going) { - void * user_data; + void *user_data; if (!conn) return NULL; diff --git a/legacy/eet/src/lib/eet_data.c b/legacy/eet/src/lib/eet_data.c index bf774e409e..a2bf2eaa05 100644 --- a/legacy/eet/src/lib/eet_data.c +++ b/legacy/eet/src/lib/eet_data.c @@ -84,16 +84,16 @@ typedef struct _Eet_Variant_Unknow Eet_Variant_Unknow; */ struct _Eet_Data_Basic_Type_Codec { - int size; - const char * name; - int (* get)(const Eet_Dictionary * ed, const void * src, const void * src_end, void * dest); - void * (* put)(Eet_Dictionary * ed, const void * src, int * size_ret); + int size; + const char *name; + int (*get)(const Eet_Dictionary *ed, const void *src, const void *src_end, void *dest); + void * (*put)(Eet_Dictionary *ed, const void *src, int *size_ret); }; struct _Eet_Data_Group_Type_Codec { - int (* get)(Eet_Free_Context * context, const Eet_Dictionary * ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, Eet_Data_Chunk * echnk, int type, int group_type, void * data_in, char ** p, int * size); - void (* put)(Eet_Dictionary * ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, Eet_Data_Stream * ds, void * data_in); + int (*get)(Eet_Free_Context *context, const Eet_Dictionary *ed, Eet_Data_Descriptor *edd, Eet_Data_Element *ede, Eet_Data_Chunk *echnk, int type, int group_type, void *data_in, char **p, int *size); + void (*put)(Eet_Dictionary *ed, Eet_Data_Descriptor *edd, Eet_Data_Element *ede, Eet_Data_Stream *ds, void *data_in); }; struct _Eet_Data_Chunk @@ -109,48 +109,48 @@ struct _Eet_Data_Chunk struct _Eet_Data_Stream { - void * data; - int size; - int pos; + void *data; + int size; + int pos; }; struct _Eet_Data_Descriptor_Hash { - Eet_Data_Element * element; - Eet_Data_Descriptor_Hash * next; + Eet_Data_Element * element; + Eet_Data_Descriptor_Hash *next; }; struct _Eet_Data_Descriptor { - const char * name; - const Eet_Dictionary * ed; - int size; + const char * name; + const Eet_Dictionary *ed; + int size; struct { - void * (* mem_alloc)(size_t size); - void (* mem_free)(void * mem); - char * (* str_alloc)(const char * str); - char * (* str_direct_alloc)(const char * str); - void (* str_free)(const char * str); - void (* str_direct_free)(const char * str); - void * (* list_next)(void * l); - void * (* list_append)(void * l, void * d); - void * (* list_data)(void * l); - void * (* list_free)(void * l); - void (* hash_foreach)(void * h, int (* func)(void * h, const char * k, void * dt, void * fdt), void * fdt); - void * (* hash_add)(void * h, const char * k, void * d); - void (* hash_free)(void * h); - const char *(* type_get)(const void * data, Eina_Bool * unknow); - Eina_Bool (* type_set)(const char * type, void * data, Eina_Bool unknow); + void * (*mem_alloc)(size_t size); + void (*mem_free)(void *mem); + char * (*str_alloc)(const char *str); + char * (*str_direct_alloc)(const char *str); + void (*str_free)(const char *str); + void (*str_direct_free)(const char *str); + void * (*list_next)(void *l); + void * (*list_append)(void *l, void *d); + void * (*list_data)(void *l); + void * (*list_free)(void *l); + void (*hash_foreach)(void *h, int (*func)(void *h, const char *k, void *dt, void *fdt), void *fdt); + void * (*hash_add)(void *h, const char *k, void *d); + void (*hash_free)(void *h); + const char *(*type_get)(const void *data, Eina_Bool *unknow); + Eina_Bool (*type_set)(const char *type, void *data, Eina_Bool unknow); } func; struct { - int num; - Eet_Data_Element * set; + int num; + Eet_Data_Element *set; struct { - int size; - Eet_Data_Descriptor_Hash * buckets; + int size; + Eet_Data_Descriptor_Hash *buckets; } hash; } elements; @@ -161,30 +161,30 @@ struct _Eet_Data_Descriptor struct _Eet_Data_Element { - const char * name; - const char * counter_name; - const char * directory_name_ptr; - Eet_Data_Descriptor * subtype; - int offset; /* offset in bytes from the base element */ - int count; /* number of elements for a fixed array */ - int counter_offset; /* for a variable array we need the offset of the count variable */ - unsigned char type; /* EET_T_XXX */ - unsigned char group_type; /* EET_G_XXX */ + const char * name; + const char * counter_name; + const char * directory_name_ptr; + Eet_Data_Descriptor *subtype; + int offset; /* offset in bytes from the base element */ + int count; /* number of elements for a fixed array */ + int counter_offset; /* for a variable array we need the offset of the count variable */ + unsigned char type; /* EET_T_XXX */ + unsigned char group_type; /* EET_G_XXX */ }; struct _Eet_Data_Encode_Hash_Info { - Eet_Data_Stream * ds; - Eet_Data_Element * ede; - Eet_Dictionary * ed; + Eet_Data_Stream * ds; + Eet_Data_Element *ede; + Eet_Dictionary * ed; }; struct _Eet_Free { - int ref; - int len[256]; - int num[256]; - void ** list[256]; + int ref; + int len[256]; + int num[256]; + void **list[256]; }; struct _Eet_Free_Context @@ -206,230 +206,230 @@ struct _Eet_Variant_Unknow /*---*/ -static int eet_data_get_char(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_char(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_short(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_short(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static inline int eet_data_get_int(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_int(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_long_long(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_long_long(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_float(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_float(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_double(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_double(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_f32p32(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_f32p32(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_f16p16(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_f16p16(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_f8p24(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_f8p24(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static inline int eet_data_get_string(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_string(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_istring(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_istring(Eet_Dictionary * ed, - const void * src, - int * size_ret); -static int eet_data_get_null(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_null(Eet_Dictionary * ed, - const void * src, - int * size_ret); +static int eet_data_get_char(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_char(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_short(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_short(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static inline int eet_data_get_int(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_int(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_long_long(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_long_long(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_float(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_float(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_double(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_double(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_f32p32(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_f32p32(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_f16p16(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_f16p16(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_f8p24(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_f8p24(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static inline int eet_data_get_string(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_string(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_istring(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_istring(Eet_Dictionary *ed, + const void * src, + int * size_ret); +static int eet_data_get_null(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_null(Eet_Dictionary *ed, + const void * src, + int * size_ret); -static int eet_data_get_type(const Eet_Dictionary * ed, - int type, - const void * src, - const void * src_end, - void * dest); -static void * eet_data_put_type(Eet_Dictionary * ed, - int type, - const void * src, - int * size_ret); +static int eet_data_get_type(const Eet_Dictionary *ed, + int type, + const void * src, + const void * src_end, + void * dest); +static void * eet_data_put_type(Eet_Dictionary *ed, + int type, + const void * src, + int * size_ret); -static Eet_Node * eet_data_node_simple_type(int type, - const char * name, - void * dd); +static Eet_Node * eet_data_node_simple_type(int type, + const char *name, + void * dd); -static int eet_data_get_unknown(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data_in, - char ** p, - int * size); -static void eet_data_put_unknown(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static void eet_data_put_array(Eet_Dictionary * ed, +static int eet_data_get_unknown(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data_in, + char ** p, + int * size); +static void eet_data_put_unknown(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static void eet_data_put_array(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static int eet_data_get_array(Eet_Free_Context * context, + const Eet_Dictionary *ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static int eet_data_get_array(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size); -static int eet_data_get_list(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data_in, - char ** p, - int * size); -static void eet_data_put_list(Eet_Dictionary * ed, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size); +static int eet_data_get_list(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data_in, + char ** p, + int * size); +static void eet_data_put_list(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static void eet_data_put_hash(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static int eet_data_get_hash(Eet_Free_Context * context, + const Eet_Dictionary *ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static void eet_data_put_hash(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static int eet_data_get_hash(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size); -static void eet_data_put_union(Eet_Dictionary * ed, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size); +static void eet_data_put_union(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static int eet_data_get_union(Eet_Free_Context * context, + const Eet_Dictionary *ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static int eet_data_get_union(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size); -static void eet_data_put_variant(Eet_Dictionary * ed, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size); +static void eet_data_put_variant(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in); +static int eet_data_get_variant(Eet_Free_Context * context, + const Eet_Dictionary *ed, Eet_Data_Descriptor * edd, Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in); -static int eet_data_get_variant(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size); + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size); -static void eet_data_chunk_get(const Eet_Dictionary * ed, - Eet_Data_Chunk * chnk, - const void * src, - int size); -static Eet_Data_Chunk * eet_data_chunk_new(void * data, - int size, - const char * name, - int type, - int group_type); -static void eet_data_chunk_free(Eet_Data_Chunk * chnk); +static void eet_data_chunk_get(const Eet_Dictionary *ed, + Eet_Data_Chunk * chnk, + const void * src, + int size); +static Eet_Data_Chunk * eet_data_chunk_new(void * data, + int size, + const char *name, + int type, + int group_type); +static void eet_data_chunk_free(Eet_Data_Chunk *chnk); static Eet_Data_Stream * eet_data_stream_new(void); -static void eet_data_stream_write(Eet_Data_Stream * ds, - const void * data, - int size); -static void eet_data_stream_free(Eet_Data_Stream * ds); +static void eet_data_stream_write(Eet_Data_Stream *ds, + const void * data, + int size); +static void eet_data_stream_free(Eet_Data_Stream *ds); -static void eet_data_chunk_put(Eet_Dictionary * ed, - Eet_Data_Chunk * chnk, - Eet_Data_Stream * ds); +static void eet_data_chunk_put(Eet_Dictionary * ed, + Eet_Data_Chunk * chnk, + Eet_Data_Stream *ds); -static int eet_data_descriptor_encode_hash_cb(void * hash, - const char * key, - void * hdata, - void * fdata); -static void * _eet_data_descriptor_encode(Eet_Dictionary * ed, +static int eet_data_descriptor_encode_hash_cb(void * hash, + const char *key, + void * hdata, + void * fdata); +static void * _eet_data_descriptor_encode(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + const void * data_in, + int * size_ret); +static void * _eet_data_descriptor_decode(Eet_Free_Context * context, + const Eet_Dictionary *ed, Eet_Data_Descriptor * edd, const void * data_in, - int * size_ret); -static void * _eet_data_descriptor_decode(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - const void * data_in, - int size_in); + int size_in); /*---*/ @@ -547,12 +547,12 @@ static int _eet_data_words_bigendian = -1; /* CHAR TYPE */ static int -eet_data_get_char(const Eet_Dictionary * ed __UNUSED__, - const void * src, - const void * src_end, - void * dst) +eet_data_get_char(const Eet_Dictionary *ed __UNUSED__, + const void * src, + const void * src_end, + void * dst) { - char * s, * d; + char *s, *d; if (((char *)src + sizeof(char)) > (char *)src_end) return -1; @@ -565,11 +565,11 @@ eet_data_get_char(const Eet_Dictionary * ed __UNUSED__, } /* eet_data_get_char */ static void * -eet_data_put_char(Eet_Dictionary * ed __UNUSED__, - const void * src, - int * size_ret) +eet_data_put_char(Eet_Dictionary *ed __UNUSED__, + const void * src, + int * size_ret) { - char * s, * d; + char *s, *d; d = (char *)malloc(sizeof(char)); if (!d) @@ -584,12 +584,12 @@ eet_data_put_char(Eet_Dictionary * ed __UNUSED__, /* SHORT TYPE */ static int -eet_data_get_short(const Eet_Dictionary * ed __UNUSED__, - const void * src, - const void * src_end, - void * dst) +eet_data_get_short(const Eet_Dictionary *ed __UNUSED__, + const void * src, + const void * src_end, + void * dst) { - short * d; + short *d; if (((char *)src + sizeof(short)) > (char *)src_end) return -1; @@ -601,11 +601,11 @@ eet_data_get_short(const Eet_Dictionary * ed __UNUSED__, } /* eet_data_get_short */ static void * -eet_data_put_short(Eet_Dictionary * ed __UNUSED__, - const void * src, - int * size_ret) +eet_data_put_short(Eet_Dictionary *ed __UNUSED__, + const void * src, + int * size_ret) { - short * s, * d; + short *s, *d; d = (short *)malloc(sizeof(short)); if (!d) @@ -620,12 +620,12 @@ eet_data_put_short(Eet_Dictionary * ed __UNUSED__, /* INT TYPE */ static inline int -eet_data_get_int(const Eet_Dictionary * ed __UNUSED__, - const void * src, - const void * src_end, - void * dst) +eet_data_get_int(const Eet_Dictionary *ed __UNUSED__, + const void * src, + const void * src_end, + void * dst) { - int * d; + int *d; if (((char *)src + sizeof(int)) > (char *)src_end) return -1; @@ -637,11 +637,11 @@ eet_data_get_int(const Eet_Dictionary * ed __UNUSED__, } /* eet_data_get_int */ static void * -eet_data_put_int(Eet_Dictionary * ed __UNUSED__, - const void * src, - int * size_ret) +eet_data_put_int(Eet_Dictionary *ed __UNUSED__, + const void * src, + int * size_ret) { - int * s, * d; + int *s, *d; d = (int *)malloc(sizeof(int)); if (!d) @@ -656,12 +656,12 @@ eet_data_put_int(Eet_Dictionary * ed __UNUSED__, /* LONG LONG TYPE */ static int -eet_data_get_long_long(const Eet_Dictionary * ed __UNUSED__, - const void * src, - const void * src_end, - void * dst) +eet_data_get_long_long(const Eet_Dictionary *ed __UNUSED__, + const void * src, + const void * src_end, + void * dst) { - unsigned long long * d; + unsigned long long *d; if (((char *)src + sizeof(unsigned long long)) > (char *)src_end) return -1; @@ -673,11 +673,11 @@ eet_data_get_long_long(const Eet_Dictionary * ed __UNUSED__, } /* eet_data_get_long_long */ static void * -eet_data_put_long_long(Eet_Dictionary * ed __UNUSED__, - const void * src, - int * size_ret) +eet_data_put_long_long(Eet_Dictionary *ed __UNUSED__, + const void * src, + int * size_ret) { - unsigned long long * s, * d; + unsigned long long *s, *d; d = (unsigned long long *)malloc(sizeof(unsigned long long)); if (!d) @@ -692,9 +692,9 @@ eet_data_put_long_long(Eet_Dictionary * ed __UNUSED__, /* STRING TYPE */ static inline int -eet_data_get_string_hash(const Eet_Dictionary * ed, - const void * src, - const void * src_end) +eet_data_get_string_hash(const Eet_Dictionary *ed, + const void * src, + const void * src_end) { if (ed) { @@ -710,18 +710,18 @@ eet_data_get_string_hash(const Eet_Dictionary * ed, } /* eet_data_get_string_hash */ static inline int -eet_data_get_string(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_string(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { - char * s, ** d; + char *s, **d; d = (char **)dst; if (ed) { - const char * str; + const char *str; int idx; if (eet_data_get_int(ed, src, src_end, &idx) < 0) @@ -747,16 +747,16 @@ eet_data_get_string(const Eet_Dictionary * ed, } /* eet_data_get_string */ static void * -eet_data_put_string(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_string(Eet_Dictionary *ed, + const void * src, + int * size_ret) { - char * s, * d; + char *s, *d; int len; if (ed) { - const char * str; + const char *str; int idx; str = *((const char **)src); @@ -786,30 +786,30 @@ eet_data_put_string(Eet_Dictionary * ed, /* ALWAYS INLINED STRING TYPE */ static int -eet_data_get_istring(const Eet_Dictionary * ed __UNUSED__, - const void * src, - const void * src_end, - void * dst) +eet_data_get_istring(const Eet_Dictionary *ed __UNUSED__, + const void * src, + const void * src_end, + void * dst) { return eet_data_get_string(NULL, src, src_end, dst); } /* eet_data_get_istring */ static void * -eet_data_put_istring(Eet_Dictionary * ed __UNUSED__, - const void * src, - int * size_ret) +eet_data_put_istring(Eet_Dictionary *ed __UNUSED__, + const void * src, + int * size_ret) { return eet_data_put_string(NULL, src, size_ret); } /* eet_data_put_istring */ /* ALWAYS NULL TYPE */ static int -eet_data_get_null(const Eet_Dictionary * ed __UNUSED__, - const void * src __UNUSED__, - const void * src_end __UNUSED__, - void * dst) +eet_data_get_null(const Eet_Dictionary *ed __UNUSED__, + const void *src __UNUSED__, + const void *src_end __UNUSED__, + void * dst) { - char ** d; + char **d; d = (char **)dst; @@ -818,9 +818,9 @@ eet_data_get_null(const Eet_Dictionary * ed __UNUSED__, } /* eet_data_get_null */ static void * -eet_data_put_null(Eet_Dictionary * ed __UNUSED__, - const void * src __UNUSED__, - int * size_ret) +eet_data_put_null(Eet_Dictionary *ed __UNUSED__, + const void *src __UNUSED__, + int * size_ret) { *size_ret = 0; return NULL; @@ -833,9 +833,9 @@ eet_data_put_null(Eet_Dictionary * ed __UNUSED__, * values, but have a so simple math that is almost as fast. */ static inline int -_eet_data_float_cache_get(const char * s, - int len, - float * d) +_eet_data_float_cache_get(const char *s, + int len, + float * d) { /* fast handle of simple case 0xMp+E*/ if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p')) @@ -855,9 +855,9 @@ _eet_data_float_cache_get(const char * s, } /* _eet_data_float_cache_get */ static inline int -_eet_data_double_cache_get(const char * s, - int len, - double * d) +_eet_data_double_cache_get(const char *s, + int len, + double * d) { /* fast handle of simple case 0xMp+E*/ if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p')) @@ -878,18 +878,18 @@ _eet_data_double_cache_get(const char * s, /* FLOAT TYPE */ static int -eet_data_get_float(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_float(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { - float * d; + float *d; int idx; d = (float *)dst; if (!ed) { - const char * s, * p; + const char *s, *p; long long mantisse; long exponent; int len; @@ -920,9 +920,9 @@ eet_data_get_float(const Eet_Dictionary * ed, } /* eet_data_get_float */ static void * -eet_data_put_float(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_float(Eet_Dictionary *ed, + const void * src, + int * size_ret) { char buf[128]; int idx; @@ -931,7 +931,7 @@ eet_data_put_float(Eet_Dictionary * ed, if (!ed) { - char * d; + char *d; int len; len = strlen(buf); @@ -953,19 +953,19 @@ eet_data_put_float(Eet_Dictionary * ed, /* DOUBLE TYPE */ static int -eet_data_get_double(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_double(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { - double * d; + double *d; int idx; d = (double *)dst; if (!ed) { - const char * s, * p; + const char *s, *p; long long mantisse = 0; long exponent = 0; int len; @@ -996,9 +996,9 @@ eet_data_get_double(const Eet_Dictionary * ed, } /* eet_data_get_double */ static void * -eet_data_put_double(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_double(Eet_Dictionary *ed, + const void * src, + int * size_ret) { char buf[128]; int idx; @@ -1007,7 +1007,7 @@ eet_data_put_double(Eet_Dictionary * ed, if (!ed) { - char * d; + char *d; int len; len = strlen(buf); @@ -1029,19 +1029,19 @@ eet_data_put_double(Eet_Dictionary * ed, } /* eet_data_put_double */ static int -eet_data_get_f32p32(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_f32p32(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { - Eina_F32p32 * fp; + Eina_F32p32 *fp; int idx; fp = (Eina_F32p32 *)dst; if (!ed) { - const char * s, * p; + const char *s, *p; int len; s = (const char *)src; @@ -1065,9 +1065,9 @@ eet_data_get_f32p32(const Eet_Dictionary * ed, } /* eet_data_get_f32p32 */ static void * -eet_data_put_f32p32(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_f32p32(Eet_Dictionary *ed, + const void * src, + int * size_ret) { char buf[128]; int idx; @@ -1076,7 +1076,7 @@ eet_data_put_f32p32(Eet_Dictionary * ed, if (!ed) { - char * d; + char *d; int len; len = strlen(buf); @@ -1098,13 +1098,13 @@ eet_data_put_f32p32(Eet_Dictionary * ed, } /* eet_data_put_f32p32 */ static int -eet_data_get_f16p16(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_f16p16(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { Eina_F32p32 tmp; - Eina_F16p16 * fp; + Eina_F16p16 *fp; fp = (Eina_F16p16 *)dst; @@ -1116,9 +1116,9 @@ eet_data_get_f16p16(const Eet_Dictionary * ed, } /* eet_data_get_f16p16 */ static void * -eet_data_put_f16p16(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_f16p16(Eet_Dictionary *ed, + const void * src, + int * size_ret) { Eina_F32p32 tmp; @@ -1127,13 +1127,13 @@ eet_data_put_f16p16(Eet_Dictionary * ed, } /* eet_data_put_f16p16 */ static int -eet_data_get_f8p24(const Eet_Dictionary * ed, - const void * src, - const void * src_end, - void * dst) +eet_data_get_f8p24(const Eet_Dictionary *ed, + const void * src, + const void * src_end, + void * dst) { Eina_F32p32 tmp; - Eina_F8p24 * fp; + Eina_F8p24 *fp; fp = (Eina_F8p24 *)dst; @@ -1145,9 +1145,9 @@ eet_data_get_f8p24(const Eet_Dictionary * ed, } /* eet_data_get_f8p24 */ static void * -eet_data_put_f8p24(Eet_Dictionary * ed, - const void * src, - int * size_ret) +eet_data_put_f8p24(Eet_Dictionary *ed, + const void * src, + int * size_ret) { Eina_F32p32 tmp; @@ -1156,11 +1156,11 @@ eet_data_put_f8p24(Eet_Dictionary * ed, } /* eet_data_put_f8p24 */ static inline int -eet_data_get_type(const Eet_Dictionary * ed, - int type, - const void * src, - const void * src_end, - void * dest) +eet_data_get_type(const Eet_Dictionary *ed, + int type, + const void * src, + const void * src_end, + void * dest) { int ret; @@ -1169,12 +1169,12 @@ eet_data_get_type(const Eet_Dictionary * ed, } /* eet_data_get_type */ static inline void * -eet_data_put_type(Eet_Dictionary * ed, - int type, - const void * src, - int * size_ret) +eet_data_put_type(Eet_Dictionary *ed, + int type, + const void * src, + int * size_ret) { - void * ret; + void *ret; ret = eet_basic_codec[type - 1].put(ed, src, size_ret); return ret; @@ -1231,12 +1231,12 @@ eet_data_type_match(int type1, */ static inline void -eet_data_chunk_get(const Eet_Dictionary * ed, - Eet_Data_Chunk * chnk, - const void * src, - int size) +eet_data_chunk_get(const Eet_Dictionary *ed, + Eet_Data_Chunk * chnk, + const void * src, + int size) { - const char * s; + const char *s; int ret1, ret2; if (!src) @@ -1323,13 +1323,13 @@ eet_data_chunk_get(const Eet_Dictionary * ed, } /* eet_data_chunk_get */ static inline Eet_Data_Chunk * -eet_data_chunk_new(void * data, - int size, - const char * name, - int type, - int group_type) +eet_data_chunk_new(void * data, + int size, + const char *name, + int type, + int group_type) { - Eet_Data_Chunk * chnk; + Eet_Data_Chunk *chnk; if (!name) return NULL; @@ -1355,7 +1355,7 @@ eet_data_chunk_new(void * data, } /* eet_data_chunk_new */ static inline void -eet_data_chunk_free(Eet_Data_Chunk * chnk) +eet_data_chunk_free(Eet_Data_Chunk *chnk) { if (chnk->name) free(chnk->name); @@ -1366,7 +1366,7 @@ eet_data_chunk_free(Eet_Data_Chunk * chnk) static inline Eet_Data_Stream * eet_data_stream_new(void) { - Eet_Data_Stream * ds; + Eet_Data_Stream *ds; ds = calloc(1, sizeof(Eet_Data_Stream)); if (!ds) @@ -1376,7 +1376,7 @@ eet_data_stream_new(void) } /* eet_data_stream_new */ static inline void -eet_data_stream_free(Eet_Data_Stream * ds) +eet_data_stream_free(Eet_Data_Stream *ds) { if (ds->data) free(ds->data); @@ -1385,17 +1385,17 @@ eet_data_stream_free(Eet_Data_Stream * ds) } /* eet_data_stream_free */ static inline void -eet_data_stream_flush(Eet_Data_Stream * ds) +eet_data_stream_flush(Eet_Data_Stream *ds) { free(ds); } /* eet_data_stream_flush */ static inline void -eet_data_stream_write(Eet_Data_Stream * ds, - const void * data, - int size) +eet_data_stream_write(Eet_Data_Stream *ds, + const void * data, + int size) { - char * p; + char *p; if ((ds->pos + size) > ds->size) { @@ -1416,12 +1416,12 @@ eet_data_stream_write(Eet_Data_Stream * ds, } /* eet_data_stream_write */ static void -eet_data_chunk_put(Eet_Dictionary * ed, - Eet_Data_Chunk * chnk, - Eet_Data_Stream * ds) +eet_data_chunk_put(Eet_Dictionary * ed, + Eet_Data_Chunk * chnk, + Eet_Data_Stream *ds) { - int * size; - void * string; + int *size; + void *string; int s; int size_ret = 0; int string_ret = 0; @@ -1494,7 +1494,7 @@ on_error: /*---*/ static void -_eet_descriptor_hash_new(Eet_Data_Descriptor * edd) +_eet_descriptor_hash_new(Eet_Data_Descriptor *edd) { int i; @@ -1505,7 +1505,7 @@ _eet_descriptor_hash_new(Eet_Data_Descriptor * edd) edd->elements.hash.size); for (i = 0; i < edd->elements.num; i++) { - Eet_Data_Element * ede; + Eet_Data_Element *ede; int hash; ede = &(edd->elements.set[i]); @@ -1514,7 +1514,7 @@ _eet_descriptor_hash_new(Eet_Data_Descriptor * edd) edd->elements.hash.buckets[hash].element = ede; else { - Eet_Data_Descriptor_Hash * bucket; + Eet_Data_Descriptor_Hash *bucket; bucket = calloc(1, sizeof(Eet_Data_Descriptor_Hash)); bucket->element = ede; @@ -1525,13 +1525,13 @@ _eet_descriptor_hash_new(Eet_Data_Descriptor * edd) } /* _eet_descriptor_hash_new */ static void -_eet_descriptor_hash_free(Eet_Data_Descriptor * edd) +_eet_descriptor_hash_free(Eet_Data_Descriptor *edd) { int i; for (i = 0; i < edd->elements.hash.size; i++) { - Eet_Data_Descriptor_Hash * bucket, * pbucket; + Eet_Data_Descriptor_Hash *bucket, *pbucket; bucket = edd->elements.hash.buckets[i].next; while (bucket) @@ -1546,11 +1546,11 @@ _eet_descriptor_hash_free(Eet_Data_Descriptor * edd) } /* _eet_descriptor_hash_free */ static Eet_Data_Element * -_eet_descriptor_hash_find(Eet_Data_Descriptor * edd, - char * name, - int hash) +_eet_descriptor_hash_find(Eet_Data_Descriptor *edd, + char * name, + int hash) { - Eet_Data_Descriptor_Hash * bucket; + Eet_Data_Descriptor_Hash *bucket; if (hash < 0) hash = _eet_hash_gen(name, 6); @@ -1597,27 +1597,27 @@ _eet_mem_alloc(size_t size) } /* _eet_mem_alloc */ static void -_eet_mem_free(void * mem) +_eet_mem_free(void *mem) { free(mem); } /* _eet_mem_free */ static char * -_eet_str_alloc(const char * str) +_eet_str_alloc(const char *str) { return strdup(str); } /* _eet_str_alloc */ static void -_eet_str_free(const char * str) +_eet_str_free(const char *str) { free((char *)str); } /* _eet_str_free */ static Eina_Hash * -_eet_eina_hash_add_alloc(Eina_Hash * hash, - const char * key, - void * data) +_eet_eina_hash_add_alloc(Eina_Hash * hash, + const char *key, + void * data) { if (!hash) hash = eina_hash_string_small_new(NULL); @@ -1630,9 +1630,9 @@ _eet_eina_hash_add_alloc(Eina_Hash * hash, } /* _eet_eina_hash_add_alloc */ static Eina_Hash * -_eet_eina_hash_direct_add_alloc(Eina_Hash * hash, - const char * key, - void * data) +_eet_eina_hash_direct_add_alloc(Eina_Hash * hash, + const char *key, + void * data) { if (!hash) hash = eina_hash_string_small_new(NULL); @@ -1645,13 +1645,13 @@ _eet_eina_hash_direct_add_alloc(Eina_Hash * hash, } /* _eet_eina_hash_direct_add_alloc */ static char * -_eet_str_direct_alloc(const char * str) +_eet_str_direct_alloc(const char *str) { return (char *)str; } /* _eet_str_direct_alloc */ static void -_eet_str_direct_free(const char * str __UNUSED__) +_eet_str_direct_free(const char *str __UNUSED__) { } /* _eet_str_direct_free */ @@ -1665,7 +1665,7 @@ _eet_eina_hash_foreach(void * hash, } /* _eet_eina_hash_foreach */ static void -_eet_eina_hash_free(void * hash) +_eet_eina_hash_free(void *hash) { if (hash) eina_hash_free(hash); @@ -1673,9 +1673,9 @@ _eet_eina_hash_free(void * hash) /*---*/ EAPI Eina_Bool -eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc, - const char * name, - int size) +eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, + const char * name, + int size) { if (!eddc || !name) return EINA_FALSE; @@ -1700,9 +1700,9 @@ eet_eina_stream_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc, } /* eet_eina_stream_data_descriptor_class_set */ EAPI Eina_Bool -eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc, - const char * name, - int size) +eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class *eddc, + const char * name, + int size) { if (!eet_eina_stream_data_descriptor_class_set(eddc, name, size)) return EINA_FALSE; @@ -1717,10 +1717,10 @@ eet_eina_file_data_descriptor_class_set(Eet_Data_Descriptor_Class * eddc, } /* eet_eina_file_data_descriptor_class_set */ static Eet_Data_Descriptor * -_eet_data_descriptor_new(const Eet_Data_Descriptor_Class * eddc, - int version) +_eet_data_descriptor_new(const Eet_Data_Descriptor_Class *eddc, + int version) { - Eet_Data_Descriptor * edd; + Eet_Data_Descriptor *edd; if (!eddc) return NULL; @@ -1772,15 +1772,15 @@ _eet_data_descriptor_new(const Eet_Data_Descriptor_Class * eddc, } /* _eet_data_descriptor_new */ EAPI Eet_Data_Descriptor * -eet_data_descriptor_new(const char * name, +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 * dt, void * fdt), void * fdt), - void *(*func_hash_add)(void * h, const char * k, void * d), - void (* func_hash_free)(void * h)) + 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)) { Eet_Data_Descriptor_Class eddc; @@ -1805,31 +1805,31 @@ eet_data_descriptor_new(const char * name, } /* eet_data_descriptor_new */ EAPI Eet_Data_Descriptor * -eet_data_descriptor2_new(const Eet_Data_Descriptor_Class * eddc) +eet_data_descriptor2_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 1); } /* eet_data_descriptor2_new */ EAPI Eet_Data_Descriptor * -eet_data_descriptor3_new(const Eet_Data_Descriptor_Class * eddc) +eet_data_descriptor3_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 2); } /* eet_data_descriptor3_new */ EAPI Eet_Data_Descriptor * -eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class * eddc) +eet_data_descriptor_stream_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 1); } /* eet_data_descriptor_stream_new */ EAPI Eet_Data_Descriptor * -eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class * eddc) +eet_data_descriptor_file_new(const Eet_Data_Descriptor_Class *eddc) { return _eet_data_descriptor_new(eddc, 2); } /* eet_data_descriptor_file_new */ EAPI void -eet_data_descriptor_free(Eet_Data_Descriptor * edd) +eet_data_descriptor_free(Eet_Data_Descriptor *edd) { if (!edd) return; @@ -1842,18 +1842,18 @@ eet_data_descriptor_free(Eet_Data_Descriptor * edd) } /* eet_data_descriptor_free */ EAPI void -eet_data_descriptor_element_add(Eet_Data_Descriptor * edd, - const char * name, - int type, - int group_type, - int offset, - int count, +eet_data_descriptor_element_add(Eet_Data_Descriptor *edd, + const char * name, + int type, + int group_type, + int offset, + int count, /* int counter_offset, */ - const char * counter_name /* FIXME: Useless should go on a major release */, - Eet_Data_Descriptor * subtype) + const char * counter_name /* FIXME: Useless should go on a major release */, + Eet_Data_Descriptor *subtype) { - Eet_Data_Element * ede; - Eet_Data_Element * tmp; + Eet_Data_Element *ede; + Eet_Data_Element *tmp; /* UNION, VARIANT type would not work with simple type, we need a way to map the type. */ if ((group_type == EET_G_UNION @@ -1939,14 +1939,14 @@ eet_data_descriptor_element_add(Eet_Data_Descriptor * edd, } /* eet_data_descriptor_element_add */ EAPI void * -eet_data_read_cipher(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const char * cipher_key) +eet_data_read_cipher(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const char * cipher_key) { - const Eet_Dictionary * ed = NULL; - const void * data = NULL; - void * data_dec; + const Eet_Dictionary *ed = NULL; + const void *data = NULL; + void *data_dec; Eet_Free_Context context; int required_free = 0; int size; @@ -1973,13 +1973,13 @@ eet_data_read_cipher(Eet_File * ef, } /* eet_data_read_cipher */ EAPI Eet_Node * -eet_data_node_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key) +eet_data_node_read_cipher(Eet_File * ef, + const char *name, + const char *cipher_key) { - const Eet_Dictionary * ed = NULL; - const void * data = NULL; - Eet_Node * result; + const Eet_Dictionary *ed = NULL; + const void *data = NULL; + Eet_Node *result; Eet_Free_Context context; int required_free = 0; int size; @@ -2006,23 +2006,23 @@ eet_data_node_read_cipher(Eet_File * ef, } /* eet_data_node_read_cipher */ EAPI void * -eet_data_read(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name) +eet_data_read(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name) { return eet_data_read_cipher(ef, edd, name, NULL); } /* eet_data_read */ EAPI int -eet_data_write_cipher(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const char * cipher_key, - const void * data, - int compress) +eet_data_write_cipher(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const char * cipher_key, + const void * data, + int compress) { - Eet_Dictionary * ed; - void * data_enc; + Eet_Dictionary *ed; + void *data_enc; int size; int val; @@ -2038,17 +2038,17 @@ eet_data_write_cipher(Eet_File * ef, } /* eet_data_write_cipher */ EAPI int -eet_data_write(Eet_File * ef, - Eet_Data_Descriptor * edd, - const char * name, - const void * data, - int compress) +eet_data_write(Eet_File * ef, + Eet_Data_Descriptor *edd, + const char * name, + const void * data, + int compress) { return eet_data_write_cipher(ef, edd, name, NULL, data, compress); } /* eet_data_write */ static int -_eet_free_hash(void * data) +_eet_free_hash(void *data) { #ifdef _WIN64 __int64 ptr = (UINT_PTR)data; @@ -2073,8 +2073,8 @@ _eet_free_hash(void * data) } /* _eet_free_hash */ static void -_eet_free_add(Eet_Free * ef, - void * data) +_eet_free_add(Eet_Free *ef, + void * data) { int hash; int i; @@ -2088,7 +2088,7 @@ _eet_free_add(Eet_Free * ef, ef->num[hash]++; if (ef->num[hash] > ef->len[hash]) { - void ** tmp; + void **tmp; tmp = realloc(ef->list[hash], (ef->len[hash] + 16) * sizeof(void *)); if (!tmp) @@ -2102,7 +2102,7 @@ _eet_free_add(Eet_Free * ef, } /* _eet_free_add */ static void -_eet_free_reset(Eet_Free * ef) +_eet_free_reset(Eet_Free *ef) { int i; @@ -2121,13 +2121,13 @@ _eet_free_reset(Eet_Free * ef) } /* _eet_free_reset */ static void -_eet_free_ref(Eet_Free * ef) +_eet_free_ref(Eet_Free *ef) { ef->ref++; } /* _eet_free_ref */ static void -_eet_free_unref(Eet_Free * ef) +_eet_free_unref(Eet_Free *ef) { ef->ref--; } /* _eet_free_unref */ @@ -2138,8 +2138,8 @@ _eet_free_unref(Eet_Free * ef) #define _eet_freelist_unref(Ctx) _eet_free_unref(&Ctx->freelist); static void -_eet_freelist_free(Eet_Free_Context * context, - Eet_Data_Descriptor * edd) +_eet_freelist_free(Eet_Free_Context * context, + Eet_Data_Descriptor *edd) { int j; int i; @@ -2164,8 +2164,8 @@ _eet_freelist_free(Eet_Free_Context * context, #define _eet_freelist_list_unref(Ctx) _eet_free_unref(&Ctx->freelist_list); static void -_eet_freelist_list_free(Eet_Free_Context * context, - Eet_Data_Descriptor * edd) +_eet_freelist_list_free(Eet_Free_Context * context, + Eet_Data_Descriptor *edd) { int j; int i; @@ -2188,7 +2188,7 @@ _eet_freelist_list_free(Eet_Free_Context * context, #define _eet_freelist_str_unref(Ctx) _eet_free_unref(&Ctx->freelist_str); static void -_eet_freelist_str_free(Eet_Free_Context * context, Eet_Data_Descriptor * edd) +_eet_freelist_str_free(Eet_Free_Context *context, Eet_Data_Descriptor *edd) { int j; int i; @@ -2213,8 +2213,8 @@ _eet_freelist_str_free(Eet_Free_Context * context, Eet_Data_Descriptor * edd) #define _eet_freelist_direct_str_unref(Ctx) _eet_free_unref(&Ctx->freelist_direct_str); static void -_eet_freelist_direct_str_free(Eet_Free_Context * context, - Eet_Data_Descriptor * edd) +_eet_freelist_direct_str_free(Eet_Free_Context * context, + Eet_Data_Descriptor *edd) { int j; int i; @@ -2239,8 +2239,8 @@ _eet_freelist_direct_str_free(Eet_Free_Context * context, #define _eet_freelist_hash_unref(Ctx) _eet_free_unref(&Ctx->freelist_hash); static void -_eet_freelist_hash_free(Eet_Free_Context * context, - Eet_Data_Descriptor * edd) +_eet_freelist_hash_free(Eet_Free_Context * context, + Eet_Data_Descriptor *edd) { int j; int i; @@ -2260,7 +2260,7 @@ _eet_freelist_hash_free(Eet_Free_Context * context, } /* _eet_freelist_hash_free */ static void -_eet_freelist_all_ref(Eet_Free_Context * freelist_context) +_eet_freelist_all_ref(Eet_Free_Context *freelist_context) { _eet_freelist_ref(freelist_context); _eet_freelist_str_ref(freelist_context); @@ -2270,7 +2270,7 @@ _eet_freelist_all_ref(Eet_Free_Context * freelist_context) } /* _eet_freelist_all_ref */ static void -_eet_freelist_all_unref(Eet_Free_Context * freelist_context) +_eet_freelist_all_unref(Eet_Free_Context *freelist_context) { _eet_freelist_unref(freelist_context); _eet_freelist_str_unref(freelist_context); @@ -2280,17 +2280,17 @@ _eet_freelist_all_unref(Eet_Free_Context * freelist_context) } /* _eet_freelist_all_unref */ static int -eet_data_descriptor_encode_hash_cb(void * hash __UNUSED__, - const char * cipher_key, - void * hdata, - void * fdata) +eet_data_descriptor_encode_hash_cb(void *hash __UNUSED__, + const char *cipher_key, + void * hdata, + void * fdata) { - Eet_Dictionary * ed; - Eet_Data_Encode_Hash_Info * edehi; - Eet_Data_Stream * ds; - Eet_Data_Element * ede; - Eet_Data_Chunk * echnk; - void * data = NULL; + Eet_Dictionary *ed; + Eet_Data_Encode_Hash_Info *edehi; + Eet_Data_Stream *ds; + Eet_Data_Element *ede; + Eet_Data_Chunk *echnk; + void *data = NULL; int size; edehi = fdata; @@ -2347,11 +2347,11 @@ eet_data_descriptor_encode_hash_cb(void * hash __UNUSED__, } /* eet_data_descriptor_encode_hash_cb */ static char * -_eet_data_dump_token_get(const char * src, - int * len) +_eet_data_dump_token_get(const char *src, + int * len) { - const char * p; - char * tok = NULL; + const char *p; + char *tok = NULL; int in_token = 0; int in_quote = 0; int tlen = 0, tsize = 0; @@ -2430,15 +2430,15 @@ _eet_data_dump_token_get(const char * src, } /* _eet_data_dump_token_get */ static void -eet_data_encode(Eet_Dictionary * ed, - Eet_Data_Stream * ds, - void * data, - const char * name, - int size, - int type, - int group_type) +eet_data_encode(Eet_Dictionary * ed, + Eet_Data_Stream *ds, + void * data, + const char * name, + int size, + int type, + int group_type) { - Eet_Data_Chunk * echnk; + Eet_Data_Chunk *echnk; if (!data) type = EET_T_NULL; @@ -2454,18 +2454,18 @@ eet_data_encode(Eet_Dictionary * ed, } /* eet_data_encode */ static void * -_eet_data_dump_encode(int parent_type, - Eet_Dictionary * ed, - Eet_Node * node, - int * size_ret) +_eet_data_dump_encode(int parent_type, + Eet_Dictionary *ed, + Eet_Node * node, + int * size_ret) { - Eet_Data_Chunk * chnk = NULL; - Eet_Data_Stream * ds; - void * cdata, * data; + Eet_Data_Chunk *chnk = NULL; + Eet_Data_Stream *ds; + void *cdata, *data; int csize, size; int count; int child_type; - Eet_Node * n; + Eet_Node *n; if (_eet_data_words_bigendian == -1) { @@ -2767,20 +2767,20 @@ _eet_data_dump_encode(int parent_type, } /* _eet_data_dump_encode */ static void * -_eet_data_dump_parse(Eet_Dictionary * ed, - int * size_ret, - const char * src, - int size) +_eet_data_dump_parse(Eet_Dictionary *ed, + int * size_ret, + const char * src, + int size) { - void * cdata = NULL; - const char * p = NULL; + void *cdata = NULL; + const char *p = NULL; #define M_NONE 0 #define M_STRUCT 1 #define M_ 2 int left, jump; - Eet_Node * node_base = NULL; - Eet_Node * node = NULL; - Eet_Node * n = NULL, * nn = NULL; + Eet_Node *node_base = NULL; + Eet_Node *node = NULL; + Eet_Node *n = NULL, *nn = NULL; /* FIXME; handle parse errors */ #define TOK_GET(t)\ @@ -2788,7 +2788,7 @@ _eet_data_dump_parse(Eet_Dictionary * ed, left = size; for (p = src; p < (src + size); ) { - char * tok1, * tok2, * tok3, * tok4; + char *tok1, *tok2, *tok3, *tok4; TOK_GET(tok1); if (tok1) @@ -3037,15 +3037,15 @@ _eet_data_dump_parse(Eet_Dictionary * ed, } static void * -_eet_data_descriptor_decode(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - const void * data_in, - int size_in) +_eet_data_descriptor_decode(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + const void * data_in, + int size_in) { - Eet_Node * result = NULL; - void * data = NULL; - char * p; + Eet_Node *result = NULL; + void *data = NULL; + char *p; int size, i; Eet_Data_Chunk chnk; @@ -3135,8 +3135,8 @@ _eet_data_descriptor_decode(Eet_Free_Context * context, while (size > 0) { Eet_Data_Chunk echnk; - Eet_Data_Element * ede = NULL; - Eet_Node * child = NULL; + Eet_Data_Element *ede = NULL; + Eet_Node *child = NULL; int group_type = EET_G_UNKNOWN, type = EET_T_UNKNOW; int ret = 0; @@ -3259,21 +3259,21 @@ error: } /* _eet_data_descriptor_decode */ static int -eet_data_get_list(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type __UNUSED__, - void * data, - char ** p, - int * size) +eet_data_get_list(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type __UNUSED__, + void * data, + char ** p, + int * size) { - Eet_Data_Descriptor * subtype = NULL; - void * list = NULL; - void ** ptr; - void * data_ret; + Eet_Data_Descriptor *subtype = NULL; + void *list = NULL; + void **ptr; + void *data_ret; EET_ASSERT(!((type > EET_T_UNKNOW) && (type < EET_T_STRING)), return 0); @@ -3325,21 +3325,21 @@ on_error: } /* eet_data_get_list */ static int -eet_data_get_hash(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type __UNUSED__, - void * data, - char ** p, - int * size) +eet_data_get_hash(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type __UNUSED__, + void * data, + char ** p, + int * size) { - void ** ptr; - void * hash = NULL; - char * key = NULL; - void * data_ret = NULL; + void **ptr; + void *hash = NULL; + char *key = NULL; + void *data_ret = NULL; int ret = 0; EET_ASSERT(!((type > EET_T_UNKNOW) && (type < EET_T_STRING)), return 0); @@ -3411,21 +3411,21 @@ on_error: * each chunk is pointless. */ static int -eet_data_get_array(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size) +eet_data_get_array(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size) { - Eina_List * childs = NULL; - const char * name; - Eet_Node * tmp; - void * ptr; + Eina_List *childs = NULL; + const char *name; + Eet_Node *tmp; + void *ptr; int count; int ret; int subsize = 0; @@ -3472,8 +3472,8 @@ eet_data_get_array(Eet_Free_Context * context, /* get all array elements */ for (i = 0; i < count; i++) { - void * dst = NULL; - void * data_ret = NULL; + void *dst = NULL; + void *data_ret = NULL; /* Advance to next chunk */ NEXT_CHUNK((*p), (*size), (*echnk), ed); @@ -3541,8 +3541,8 @@ eet_data_get_array(Eet_Free_Context * context, if (!edd) { - Eet_Node * parent = *((Eet_Node **)data); - Eet_Node * array; + Eet_Node *parent = *((Eet_Node **)data); + Eet_Node *array; if (group_type == EET_G_ARRAY) array = eet_node_array_new(name, count, childs); @@ -3565,13 +3565,13 @@ on_error: } /* eet_data_get_array */ static void -eet_data_put_union(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_union(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { - const char * union_type; + const char *union_type; int i; EET_ASSERT(!((ede->type != EET_T_UNKNOW) || (!ede->subtype)), return ); @@ -3587,8 +3587,8 @@ eet_data_put_union(Eet_Dictionary * ed, for (i = 0; i < ede->subtype->elements.num; ++i) if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0) { - Eet_Data_Element * sede; - void * data; + Eet_Data_Element *sede; + void *data; int size; /* Yeah we found it ! */ @@ -3622,19 +3622,19 @@ eet_data_put_union(Eet_Dictionary * ed, } /* eet_data_put_union */ static int -eet_data_get_union(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type, - void * data, - char ** p, - int * size) +eet_data_get_union(Eet_Free_Context * context, + const Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type, + void * data, + char ** p, + int * size) { - const char * union_type; - void * data_ret = NULL; + const char *union_type; + void *data_ret = NULL; int ret = 0; int i; @@ -3665,8 +3665,8 @@ eet_data_get_union(Eet_Free_Context * context, for (i = 0; i < ede->subtype->elements.num; ++i) if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0) { - Eet_Data_Element * sede; - char * ut; + Eet_Data_Element *sede; + char *ut; /* Yeah we found it ! */ sede = &(ede->subtype->elements.set[i]); @@ -3724,14 +3724,14 @@ on_error: } /* eet_data_get_union */ static void -eet_data_put_variant(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_variant(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { - const char * union_type; - void * data; + const char *union_type; + void *data; Eina_Bool unknow = EINA_FALSE; int size; int i; @@ -3748,7 +3748,7 @@ eet_data_put_variant(Eet_Dictionary * ed, if (unknow) { /* Handle opaque internal representation */ - Eet_Variant_Unknow * evu; + Eet_Variant_Unknow *evu; data = eet_data_put_type(ed, EET_T_STRING, &union_type, &size); if (data) @@ -3775,7 +3775,7 @@ eet_data_put_variant(Eet_Dictionary * ed, for (i = 0; i < ede->subtype->elements.num; ++i) if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0) { - Eet_Data_Element * sede; + Eet_Data_Element *sede; /* Yeah we found it ! */ data = eet_data_put_type(ed, EET_T_STRING, &union_type, &size); @@ -3792,7 +3792,7 @@ eet_data_put_variant(Eet_Dictionary * ed, if (sede->group_type != EET_G_UNKNOWN) { - Eet_Data_Stream * lds; + Eet_Data_Stream *lds; lds = eet_data_stream_new(); eet_group_codec[sede->group_type - 100].put(ed, @@ -3836,19 +3836,19 @@ eet_data_put_variant(Eet_Dictionary * ed, } /* eet_data_put_variant */ static int -eet_data_get_variant(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type __UNUSED__, - int group_type __UNUSED__, - void * data, - char ** p, - int * size) +eet_data_get_variant(Eet_Free_Context * context, + const Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type __UNUSED__, + int group_type __UNUSED__, + void * data, + char ** p, + int * size) { - const char * union_type; - void * data_ret = NULL; + const char *union_type; + void *data_ret = NULL; int ret = 0; int i; @@ -3872,7 +3872,7 @@ eet_data_get_variant(Eet_Free_Context * context, if (ede) { - char * ut; + char *ut; EET_ASSERT(ede->subtype, goto on_error); @@ -3891,7 +3891,7 @@ eet_data_get_variant(Eet_Free_Context * context, for (i = 0; i < ede->subtype->elements.num; ++i) if (strcmp(ede->subtype->elements.set[i].name, union_type) == 0) { - Eet_Data_Element * sede; + Eet_Data_Element *sede; /* Yeah we found it ! */ sede = &(ede->subtype->elements.set[i]); @@ -3899,7 +3899,7 @@ eet_data_get_variant(Eet_Free_Context * context, if (sede->group_type != EET_G_UNKNOWN) { Eet_Data_Chunk chnk; - char * p2; + char *p2; int size2; int ret; @@ -3956,7 +3956,7 @@ eet_data_get_variant(Eet_Free_Context * context, if (!data_ret) { - Eet_Variant_Unknow * evu; + Eet_Variant_Unknow *evu; evu = calloc(1, sizeof (Eet_Variant_Unknow) + echnk->size - 1); if (!evu) @@ -3990,7 +3990,7 @@ on_error: } /* eet_data_get_variant */ static Eet_Node * -eet_data_node_simple_type(int type, const char * name, void * dd) +eet_data_node_simple_type(int type, const char *name, void *dd) { #ifdef EET_T_TYPE # undef EET_T_TYPE @@ -4025,19 +4025,19 @@ eet_data_node_simple_type(int type, const char * name, void * dd) } /* eet_data_node_simple_type */ static int -eet_data_get_unknown(Eet_Free_Context * context, - const Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Chunk * echnk, - int type, - int group_type __UNUSED__, - void * data, - char ** p __UNUSED__, - int * size __UNUSED__) +eet_data_get_unknown(Eet_Free_Context * context, + const Eet_Dictionary *ed, + Eet_Data_Descriptor * edd, + Eet_Data_Element * ede, + Eet_Data_Chunk * echnk, + int type, + int group_type __UNUSED__, + void * data, + char **p __UNUSED__, + int *size __UNUSED__) { int ret; - void * data_ret; + void *data_ret; if (IS_SIMPLE_TYPE(type)) { @@ -4053,8 +4053,8 @@ eet_data_get_unknown(Eet_Free_Context * context, if (!edd) { - Eet_Node ** parent = data; - Eet_Node * node; + Eet_Node **parent = data; + Eet_Node *node; node = eet_data_node_simple_type(type, echnk->name, dd); @@ -4067,7 +4067,7 @@ eet_data_get_unknown(Eet_Free_Context * context, { if (type == EET_T_STRING) { - char ** str; + char **str; str = (char **)(((char *)data)); if (*str) @@ -4086,7 +4086,7 @@ eet_data_get_unknown(Eet_Free_Context * context, } else if (edd && type == EET_T_INLINED_STRING) { - char ** str; + char **str; str = (char **)(((char *)data)); if (*str) @@ -4099,14 +4099,14 @@ eet_data_get_unknown(Eet_Free_Context * context, } else { - Eet_Data_Descriptor * subtype; + Eet_Data_Descriptor *subtype; subtype = ede ? ede->subtype : NULL; if (subtype || !edd) { - Eet_Node ** parent = data; - void ** ptr; + Eet_Node **parent = data; + void **ptr; data_ret = _eet_data_descriptor_decode(context, ed, @@ -4123,7 +4123,7 @@ eet_data_get_unknown(Eet_Free_Context * context, } else { - Eet_Node * node = data_ret; + Eet_Node *node = data_ret; if (*parent) { @@ -4140,13 +4140,13 @@ eet_data_get_unknown(Eet_Free_Context * context, } /* eet_data_get_unknown */ static void -eet_data_put_array(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_array(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { - void * data; + void *data; int offset = 0; int subsize; int count; @@ -4175,7 +4175,7 @@ eet_data_put_array(Eet_Dictionary * ed, for (j = 0; j < count; j++) { - void * d; + void *d; int pos = ds->pos; if (ede->group_type == EET_G_ARRAY) @@ -4216,13 +4216,13 @@ eet_data_put_array(Eet_Dictionary * ed, } /* eet_data_put_array */ static void -eet_data_put_unknown(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd __UNUSED__, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_unknown(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd __UNUSED__, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { - void * data = NULL; + void *data = NULL; int size; if (IS_SIMPLE_TYPE(ede->type)) @@ -4245,14 +4245,14 @@ eet_data_put_unknown(Eet_Dictionary * ed, } /* eet_data_put_unknown */ static void -eet_data_put_list(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_list(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { - void * data; - void * l; + void *data; + void *l; int size; EET_ASSERT(!(((ede->type > EET_T_UNKNOW) && (ede->type < EET_T_STRING)) @@ -4264,7 +4264,7 @@ eet_data_put_list(Eet_Dictionary * ed, { if (IS_POINTER_TYPE(ede->type)) { - const void * str = edd->func.list_data(l); + const void *str = edd->func.list_data(l); eet_data_put_unknown(ed, NULL, ede, ds, &str); } else @@ -4286,14 +4286,14 @@ eet_data_put_list(Eet_Dictionary * ed, } /* eet_data_put_list */ static void -eet_data_put_hash(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - Eet_Data_Element * ede, - Eet_Data_Stream * ds, - void * data_in) +eet_data_put_hash(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + Eet_Data_Element * ede, + Eet_Data_Stream * ds, + void * data_in) { Eet_Data_Encode_Hash_Info fdata; - void * l; + void *l; l = *((void **)(((char *)data_in))); fdata.ds = ds; @@ -4303,15 +4303,15 @@ eet_data_put_hash(Eet_Dictionary * ed, } /* eet_data_put_hash */ 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) +eet_data_dump_cipher(Eet_File *ef, + const char *name, + const char *cipher_key, + void (*dumpfunc)(void *data, const char *str), + void *dumpdata) { - const Eet_Dictionary * ed = NULL; - const void * data = NULL; - Eet_Node * result; + const Eet_Dictionary *ed = NULL; + const void *data = NULL; + Eet_Node *result; Eet_Free_Context context; int required_free = 0; int size; @@ -4343,23 +4343,23 @@ eet_data_dump_cipher(Eet_File * ef, } /* eet_data_dump_cipher */ EAPI int -eet_data_dump(Eet_File * ef, - const char * name, - void (* dumpfunc)(void * data, const char * str), - void * dumpdata) +eet_data_dump(Eet_File *ef, + const char *name, + void (*dumpfunc)(void *data, const char *str), + void *dumpdata) { return eet_data_dump_cipher(ef, name, NULL, dumpfunc, dumpdata); } /* eet_data_dump */ EAPI int -eet_data_text_dump_cipher(const void * data_in, - const char * cipher_key, +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) { - void * ret = NULL; - Eet_Node * result; + void *ret = NULL; + Eet_Node *result; Eet_Free_Context context; unsigned int ret_len = 0; @@ -4396,26 +4396,26 @@ eet_data_text_dump_cipher(const void * data_in, } /* eet_data_text_dump_cipher */ EAPI int -eet_data_text_dump(const void * data_in, +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) { return eet_data_text_dump_cipher(data_in, NULL, size_in, dumpfunc, dumpdata); } /* eet_data_text_dump */ EAPI void * -eet_data_text_undump_cipher(const char * text, - const char * cipher_key, - int textlen, - int * size_ret) +eet_data_text_undump_cipher(const char *text, + const char *cipher_key, + int textlen, + int * size_ret) { - void * ret = NULL; + void *ret = NULL; ret = _eet_data_dump_parse(NULL, size_ret, text, textlen); if (ret && cipher_key) { - void * ciphered = NULL; + void *ciphered = NULL; unsigned int ciphered_len; if (eet_cipher(ret, *size_ret, cipher_key, @@ -4438,23 +4438,23 @@ eet_data_text_undump_cipher(const char * text, } /* eet_data_text_undump_cipher */ EAPI void * -eet_data_text_undump(const char * text, - int textlen, - int * size_ret) +eet_data_text_undump(const char *text, + int textlen, + int * size_ret) { return eet_data_text_undump_cipher(text, NULL, textlen, size_ret); } /* eet_data_text_undump */ EAPI int -eet_data_undump_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - const char * text, - int textlen, - int compress) +eet_data_undump_cipher(Eet_File * ef, + const char *name, + const char *cipher_key, + const char *text, + int textlen, + int compress) { - Eet_Dictionary * ed; - void * data_enc; + Eet_Dictionary *ed; + void *data_enc; int size; int val; @@ -4470,23 +4470,23 @@ eet_data_undump_cipher(Eet_File * ef, } /* eet_data_undump_cipher */ EAPI int -eet_data_undump(Eet_File * ef, - const char * name, - const char * text, - int textlen, - int compress) +eet_data_undump(Eet_File * ef, + const char *name, + const char *text, + int textlen, + int compress) { return eet_data_undump_cipher(ef, name, NULL, text, textlen, compress); } /* eet_data_undump */ EAPI void * -eet_data_descriptor_decode_cipher(Eet_Data_Descriptor * edd, - const void * data_in, - const char * cipher_key, - int size_in) +eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd, + const void * data_in, + const char * cipher_key, + int size_in) { - void * deciphered = (void *)data_in; - void * ret; + void *deciphered = (void *)data_in; + void *ret; Eet_Free_Context context; unsigned int deciphered_len = size_in; @@ -4514,20 +4514,20 @@ eet_data_descriptor_decode_cipher(Eet_Data_Descriptor * edd, } /* eet_data_descriptor_decode_cipher */ EAPI void * -eet_data_descriptor_decode(Eet_Data_Descriptor * edd, - const void * data_in, - int size_in) +eet_data_descriptor_decode(Eet_Data_Descriptor *edd, + const void * data_in, + int size_in) { return eet_data_descriptor_decode_cipher(edd, data_in, NULL, size_in); } /* eet_data_descriptor_decode */ EAPI Eet_Node * -eet_data_node_decode_cipher(const void * data_in, - const char * cipher_key, - int size_in) +eet_data_node_decode_cipher(const void *data_in, + const char *cipher_key, + int size_in) { - void * deciphered = (void *)data_in; - Eet_Node * ret; + void *deciphered = (void *)data_in; + Eet_Node *ret; Eet_Free_Context context; unsigned int deciphered_len = size_in; @@ -4555,14 +4555,14 @@ eet_data_node_decode_cipher(const void * data_in, } /* eet_data_node_decode_cipher */ static void * -_eet_data_descriptor_encode(Eet_Dictionary * ed, - Eet_Data_Descriptor * edd, - const void * data_in, - int * size_ret) +_eet_data_descriptor_encode(Eet_Dictionary * ed, + Eet_Data_Descriptor *edd, + const void * data_in, + int * size_ret) { - Eet_Data_Stream * ds; - Eet_Data_Chunk * chnk; - void * cdata; + Eet_Data_Stream *ds; + Eet_Data_Chunk *chnk; + void *cdata; int csize; int i; @@ -4580,7 +4580,7 @@ _eet_data_descriptor_encode(Eet_Dictionary * ed, ds = eet_data_stream_new(); for (i = 0; i < edd->elements.num; i++) { - Eet_Data_Element * ede; + Eet_Data_Element *ede; ede = &(edd->elements.set[i]); eet_group_codec[ede->group_type - 100].put( @@ -4617,14 +4617,14 @@ _eet_data_descriptor_encode(Eet_Dictionary * ed, } /* _eet_data_descriptor_encode */ EAPI int -eet_data_node_write_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - Eet_Node * node, - int compress) +eet_data_node_write_cipher(Eet_File * ef, + const char *name, + const char *cipher_key, + Eet_Node * node, + int compress) { - Eet_Dictionary * ed; - void * data_enc; + Eet_Dictionary *ed; + void *data_enc; int size; int val; @@ -4640,12 +4640,12 @@ eet_data_node_write_cipher(Eet_File * ef, } /* eet_data_node_write_cipher */ EAPI void * -eet_data_node_encode_cipher(Eet_Node * node, - const char * cipher_key, - int * size_ret) +eet_data_node_encode_cipher(Eet_Node * node, + const char *cipher_key, + int * size_ret) { - void * ret = NULL; - void * ciphered = NULL; + void *ret = NULL; + void *ciphered = NULL; unsigned int ciphered_len = 0; int size; @@ -4677,13 +4677,13 @@ eet_data_node_encode_cipher(Eet_Node * node, } /* eet_data_node_encode_cipher */ EAPI void * -eet_data_descriptor_encode_cipher(Eet_Data_Descriptor * edd, - const void * data_in, - const char * cipher_key, - int * size_ret) +eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd, + const void * data_in, + const char * cipher_key, + int * size_ret) { - void * ret = NULL; - void * ciphered = NULL; + void *ret = NULL; + void *ciphered = NULL; unsigned int ciphered_len = 0; int size; @@ -4715,9 +4715,9 @@ eet_data_descriptor_encode_cipher(Eet_Data_Descriptor * edd, } /* eet_data_descriptor_encode_cipher */ EAPI void * -eet_data_descriptor_encode(Eet_Data_Descriptor * edd, - const void * data_in, - int * size_ret) +eet_data_descriptor_encode(Eet_Data_Descriptor *edd, + const void * data_in, + int * size_ret) { return eet_data_descriptor_encode_cipher(edd, data_in, NULL, size_ret); } /* eet_data_descriptor_encode */ diff --git a/legacy/eet/src/lib/eet_dictionary.c b/legacy/eet/src/lib/eet_dictionary.c index d61093c37b..adcfb85af0 100644 --- a/legacy/eet/src/lib/eet_dictionary.c +++ b/legacy/eet/src/lib/eet_dictionary.c @@ -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,9 +48,9 @@ eet_dictionary_free(Eet_Dictionary * ed) } /* eet_dictionary_free */ static int -_eet_dictionary_lookup(Eet_Dictionary * ed, - const char * string, - int hash) +_eet_dictionary_lookup(Eet_Dictionary *ed, + const char * string, + int hash) { int prev = -1; int current; @@ -78,11 +78,11 @@ _eet_dictionary_lookup(Eet_Dictionary * ed, } /* _eet_dictionary_lookup */ int -eet_dictionary_string_add(Eet_Dictionary * ed, - const char * string) +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,8 +160,8 @@ eet_dictionary_string_add(Eet_Dictionary * ed, } /* eet_dictionary_string_add */ int -eet_dictionary_string_get_size(const Eet_Dictionary * ed, - int idx) +eet_dictionary_string_get_size(const Eet_Dictionary *ed, + int idx) { if (!ed) return 0; @@ -176,8 +176,8 @@ eet_dictionary_string_get_size(const Eet_Dictionary * ed, } /* eet_dictionary_string_get_size */ int -eet_dictionary_string_get_hash(const Eet_Dictionary * ed, - int idx) +eet_dictionary_string_get_hash(const Eet_Dictionary *ed, + int idx) { if (!ed) return -1; @@ -192,8 +192,8 @@ 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, - int idx) +eet_dictionary_string_get_char(const Eet_Dictionary *ed, + int idx) { if (!ed) return NULL; @@ -223,10 +223,10 @@ 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, - int len, - int * mantisse, - int * exponent) +_eet_dictionary_string_get_me_cache(const char *s, + int len, + int * mantisse, + int * exponent) { if ((len == 6) && (s[0] == '0') && (s[1] == 'x') && (s[3] == 'p')) { @@ -240,9 +240,9 @@ _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, - int len, - float * result) +_eet_dictionary_string_get_float_cache(const char *s, + int len, + float * result) { int mantisse; int exponent; @@ -261,9 +261,9 @@ _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, - int len, - double * result) +_eet_dictionary_string_get_double_cache(const char *s, + int len, + double * result) { int mantisse; int exponent; @@ -282,9 +282,9 @@ _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, - int idx, - void * result) +_eet_dictionary_test(const Eet_Dictionary *ed, + int idx, + void * result) { if (!result) return EINA_FALSE; @@ -302,16 +302,16 @@ _eet_dictionary_test(const Eet_Dictionary * ed, } /* _eet_dictionary_test */ Eina_Bool -eet_dictionary_string_get_float(const Eet_Dictionary * ed, - int idx, - float * result) +eet_dictionary_string_get_float(const Eet_Dictionary *ed, + int idx, + float * result) { if (!_eet_dictionary_test(ed, idx, result)) return EINA_FALSE; 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,16 +336,16 @@ 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, - int idx, - double * result) +eet_dictionary_string_get_double(const Eet_Dictionary *ed, + int idx, + double * result) { if (!_eet_dictionary_test(ed, idx, result)) return EINA_FALSE; 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,16 +370,16 @@ 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, - int idx, - Eina_F32p32 * result) +eet_dictionary_string_get_fp(const Eet_Dictionary *ed, + int idx, + Eina_F32p32 * result) { if (!_eet_dictionary_test(ed, idx, result)) return EINA_FALSE; 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,8 +396,8 @@ eet_dictionary_string_get_fp(const Eet_Dictionary * ed, } /* eet_dictionary_string_get_fp */ EAPI int -eet_dictionary_string_check(Eet_Dictionary * ed, - const char * string) +eet_dictionary_string_check(Eet_Dictionary *ed, + const char * string) { int i; diff --git a/legacy/eet/src/lib/eet_image.c b/legacy/eet/src/lib/eet_image.c index a3d8c17a32..2ba49cef7d 100644 --- a/legacy/eet/src/lib/eet_image.c +++ b/legacy/eet/src/lib/eet_image.c @@ -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) @@ -228,26 +228,26 @@ static void _JPEGErrorHandler(j_common_ptr cinfo); static void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level); -static int eet_data_image_jpeg_header_decode(const void * data, - int size, - 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 w, - unsigned int h, - unsigned int row_stride); -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 w, - unsigned int h, - unsigned int row_stride); +static int eet_data_image_jpeg_header_decode(const void * data, + int size, + 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 w, + unsigned int h, + unsigned int row_stride); +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 w, + unsigned int h, + unsigned int row_stride); static void * eet_data_image_lossless_convert(int * size, const void * data, unsigned int w, @@ -351,10 +351,10 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, } /* _JPEGErrorHandler2 */ static int -eet_data_image_jpeg_header_decode(const void * data, - int size, - unsigned int * w, - unsigned int * h) +eet_data_image_jpeg_header_decode(const void * data, + int size, + unsigned int *w, + unsigned int *h) { struct jpeg_decompress_struct cinfo; struct _JPEG_error_mgr jerr; @@ -397,19 +397,19 @@ eet_data_image_jpeg_header_decode(const void * data, } /* eet_data_image_jpeg_header_decode */ 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 w, - unsigned int h, - unsigned int row_stride) +eet_data_image_jpeg_rgb_decode(const void * data, + int size, + unsigned int src_x, + unsigned int src_y, + 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; @@ -550,19 +550,19 @@ eet_data_image_jpeg_rgb_decode(const void * data, } /* eet_data_image_jpeg_rgb_decode */ 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 w, - unsigned int h, - unsigned int row_stride) +eet_data_image_jpeg_alpha_decode(const void * data, + int size, + unsigned int src_x, + unsigned int src_y, + 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); @@ -1099,18 +1099,18 @@ eet_data_image_write(Eet_File * ef, } /* eet_data_image_write */ EAPI void * -eet_data_image_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_read_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + 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; @@ -1134,35 +1134,35 @@ eet_data_image_read_cipher(Eet_File * ef, } /* eet_data_image_read_cipher */ EAPI void * -eet_data_image_read(Eet_File * ef, - const char * name, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_read(Eet_File * ef, + const char * name, + unsigned int *w, + unsigned int *h, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_read_cipher(ef, name, NULL, w, h, alpha, comp, quality, lossy); } /* eet_data_image_read */ EAPI int -eet_data_image_read_to_surface_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int src_x, - unsigned int src_y, - unsigned int * d, - unsigned int w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_read_to_surface_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + unsigned int src_x, + unsigned int src_y, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * comp, + int * quality, + int * lossy) { - void * data = NULL; + void *data = NULL; int free_data = 0; int res = 1; int size; @@ -1189,18 +1189,18 @@ eet_data_image_read_to_surface_cipher(Eet_File * ef, } /* eet_data_image_read_to_surface_cipher */ 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 w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * comp, - int * quality, - int * lossy) +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 w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_read_to_surface_cipher(ef, name, NULL, src_x, src_y, d, @@ -1210,17 +1210,17 @@ eet_data_image_read_to_surface(Eet_File * ef, } /* eet_data_image_read_to_surface */ EAPI int -eet_data_image_header_read_cipher(Eet_File * ef, - const char * name, - const char * cipher_key, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_header_read_cipher(Eet_File * ef, + const char * name, + const char * cipher_key, + 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; @@ -1245,14 +1245,14 @@ eet_data_image_header_read_cipher(Eet_File * ef, } /* eet_data_image_header_read_cipher */ EAPI int -eet_data_image_header_read(Eet_File * ef, - const char * name, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_header_read(Eet_File * ef, + const char * name, + unsigned int *w, + unsigned int *h, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_header_read_cipher(ef, name, NULL, w, h, alpha, @@ -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; @@ -1332,18 +1332,18 @@ eet_data_image_encode(const void * data, } /* eet_data_image_encode */ EAPI int -eet_data_image_header_decode_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_header_decode_cipher(const void * data, + const char * cipher_key, + int size, + 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; @@ -1484,14 +1484,14 @@ eet_data_image_header_decode_cipher(const void * data, } /* eet_data_image_header_decode_cipher */ EAPI int -eet_data_image_header_decode(const void * data, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_header_decode(const void * data, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_header_decode_cipher(data, NULL, @@ -1505,14 +1505,14 @@ eet_data_image_header_decode(const void * data, } /* eet_data_image_header_decode */ static void -_eet_data_image_copy_buffer(const unsigned int * src, - unsigned int src_x, - unsigned int src_y, - unsigned int src_w, - unsigned int * dst, - unsigned int w, - unsigned int h, - unsigned int row_stride) +_eet_data_image_copy_buffer(const unsigned int *src, + unsigned int src_x, + unsigned int src_y, + unsigned int src_w, + unsigned int * dst, + unsigned int w, + unsigned int h, + unsigned int row_stride) { src += src_x + src_y * 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) @@ -1529,24 +1529,24 @@ _eet_data_image_copy_buffer(const unsigned int * src, } /* _eet_data_image_copy_buffer */ static int -_eet_data_image_decode_inside(const void * data, - int size, - unsigned int src_x, - unsigned int src_y, - unsigned int src_w, - unsigned int src_h, - unsigned int * d, - unsigned int w, - unsigned int h, - unsigned int row_stride, - int alpha, - int comp, - int quality, - int lossy) +_eet_data_image_decode_inside(const void * data, + int size, + unsigned int src_x, + unsigned int src_y, + unsigned int src_w, + unsigned int src_h, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int alpha, + int comp, + int quality, + int lossy) { 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; @@ -1631,20 +1631,20 @@ _eet_data_image_decode_inside(const void * data, } /* _eet_data_image_decode_inside */ EAPI void * -eet_data_image_decode_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_decode_cipher(const void * data, + const char * cipher_key, + int size, + 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) @@ -1698,37 +1698,37 @@ eet_data_image_decode_cipher(const void * data, } /* eet_data_image_decode_cipher */ EAPI void * -eet_data_image_decode(const void * data, - int size, - unsigned int * w, - unsigned int * h, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_decode(const void * data, + int size, + unsigned int *w, + unsigned int *h, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_decode_cipher(data, NULL, size, w, h, alpha, comp, quality, lossy); } /* eet_data_image_decode */ EAPI int -eet_data_image_decode_to_surface_cipher(const void * data, - const char * cipher_key, - int size, - unsigned int src_x, - unsigned int src_y, - unsigned int * d, - unsigned int w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_decode_to_surface_cipher(const void * data, + const char * cipher_key, + int size, + unsigned int src_x, + unsigned int src_y, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * comp, + int * quality, + int * lossy) { 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) @@ -1779,18 +1779,18 @@ eet_data_image_decode_to_surface_cipher(const void * data, } /* eet_data_image_decode_to_surface_cipher */ 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 w, - unsigned int h, - unsigned int row_stride, - int * alpha, - int * comp, - int * quality, - int * lossy) +eet_data_image_decode_to_surface(const void * data, + int size, + unsigned int src_x, + unsigned int src_y, + unsigned int *d, + unsigned int w, + unsigned int h, + unsigned int row_stride, + int * alpha, + int * comp, + int * quality, + int * lossy) { return eet_data_image_decode_to_surface_cipher(data, NULL, size, src_x, src_y, d, diff --git a/legacy/eet/src/lib/eet_lib.c b/legacy/eet/src/lib/eet_lib.c index 17e7f76b42..d55aef0eb7 100644 --- a/legacy/eet/src/lib/eet_lib.c +++ b/legacy/eet/src/lib/eet_lib.c @@ -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 @@ -90,70 +90,70 @@ typedef struct _Eet_File_Directory Eet_File_Directory; struct _Eet_File { - char * path; - FILE * readfp; - Eet_File_Header * header; - Eet_Dictionary * ed; - Eet_Key * key; - const unsigned char * data; - const void * x509_der; - const void * signature; - void * sha1; + char * path; + FILE * readfp; + Eet_File_Header * header; + Eet_Dictionary * ed; + Eet_Key * key; + const unsigned char *data; + const void * x509_der; + const void * signature; + void * sha1; - Eet_File_Mode mode; + Eet_File_Mode mode; - int magic; - int references; + int magic; + int references; - int data_size; - int x509_length; - unsigned int signature_length; - int sha1_length; + int data_size; + int x509_length; + unsigned int signature_length; + int sha1_length; - time_t mtime; + time_t mtime; #ifdef EFL_HAVE_THREADS # ifdef EFL_HAVE_POSIX_THREADS - pthread_mutex_t file_lock; + pthread_mutex_t file_lock; # else /* ifdef EFL_HAVE_POSIX_THREADS */ - HANDLE file_lock; + HANDLE file_lock; # endif /* ifdef EFL_HAVE_POSIX_THREADS */ #endif /* ifdef EFL_HAVE_THREADS */ - unsigned char writes_pending : 1; - unsigned char delete_me_now : 1; + unsigned char writes_pending : 1; + unsigned char delete_me_now : 1; }; struct _Eet_File_Header { - int magic; - Eet_File_Directory * directory; + int magic; + Eet_File_Directory *directory; }; struct _Eet_File_Directory { - int size; - Eet_File_Node ** nodes; + int size; + Eet_File_Node **nodes; }; struct _Eet_File_Node { - char * name; - void * data; - Eet_File_Node * next; /* FIXME: make buckets linked lists */ + char * name; + void * data; + Eet_File_Node *next; /* FIXME: make buckets linked lists */ - int offset; - int dictionary_offset; - int name_offset; + int offset; + int dictionary_offset; + int name_offset; - int name_size; - int size; - int data_size; + int name_size; + int size; + int data_size; - unsigned char free_name : 1; - unsigned char compression : 1; - unsigned char ciphered : 1; - unsigned char alias : 1; + unsigned char free_name : 1; + unsigned char compression : 1; + unsigned char ciphered : 1; + unsigned char alias : 1; }; #if 0 @@ -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, - Eet_File ** cache, - int cache_num); -static void eet_cache_add(Eet_File * ef, - Eet_File *** cache, - int * cache_num, - int * cache_alloc); -static void eet_cache_del(Eet_File * ef, - Eet_File *** cache, - int * cache_num, - int * cache_alloc); -static int eet_string_match(const char * s1, const char * s2); +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, + int * cache_num, + int * cache_alloc); +static void eet_cache_del(Eet_File * ef, + Eet_File ***cache, + int * cache_num, + int * cache_alloc); +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 int read_data_from_disk(Eet_File * ef, - Eet_File_Node * efn, - void * buf, - int len); +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, + 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; @@ -323,8 +323,8 @@ eet_check_header(const Eet_File * ef) } /* eet_check_header */ static inline int -eet_test_close(int test, - Eet_File * ef) +eet_test_close(int test, + Eet_File *ef) { if (test) { @@ -337,9 +337,9 @@ 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_File ** cache, - int cache_num) +eet_cache_find(const char *path, + Eet_File ** cache, + int cache_num) { int i; @@ -360,19 +360,19 @@ eet_cache_find(const char * path, /* add to end of cache */ /* this should only be called when the cache lock is already held */ static void -eet_cache_add(Eet_File * ef, - Eet_File *** cache, - int * cache_num, - int * cache_alloc) +eet_cache_add(Eet_File * ef, + 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; @@ -416,12 +416,12 @@ eet_cache_add(Eet_File * ef, /* delete from cache */ /* this should only be called when the cache lock is already held */ static void -eet_cache_del(Eet_File * ef, - Eet_File *** cache, - int * cache_num, - int * cache_alloc) +eet_cache_del(Eet_File * ef, + 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,8 +1348,8 @@ eet_internal_read(Eet_File * ef) } /* eet_internal_read */ static Eet_Error -eet_internal_close(Eet_File * ef, - Eina_Bool locked) +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, - size_t size) +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,8 +1674,8 @@ eet_mode_get(Eet_File * ef) } /* eet_mode_get */ EAPI const void * -eet_identity_x509(Eet_File * ef, - int * der_length) +eet_identity_x509(Eet_File *ef, + int * der_length) { if (!ef->x509_der) return NULL; @@ -1687,8 +1687,8 @@ eet_identity_x509(Eet_File * ef, } /* eet_identity_x509 */ EAPI const void * -eet_identity_signature(Eet_File * ef, - int * signature_length) +eet_identity_signature(Eet_File *ef, + int * signature_length) { if (!ef->signature) return NULL; @@ -1700,8 +1700,8 @@ eet_identity_signature(Eet_File * ef, } /* eet_identity_signature */ EAPI const void * -eet_identity_sha1(Eet_File * ef, - int * sha1_length) +eet_identity_sha1(Eet_File *ef, + int * sha1_length) { if (!ef->sha1) ef->sha1 = eet_identity_compute_sha1(ef->data, @@ -1715,10 +1715,10 @@ eet_identity_sha1(Eet_File * ef, } /* eet_identity_sha1 */ EAPI Eet_Error -eet_identity_set(Eet_File * ef, - Eet_Key * key) +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, - int * size_ret, - const char * cipher_key) +eet_read_cipher(Eet_File * ef, + const char *name, + int * size_ret, + 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; @@ -1899,20 +1899,20 @@ on_error: } /* eet_read_cipher */ EAPI void * -eet_read(Eet_File * ef, - const char * name, - int * size_ret) +eet_read(Eet_File * ef, + const char *name, + int * size_ret) { return eet_read_cipher(ef, name, size_ret, NULL); } /* eet_read */ EAPI const void * -eet_read_direct(Eet_File * ef, - const char * name, - int * size_ret) +eet_read_direct(Eet_File * ef, + 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; @@ -2000,13 +2000,13 @@ on_error: } /* eet_read_direct */ EAPI Eina_Bool -eet_alias(Eet_File * ef, - const char * name, - const char * destination, - int comp) +eet_alias(Eet_File * ef, + 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) @@ -2155,15 +2155,15 @@ on_error: } /* eet_alias */ EAPI int -eet_write_cipher(Eet_File * ef, - const char * name, - const void * data, - int size, - int comp, - const char * cipher_key) +eet_write_cipher(Eet_File * ef, + const char *name, + const void *data, + int size, + int comp, + 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), @@ -2337,21 +2337,21 @@ on_error: } /* eet_write_cipher */ EAPI int -eet_write(Eet_File * ef, - const char * name, - const void * data, - int size, - int comp) +eet_write(Eet_File * ef, + const char *name, + const void *data, + int size, + int comp) { return eet_write_cipher(ef, name, data, size, comp, NULL); } /* eet_write */ EAPI int -eet_delete(Eet_File * ef, - const char * name) +eet_delete(Eet_File * ef, + 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; @@ -2418,12 +2418,12 @@ eet_dictionary_get(Eet_File * ef) } /* eet_dictionary_get */ EAPI char ** -eet_list(Eet_File * ef, - const char * glob, - int * count_ret) +eet_list(Eet_File * ef, + 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) || @@ -2529,10 +2529,10 @@ eet_num_entries(Eet_File * ef) } /* eet_num_entries */ static Eet_File_Node * -find_node_by_name(Eet_File * ef, - const char * name) +find_node_by_name(Eet_File * ef, + const char *name) { - Eet_File_Node * efn; + Eet_File_Node *efn; int hash; /* get hash bucket this should be in */ @@ -2548,10 +2548,10 @@ find_node_by_name(Eet_File * ef, } /* find_node_by_name */ static int -read_data_from_disk(Eet_File * ef, - Eet_File_Node * efn, - void * buf, - int len) +read_data_from_disk(Eet_File * ef, + Eet_File_Node *efn, + void * buf, + int len) { if (efn->offset < 0) return 0; diff --git a/legacy/eet/src/lib/eet_node.c b/legacy/eet/src/lib/eet_node.c index 2588c27589..4ac9f8fb1b 100644 --- a/legacy/eet/src/lib/eet_node.c +++ b/legacy/eet/src/lib/eet_node.c @@ -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, - int type) +_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, - Eina_List * nodes) +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, - int count, - Eina_List * nodes) +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, - Eina_List * nodes) +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 * node) +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, - Eina_List * nodes) +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 * child) +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; @@ -230,19 +230,19 @@ eet_node_struct_child_new(const char * parent, } /* eet_node_struct_child_new */ void -eet_node_list_append(Eet_Node * parent, - const char * name, - Eet_Node * child) +eet_node_list_append(Eet_Node * parent, + 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; @@ -271,13 +271,13 @@ eet_node_list_append(Eet_Node * parent, } /* eet_node_list_append */ void -eet_node_struct_append(Eet_Node * parent, - const char * name, - Eet_Node * child) +eet_node_struct_append(Eet_Node * parent, + 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) { @@ -319,12 +319,12 @@ eet_node_struct_append(Eet_Node * parent, } /* eet_node_struct_append */ void -eet_node_hash_add(Eet_Node * parent, - const char * name, - const char * key, - Eet_Node * child) +eet_node_hash_add(Eet_Node * parent, + 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; @@ -634,14 +634,14 @@ eet_node_dump(Eet_Node * n, } /* eet_node_dump */ void * -eet_node_walk(void * parent, - const char * name, - Eet_Node * root, - Eet_Node_Walk * cb, - void * user_data) +eet_node_walk(void * parent, + const char * name, + Eet_Node * root, + 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"); diff --git a/legacy/eet/src/lib/eet_utils.c b/legacy/eet/src/lib/eet_utils.c index 624bfaed5b..78f233c797 100644 --- a/legacy/eet/src/lib/eet_utils.c +++ b/legacy/eet/src/lib/eet_utils.c @@ -13,13 +13,13 @@ #include "Eet_private.h" int -_eet_hash_gen(const char * key, - int hash_size) +_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)