INSEE 05.04.2011
Interconnection Nertworks Simulation and Evaluation Environment
|
Definition of a literal that links a string to a number. More...
#include "misc.h"
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) |
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.
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.
Structure to contain a literal. This is a bijective union between a string & a number.
Searches for a value in a literal array.
This function takes an array of literals and finds the string corresponding to a value.
l | an array of literals. |
name | the corresponding string is returned here. |
value | the value we are searching for. |
Searches for a string in a literal array.
This function takes an array of literals and finds the value corresponding to a string.
l | array of literals. |
name | the string we are searching for. |
value | the corresponding value for the string is returned here. |