Layers
Diffusion in heterogeneous environments
Functions
extras.c File Reference

Extra functions that are useful for 3layer. More...

#include "header.h"
Include dependency graph for extras.c:

Go to the source code of this file.

Functions

void error (char *errorstring,...)
 Print an error message to stderr and exit with status EXIT_FAILURE. More...
 
void print_usage (char *program)
 Print usage message and exit with status EXIT_FAILURE. More...
 
double * create_array (int N, char *string)
 Create an array of doubles of the specified size. More...
 

Detailed Description

Extra functions that are useful for 3layer.

Author
David Lewis, CABI, NKI
Date
2012-2013

Definition in file extras.c.

Function Documentation

double* create_array ( int  N,
char *  string 
)

Create an array of doubles of the specified size.

Also initialize the array to all 0.

Parameters
[in]NNumber of elements in array
[in]stringString containing a description of the array (for debugging purposes)
Returns
Pointer to the new array

Definition at line 105 of file extras.c.

Here is the caller graph for this function:

void error ( char *  errorstring,
  ... 
)

Print an error message to stderr and exit with status EXIT_FAILURE.

Parameters
[in]errorstringString containing error message (variable-length argument list, like printf)

Definition at line 20 of file extras.c.

Here is the caller graph for this function:

void print_usage ( char *  program)

Print usage message and exit with status EXIT_FAILURE.

Parameters
[in]programString containing the name of the program

Definition at line 40 of file extras.c.

Here is the caller graph for this function: