GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> CMX / V2-13-7 > cmx_interface / rhel6-64
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <CMX_interface_prv.h>
Defines | |
#define | CMX_L_TOKEN 4096 |
Functions | |
static unsigned int | hierarchy (struct _CMX_Interface *ifac, struct _CMX_Instance *inst, struct _CMX_Hierarchy **hier) |
Fill in a node in the hierarchy. | |
static unsigned int | parse_global (char *name, struct _CMX_Interface *ifac, struct _CMX_Instance *inst, signed int line) |
Parse a global symbol name. | |
static struct _CMX_Instance * | parse_interface (char *name, struct _CMX_Interface *ifac, struct _CMX_Instance *inst, signed int type, signed int line) |
Parse an interface name. | |
static unsigned int | parse_local (char *name, struct _CMX_Instance *inst, signed int line) |
Parse a local symbol name. | |
static unsigned int | validate (struct _CMX_Interface *head) |
Ensure that a linker script meets CMX restrictions. | |
unsigned int | CMX_interfaceRead (struct _CMX_Interface **ifac, const char *file) |
Parse a (CMX version) linker interface description file. |
CMX_interfaceRead reads and parses a linker interface description file. CMX linker interface description files have slightly more stringent syntax rules than the standard. Non-adherence to these rules is regarded as a fatal error.
CVS $Id: CMX_interfaceRead.c,v 1.5 2010/04/22 23:41:29 apw Exp $
unsigned int CMX_interfaceRead | ( | struct _CMX_Interface ** | ifac, | |
const char * | file | |||
) |
Parse a (CMX version) linker interface description file.
ifac | Pointer to an interface description header block | |
file | Filename of script file to be parsed |
0 | Success | |
1 | Failure |
References _CMX_Instance::global, hierarchy(), _CMX_Instance::local, parse_global(), parse_interface(), parse_local(), and validate().
unsigned int hierarchy | ( | struct _CMX_Interface * | ifac, | |
struct _CMX_Instance * | inst, | |||
struct _CMX_Hierarchy ** | hier | |||
) | [static] |
Fill in a node in the hierarchy.
ifac | Interface description header block | |
inst | Instance being filled out | |
hier | Pointer to head of instance list |
0 | Success | |
1 | Failure |
References CMX_interfaceCollate(), _CMX_Hierarchy::down, _CMX_Hierarchy::inst, _CMX_Interface::inst, _CMX_Hierarchy::next, _CMX_Instance::next, and _CMX_Instance::parloc.
Referenced by CMX_interfaceRead().
static unsigned int parse_global | ( | char * | name, | |
struct _CMX_Interface * | ifac, | |||
struct _CMX_Instance * | inst, | |||
signed int | line | |||
) | [static] |
Parse a global symbol name.
name | String to parse | |
ifac | Interface description header block | |
inst | Instance being parsed | |
line | Line number being parsed. |
0 | Success | |
1 | Failure |
References _CMX_Instance::global, _CMX_Symbol::inst, _CMX_Interface::isym, _CMX_Symbol::name, _CMX_Symbol::next, and _CMX_Symbol::xprt.
Referenced by CMX_interfaceRead().
static struct _CMX_Instance * parse_interface | ( | char * | name, | |
struct _CMX_Interface * | ifac, | |||
struct _CMX_Instance * | inst, | |||
signed int | type, | |||
signed int | line | |||
) | [static, read] |
Parse an interface name.
name | String to parse | |
ifac | Interface description header block | |
inst | Instance being parsed | |
type | Type of name (interface name or parent name) | |
line | Line number being parsed |
NULL | Failure | |
x | Pointer to created/referenced interface instance |
References _CMX_Instance::global, _CMX_Interface::inst, _CMX_Instance::kidcnt, _CMX_Instance::local, _CMX_Instance::major, _CMX_Instance::minor, _CMX_Instance::name, _CMX_Instance::next, _CMX_Instance::parent, _CMX_Instance::parloc, _CMX_Instance::patch, and _CMX_Instance::stem.
Referenced by CMX_interfaceRead().
static unsigned int parse_local | ( | char * | name, | |
struct _CMX_Instance * | inst, | |||
signed int | line | |||
) | [static] |
Parse a local symbol name.
name | String to parse | |
inst | Instance being parsed | |
line | Line number being parsed. |
0 | Success | |
1 | Failure |
References _CMX_Symbol::inst, _CMX_Instance::local, _CMX_Symbol::name, _CMX_Symbol::next, and _CMX_Symbol::xprt.
Referenced by CMX_interfaceRead().
static unsigned int validate | ( | struct _CMX_Interface * | head | ) | [static] |
Ensure that a linker script meets CMX restrictions.
head | Overall control structure. |
0 | Success | |
1 | Failure |
References _CMX_Instance::global, _CMX_Interface::inst, _CMX_Instance::kidcnt, _CMX_Instance::local, _CMX_Instance::major, _CMX_Interface::maxnam, _CMX_Interface::maxver, _CMX_Instance::minor, _CMX_Symbol::name, _CMX_Instance::name, _CMX_Instance::next, _CMX_Instance::parent, _CMX_Instance::parloc, _CMX_Instance::patch, and _CMX_Instance::stem.
Referenced by CMX_interfaceRead().