GEL  0.99
file.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * This file is part of the GEL library.
5  * Copyright (c) 2005-08, IRIT- UPS
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef GEL_FILE_H
22 #define GEL_FILE_H
23 
24 #include <gel/common.h>
25 #include <gel/types.h>
26 #include <gel/util.h>
27 
29 
30 /* types */
31 typedef struct gel_file_info_t {
32  char ident[16];
33  char *filename;
43 
44 
45 /* flags */
46 #define GEL_OPEN_NOPLUGINS 0x00000001
47 #define GEL_OPEN_QUIET 0x00000002
48 
49 /* Externals */
50 extern int gel_errno;
51 
52 
53 /* Primitives */
54 void gel_close(gel_file_t *e);
57 gel_file_t *gel_open(const char *filename, const char *plugpath, int flags);
58 char *gel_strtab(gel_file_t *f, int sect, u32_t off);
59 
60 /* Symbol iterator */
64 
66 
67 #endif /* GEL_FILE_H */
#define __END_DECLS
Definition: common.h:29
#define __BEGIN_DECLS
Definition: common.h:28
__BEGIN_DECLS struct gel_file_info_t gel_file_info_t
int gel_file_endianness(gel_file_t *file)
Definition: file.c:496
gel_hash_enum_t gel_sym_iter_t
Definition: file.h:61
int gel_file_infos(gel_file_t *e, gel_file_info_t *fi)
Definition: gel_infos.c:36
int gel_errno
Definition: gel_error.c:42
gel_file_t * gel_open(const char *filename, const char *plugpath, int flags)
Definition: file.c:255
char * gel_strtab(gel_file_t *f, int sect, u32_t off)
Definition: file.c:469
void gel_close(gel_file_t *e)
Definition: file.c:406
gel_sym_t * gel_sym_first(gel_sym_iter_t *iter, gel_file_t *file)
Definition: sym.c:92
gel_sym_t * gel_sym_next(gel_sym_iter_t *iter)
Definition: sym.c:106
Definition: gel_types_plugin.h:74
Definition: file.h:31
vaddr_t entry
Definition: file.h:37
u16_t blknum
Definition: file.h:40
char * filename
Definition: file.h:33
char ident[16]
Definition: file.h:32
u16_t machine
Definition: file.h:35
u32_t version
Definition: file.h:36
u16_t prognum
Definition: file.h:39
gel_block_t ** blocks
Definition: file.h:41
u16_t type
Definition: file.h:34
u16_t sectnum
Definition: file.h:38
Definition: util.h:108
__BEGIN_DECLS typedef uint16_t u16_t
Definition: types.h:30
uint32_t u32_t
Definition: types.h:32
uint32_t vaddr_t
Definition: types.h:36
struct gel_sym_s gel_sym_t
Definition: types.h:45