hlrmisc.h File Reference

#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define hlr_getAllocCnt()   hlr_allocCnt
 Get the number of pending allocations.
#define hlr_itoa(s, i)   sprintf(s,"%d",i)
 Convert an integer into a string.
#define MAX(a, b)   ((a)<(b)?(b):(a))
 Maximum of a and b.
#define MIN(a, b)   ((a)>(b)?(b):(a))
 Minimum of a and b.
#define NUMELE(a)   ((int)sizeof(a)/sizeof(a[0]))
 Number of elements in a.

Functions

int hlr_system (char *cmd, int nonZeroOK)
 Execute shell command.


Detailed Description

Author:
Adapted by Lukas Habegger (lukas.habegger@yale.edu)

Definition in file hlrmisc.h.


Function Documentation

int hlr_system ( char *  cmd,
int  nonZeroOK 
)

Execute shell command.

Parameters:
[in] cmd 
[in] nonZeroOK If 1, then a non-zero exit status from system is tolerated. If 0, then a non-zero exit status from system leads to a die()
Returns:
Exit status (0=OK). A non-zero exit status is only be returned if nonZeroOK=1
Note:
Exit status -1 indicates a serious condition of the operating system therefore causes a die() even if nonZeroOK is 1.

Definition at line 110 of file hlrmisc.c.


Generated on Fri Aug 7 15:46:43 2009 for BIOS by  doxygen 1.5.7.1