Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/utils.h File Reference

Some helpful functions. More...

#include <gobjconfig.h>
#include <stdio.h>

Defines

#define GJ_SEGFAULT   *((char*)0) = 0
 Produce a segmentation fault. More...

#define GJ_DORET(func)    if((func) == -1) ret = -1;
 Help function for Gj_*_delete's. More...


Functions

void Gj_indent (FILE* stream, int* indent)
 Print out spaces onto the given stream. More...

char* Gj_getInternalErrCause ()
 Get the cause of the last internal error. More...


Detailed Description

Some helpful functions.


Define Documentation

#define GJ_SEGFAULT   *((char*)0) = 0
 

Produce a segmentation fault.

Use this a follows:

GJ_SEGFAULT; 

#define GJ_DORET( func )   if((func) == -1) ret = -1;
 

Help function for Gj_*_delete's.

Test the variable ret. If ret is == 0, func is called and its return value stored in ret. Else func is called without storing the result in ret.


Function Documentation

void Gj_indent ( FILE * stream,
int * indent )
 

Print out spaces onto the given stream.

Parameters:
stream   The output stream.
indent   Space count.

char * Gj_getInternalErrCause ( )
 

Get the cause of the last internal error.

Returns:
The error cause allocated via Gj_alloc.


Generated at Fri Aug 17 18:28:58 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000