Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

misc.c File Reference

miscellaneous utility functions. More...

#include "common.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "misc.h"
#include "buffer.h"
#include "xmalloc.h"

Include dependency graph for misc.c:

Include dependency graph

Go to the source code of this file.

Defines

#define SIZE_INC   256
  increase size, by which the block is reallocated.


Functions

int getNextValue (int *beg, int *end, unsigned int from, const char *str)
 Returns the next key seperatet by space chars of the passed str beginning at "from". More...

char * getLine (FILE *file)
 Returns a single line from FILE* file. More...


Detailed Description

miscellaneous utility functions.

Definition in file misc.c.


Function Documentation

char* getLine FILE *    file
 

Returns a single line from FILE* file.

Parameters:
file  the file stream, from which the line is extracted
this is a trivial function, which extracts a line (finished by '
') and returns it (a char* to it).

Returns:
the line extracted, if none could be read, a zero length line is returned

Definition at line 67 of file misc.c.

int getNextValue int *    beg,
int *    end,
unsigned int    from,
const char *    str
 

Returns the next key seperatet by space chars of the passed str beginning at "from".

Parameters:
beg  returns the first valid char
end  returns the last! valid char (not the one after it)
from  pos in str, from where to check
str  the string to check
beg and *end and from are relative to str!!

Returns:
0 on success, -1 otherwise

Definition at line 36 of file misc.c.


Generated on Fri Jan 25 22:40:53 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001