eg_io.c File Reference

#include "eg_io.h"

Include dependency graph for eg_io.c:

Go to the source code of this file.

Functions

void EGdisplayString (void *str, FILE *file)
 display function for strings
void EGioDisCom (char **next, char **current, const char *delim, const char *comment, char *store, unsigned int storeSize, FILE *in)
 this discard all lines starting with comments and stores the next leading line in current and the next token in next, we assume that next does not contain data, and that current store the remainings of the current line
void EGioNParse (char *input, int max_argc, const char *delim, const char *comment, int *argc, char **argv)
 Given a string 'input' this function uses EGioParse to separate up to N words in it, we assume that argc is an array of pointers to strings of size N, and note that the input array will be changed.
void EGioParse (char **next, char **current, const char *delim, const char *comment)
 given two *pointers 'next' and 'current' and a constant set of strings (parse delimiters), it store in 'next the next meaningfull string, and in current the rest of the secuence, the idea is to iterate over 'next' while it is not true; you have to store the original pointer to the string stream elsewere; also, we assume that the original stream is terminated with ''; also, it will discaard any sub-string that start with #, that is inteded for discard comments
int EGioReadLine (char *const str, size_t const max_len, FILE *file)
 read a line from an input stream.
void EGmvar (char *str, int nind, const char *header,...)
 create names with indices


Function Documentation

void EGdisplayString void *  str,
FILE *  file
 

display function for strings

Parameters:
str pointer to a null terminated string of chars.
file pointer to a stream where we write the string.
Description:
This function just print the string on the file, it won't add a '
' at the end.

Definition at line 205 of file eg_io.c.

void EGioDisCom char **  next,
char **  current,
const char *  delim,
const char *  comment,
char *  store,
unsigned int  storeSize,
FILE *  in
 

this discard all lines starting with comments and stores the next leading line in current and the next token in next, we assume that next does not contain data, and that current store the remainings of the current line

Definition at line 173 of file eg_io.c.

Here is the call graph for this function:

void EGioNParse char *  input,
int  max_argc,
const char *  delim,
const char *  comment,
int *  argc,
char **  argv
 

Given a string 'input' this function uses EGioParse to separate up to N words in it, we assume that argc is an array of pointers to strings of size N, and note that the input array will be changed.

Definition at line 57 of file eg_io.c.

Here is the call graph for this function:

void EGioParse char **  next,
char **  current,
const char *  delim,
const char *  comment
 

given two *pointers 'next' and 'current' and a constant set of strings (parse delimiters), it store in 'next the next meaningfull string, and in current the rest of the secuence, the idea is to iterate over 'next' while it is not true; you have to store the original pointer to the string stream elsewere; also, we assume that the original stream is terminated with ''; also, it will discaard any sub-string that start with #, that is inteded for discard comments

Definition at line 88 of file eg_io.c.

int EGioReadLine char *const   str,
size_t const   max_len,
FILE *  file
 

read a line from an input stream.

Parameters:
str where to store the line.
max_len maximum allowed length.
file stream from where we read the input
Returns:
zero on success, non-zero otherwise, errors are cast when we can not read from the given file.

Definition at line 212 of file eg_io.c.

void EGmvar char *  str,
int  nind,
const char *  header,
  ...
 

create names with indices

Definition at line 21 of file eg_io.c.


Generated on Wed Nov 21 09:38:16 2007 for MTgomory by  doxygen 1.4.6