INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
Data Structures | Defines | Typedefs | Functions
C:/cygwin/home/Javier/insee/src/literal.h File Reference

Definition of a literal that links a string to a number. More...

#include "misc.h"
Include dependency graph for literal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  literal_t

Defines

#define LITERAL_END   { 0, NULL }
 This must be the last literal in an array.

Typedefs

typedef struct literal_t literal_t

Functions

bool_t literal_value (literal_t *literal, char *name, long *value)
bool_t literal_name (literal_t *literal, char **name, long value)

Detailed Description

Definition of a literal that links a string to a number.

This tools are used for read the fsin.conf file & the command line parameters(arguments) of the simulation & print them in the final brief.

See also:
get_conf.c

FSIN Functional Simulator of Interconnection Networks Copyright (2003-2011) J. Miguel-Alonso, A. Gonzalez

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Typedef Documentation

typedef struct literal_t literal_t

Structure to contain a literal. This is a bijective union between a string & a number.

See also:
get_conf.c
print_results.c

Function Documentation

bool_t literal_name ( literal_t l,
char **  name,
long  value 
)

Searches for a value in a literal array.

This function takes an array of literals and finds the string corresponding to a value.

Parameters:
lan array of literals.
namethe corresponding string is returned here.
valuethe value we are searching for.
Returns:
if 'value' is in 'l' TRUE, else FALSE.
See also:
print_results.c
bool_t literal_value ( literal_t l,
char *  name,
long *  value 
)

Searches for a string in a literal array.

This function takes an array of literals and finds the value corresponding to a string.

Parameters:
larray of literals.
namethe string we are searching for.
valuethe corresponding value for the string is returned here.
Returns:
if 'name' is in 'l' TRUE, else FALSE.
See also:
get_conf.c