forked from enlightenment/efl
Use only the needed headers per file and remove some warning.
SVN revision: 35253
This commit is contained in:
parent
f4bfef330c
commit
86f58ba639
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_ERROR_H_
|
||||
#define EINA_ERROR_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
#define EINA_ERROR_PERR(fmt, ...) \
|
||||
eina_error_print(EINA_ERROR_LEVEL_ERR, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_FILE_H_
|
||||
#define EINA_FILE_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
* @defgroup File_Group Memory File
|
||||
* @{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_HASH_H_
|
||||
#define EINA_HASH_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_INLIST_H_
|
||||
#define EINA_INLIST_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
* @defgroup Inline_List_Group Inline List
|
||||
* @{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_LALLOC_H_
|
||||
#define EINA_LALLOC_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
* @defgroup Array_Group Array
|
||||
* @{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_LIST_H_
|
||||
#define EINA_LIST_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
* @defgroup List_Group List
|
||||
* @{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef EINA_MEMPOOL_H_
|
||||
#define EINA_MEMPOOL_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
|
||||
/**
|
||||
* @defgroup Memory_Pool_Group Memory Pool
|
||||
* @{
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef EINA_MODULE_H_
|
||||
#define EINA_MODULE_H_
|
||||
|
||||
#include "eina_types.h"
|
||||
#include "eina_list.h"
|
||||
|
||||
/**
|
||||
* @defgroup Module_Group Module
|
||||
* @{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
|
@ -18,7 +17,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define DEBUG
|
||||
#include <assert.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_error.h"
|
||||
#include "eina_list.h"
|
||||
#include "eina_private.h"
|
||||
/* TODO
|
||||
* + printing errors to stdout or stderr can be implemented
|
||||
|
@ -24,9 +25,9 @@ static int _err;
|
|||
|
||||
|
||||
#ifdef DEBUG
|
||||
static _error_level = EINA_ERROR_LEVEL_DBG;
|
||||
static Eina_Error_Level _error_level = EINA_ERROR_LEVEL_DBG;
|
||||
#else
|
||||
static _error_level = EINA_ERROR_LEVEL_ERR;
|
||||
static Eina_Error_Level _error_level = EINA_ERROR_LEVEL_ERR;
|
||||
#endif
|
||||
|
||||
static char *_colors[EINA_ERROR_LEVELS] = {
|
||||
|
@ -67,7 +68,7 @@ EAPI int eina_error_init(void)
|
|||
char *level;
|
||||
/* TODO register the eina's basic errors */
|
||||
/* TODO load the environment variable for getting the log level */
|
||||
if (level = getenv("EINA_ERROR_LEVEL"))
|
||||
if ((level = getenv("EINA_ERROR_LEVEL")))
|
||||
{
|
||||
_error_level = atoi(level);
|
||||
}
|
||||
|
@ -119,7 +120,7 @@ EAPI int eina_error_get(void)
|
|||
/**
|
||||
*
|
||||
*/
|
||||
EAPI int eina_error_set(int err)
|
||||
EAPI void eina_error_set(int err)
|
||||
{
|
||||
_err = err;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "Eina.h"
|
||||
#define _GNU_SOURCE
|
||||
#include <string.h>
|
||||
|
||||
#include "eina_file.h"
|
||||
#include "eina_private.h"
|
||||
/*============================================================================*
|
||||
* API *
|
||||
|
@ -18,10 +21,8 @@ EAPI void eina_file_dir_list(const char *dir, int recursive, Eina_File_Dir_List_
|
|||
if (!d)
|
||||
return;
|
||||
|
||||
while (de = readdir(d))
|
||||
while ((de = readdir(d)))
|
||||
{
|
||||
int length;
|
||||
|
||||
if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
|
||||
continue;
|
||||
|
||||
|
@ -64,7 +65,7 @@ EAPI void eina_file_path_nth_get(const char *path, int n, char **left, char **ri
|
|||
inc = -1;
|
||||
end = (char *)path;
|
||||
}
|
||||
for (tmp = p; tmp != end, num != n; tmp += inc)
|
||||
for (tmp = p, delim = p; tmp != end && num != n; tmp += inc)
|
||||
{
|
||||
if (*tmp == '/')
|
||||
{
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_hash.h"
|
||||
#include "eina_inlist.h"
|
||||
#include "eina_error.h"
|
||||
#include "eina_private.h"
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
|
@ -94,12 +96,6 @@ eina_hash_add(Eina_Hash *hash, const char *key, const void *data)
|
|||
el->data = (void *)data;
|
||||
hash_num = _eina_hash_gen(key);
|
||||
hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], el);
|
||||
if (eina_list_alloc_error())
|
||||
{
|
||||
_eina_hash_alloc_error = 1;
|
||||
free(el);
|
||||
return hash;
|
||||
}
|
||||
hash->population++;
|
||||
return hash;
|
||||
}
|
||||
|
@ -157,12 +153,6 @@ eina_hash_direct_add(Eina_Hash *hash, const char *key, const void *data)
|
|||
el->data = (void *)data;
|
||||
hash_num = _eina_hash_gen(key);
|
||||
hash->buckets[hash_num] = eina_inlist_prepend(hash->buckets[hash_num], el);
|
||||
if (eina_list_alloc_error())
|
||||
{
|
||||
_eina_hash_alloc_error = 1;
|
||||
free(el);
|
||||
return hash;
|
||||
}
|
||||
hash->population++;
|
||||
return hash;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_inlist.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
/* TODO please, refactor this :) */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_lalloc.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
struct _Eina_Array
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_list.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
struct _Eina_List /** A linked list node */
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_mempool.h"
|
||||
#include "eina_list.h"
|
||||
#include "eina_module.h"
|
||||
#include "eina_private.h"
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "Eina.h"
|
||||
#include "eina_module.h"
|
||||
#include "eina_file.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
#include <dirent.h>
|
||||
|
|
Loading…
Reference in New Issue