forked from enlightenment/efl
Clean ups
* char * -> const char * where needed SVN revision: 20984
This commit is contained in:
parent
ba83b178da
commit
e2074460ce
|
@ -221,7 +221,7 @@ extern "C" {
|
|||
* If the eet file handle is not valid NULL is returned and size_ret is
|
||||
* filled with 0.
|
||||
*/
|
||||
EAPI void *eet_read (Eet_File *ef, char *name, int *size_ret);
|
||||
EAPI void *eet_read (Eet_File *ef, const char *name, int *size_ret);
|
||||
|
||||
/**
|
||||
* Write a specified entry to an eet file handle
|
||||
|
@ -246,7 +246,7 @@ extern "C" {
|
|||
* a flush to disk (it will stay in ram till the eet file handle is
|
||||
* closed though).
|
||||
*/
|
||||
EAPI int eet_write (Eet_File *ef, char *name, void *data, int size, int compress);
|
||||
EAPI int eet_write (Eet_File *ef, const char *name, void *data, int size, int compress);
|
||||
|
||||
/**
|
||||
* Delete a specified entry from an Eet file being written or re-written
|
||||
|
@ -335,7 +335,7 @@ extern "C" {
|
|||
* On success the function returns 1 indicating the header was read and
|
||||
* decoded properly, or 0 on failure.
|
||||
*/
|
||||
EAPI int eet_data_image_header_read(Eet_File *ef, 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.
|
||||
|
@ -370,7 +370,7 @@ extern "C" {
|
|||
* when it is done with it. On failure NULL is returned and the parameter
|
||||
* values may not contain any sensible data.
|
||||
*/
|
||||
EAPI void *eet_data_image_read(Eet_File *ef, 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);
|
||||
|
||||
/**
|
||||
* Write image data to the named key in an eet file.
|
||||
|
@ -402,7 +402,7 @@ extern "C" {
|
|||
* On success this function returns the number of bytes that were required
|
||||
* to encode the image data, or on failure it returns 0.
|
||||
*/
|
||||
EAPI int eet_data_image_write(Eet_File *ef, char *name, void *data, unsigned int w, unsigned int h, int alpha, int compress, int quality, int lossy);
|
||||
EAPI int eet_data_image_write(Eet_File *ef, const char *name, void *data, unsigned int w, unsigned int h, int alpha, int compress, int quality, int lossy);
|
||||
|
||||
/**
|
||||
* Decode Image data header only to get information.
|
||||
|
@ -745,7 +745,7 @@ extern "C" {
|
|||
* to an eet file.
|
||||
*
|
||||
*/
|
||||
EAPI int eet_data_write(Eet_File *ef, Eet_Data_Descriptor *edd, char *name, void *data, int compress);
|
||||
EAPI int eet_data_write(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, void *data, int compress);
|
||||
|
||||
/**
|
||||
* Decode a data structure from an arbitary location in memory.
|
||||
|
|
|
@ -868,7 +868,7 @@ eet_data_read(Eet_File *ef, Eet_Data_Descriptor *edd, char *name)
|
|||
}
|
||||
|
||||
EAPI int
|
||||
eet_data_write(Eet_File *ef, Eet_Data_Descriptor *edd, char *name, void *data, int compress)
|
||||
eet_data_write(Eet_File *ef, Eet_Data_Descriptor *edd, const char *name, void *data, int compress)
|
||||
{
|
||||
void *data_enc;
|
||||
int size;
|
||||
|
|
|
@ -692,7 +692,7 @@ eet_data_image_jpeg_alpha_convert(int *size, void *data, unsigned int w, unsigne
|
|||
}
|
||||
|
||||
EAPI int
|
||||
eet_data_image_write(Eet_File *ef, char *name,
|
||||
eet_data_image_write(Eet_File *ef, const char *name,
|
||||
void *data, unsigned int w, unsigned int h, int alpha,
|
||||
int compress, int quality, int lossy)
|
||||
{
|
||||
|
@ -712,7 +712,7 @@ eet_data_image_write(Eet_File *ef, char *name,
|
|||
}
|
||||
|
||||
EAPI void *
|
||||
eet_data_image_read(Eet_File *ef, char *name,
|
||||
eet_data_image_read(Eet_File *ef, const char *name,
|
||||
unsigned int *w, unsigned int *h, int *alpha,
|
||||
int *compress, int *quality, int *lossy)
|
||||
{
|
||||
|
@ -728,7 +728,7 @@ eet_data_image_read(Eet_File *ef, char *name,
|
|||
}
|
||||
|
||||
EAPI int
|
||||
eet_data_image_header_read(Eet_File *ef, char *name,
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -74,13 +74,13 @@ struct
|
|||
#endif
|
||||
|
||||
/* prototypes of internal calls */
|
||||
static Eet_File *eet_cache_find(char *path, Eet_File **cache, int cache_num);
|
||||
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(char *s1, char *s2);
|
||||
static int eet_hash_gen(char *key, int hash_size);
|
||||
static int eet_string_match(const char *s1, const char *s2);
|
||||
static int eet_hash_gen(const char *key, int hash_size);
|
||||
static void eet_flush(Eet_File *ef);
|
||||
static Eet_File_Node *find_node_by_name (Eet_File *ef, char *name);
|
||||
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);
|
||||
|
||||
/* cache. i don't expect this to ever be large, so arrays will do */
|
||||
|
@ -95,7 +95,7 @@ static int eet_cacheburst_mode = 0;
|
|||
|
||||
/* find an eet file in the currently in use cache */
|
||||
static Eet_File *
|
||||
eet_cache_find(char *path, Eet_File **cache, int cache_num)
|
||||
eet_cache_find(const char *path, Eet_File **cache, int cache_num)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -213,7 +213,7 @@ eet_cache_del(Eet_File *ef, Eet_File ***cache, int *cache_num, int *cache_alloc)
|
|||
/* internal string match. bails out at first mismatch - not comparing all */
|
||||
/* bytes in strings */
|
||||
static int
|
||||
eet_string_match(char *s1, char *s2)
|
||||
eet_string_match(const char *s1, const char *s2)
|
||||
{
|
||||
/* both null- no match */
|
||||
if ((!s1) || (!s2)) return 0;
|
||||
|
@ -222,7 +222,7 @@ eet_string_match(char *s1, char *s2)
|
|||
|
||||
/* caluclate hash table entry valu with bitmask size of hash_size */
|
||||
static int
|
||||
eet_hash_gen(char *key, int hash_size)
|
||||
eet_hash_gen(const char *key, int hash_size)
|
||||
{
|
||||
int hash_num = 0, i;
|
||||
unsigned char *ptr;
|
||||
|
@ -782,7 +782,7 @@ eet_close(Eet_File *ef)
|
|||
}
|
||||
|
||||
EAPI void *
|
||||
eet_read(Eet_File *ef, char *name, int *size_ret)
|
||||
eet_read(Eet_File *ef, const char *name, int *size_ret)
|
||||
{
|
||||
void *data = NULL;
|
||||
int size = 0;
|
||||
|
@ -871,7 +871,7 @@ eet_read(Eet_File *ef, char *name, int *size_ret)
|
|||
}
|
||||
|
||||
EAPI int
|
||||
eet_write(Eet_File *ef, char *name, void *data, int size, int compress)
|
||||
eet_write(Eet_File *ef, const char *name, void *data, int size, int compress)
|
||||
{
|
||||
int data_size;
|
||||
int hash;
|
||||
|
@ -1113,7 +1113,7 @@ eet_num_entries(Eet_File *ef)
|
|||
}
|
||||
|
||||
static Eet_File_Node *
|
||||
find_node_by_name(Eet_File *ef, char *name)
|
||||
find_node_by_name(Eet_File *ef, const char *name)
|
||||
{
|
||||
Eet_File_Node *efn;
|
||||
int hash;
|
||||
|
|
Loading…
Reference in New Issue