remove space after *

SVN revision: 50719
This commit is contained in:
Sebastian Dransfeld 2010-07-31 18:54:54 +00:00
parent 38aac01b6a
commit 5d1a9f4e0d
10 changed files with 1872 additions and 1872 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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;

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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");

View File

@ -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)