HNBody Version 1.0.10

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
util.h File Reference

Header file for library management and other miscellaneous utilities. More...

`#include "mutils/platform.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <strings.h>`
`#include <unistd.h>`
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | MU_VERMAX 32 /* Max length of version string. */
#define | MU_DATEMAX 24 /* Max length of cppdate string. */
#define | MU_iferr_abort(err, func)
#define | MU_iferr_warn(err, func)
#define | MU_iferr(err, func)
#define | MU_iferrn_abort(err, func)
#define | MU_iferrn_warn(err, func)
#define | MU_iferrn(err, func)
#define | mu_alloc(s) mu_alloc_r(NULL, s)
#define | mu_realloc(p, s) mu_realloc_r(NULL, p, s)
#define | mu_free(p) mu_free_r(NULL, p)
#define | mu_freeall() mu_freeall_r(NULL)

## Functions
DLLSPEC void | mu_cppdate (char str[], const char *date, const char *time)
DLLSPEC void | mu_error_action (int, const char *, const char *, int, int)
DLLSPEC void | mu_split_tag (char pre[], int *maj, int *min, int *clas, int *bug, int *y, int *m, int *d, const char *tag)
DLLSPEC char * | mu_fgetline (char *, long int, FILE *)
DLLSPEC const char * | mu_platform (void)
DLLSPEC const char * | mu_version (void)
DLLSPEC const char * | mu_verstr (char verstr[], const char *pre, int maj, int min, int clas, int bug)
DLLSPEC int | mu_ppmtext (char *, char *, int, int, int)
DLLSPEC int | mu_vernum (const char *name, const char *cvs)
DLLSPEC int | mu_free_r (void **, void *)
DLLSPEC void | mu_freeall_r (void *)
DLLSPEC void * | mu_alloc_r (void **, size_t)
DLLSPEC void * | mu_realloc_r (void **, void *, size_t)
DLLSPEC int | mu_clock_Hz (void)
DLLSPEC void | mu_wait_time (double)
DLLSPEC double | mu_clock_time (void)
DLLSPEC double | mu_cpu_time (void)
DLLSPEC double | mu_system_time (void)
DLLSPEC double | mu_user_time (void)
DLLSPEC int | mu_getopt (int argc, char *const argv[], const char *opts)
DLLSPEC double | mu_time_unary (double(*fn)(double), double x1, double x2, double tmin)
DLLSPEC double | mu_time_binary (double(*fn)(double, double), double x1, double x2, double y1, double y2, double tmin)

## Variables
DLLSPEC char * | mu_optarg
DLLSPEC int | mu_opterr
DLLSPEC int | mu_optind
DLLSPEC int | mu_optopt

## Detailed Description

Id
  util.h,v 1.11 2005/08/26 22:00:03 rauch Exp

Author
  Kevin P. Rauch

## Macro Definition Documentation

#define MU_iferr | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
if (err) mu_error_action(-1, func, __FILE__, __LINE__, 1); } while (0)

#define MU_iferr_abort | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
if (err) mu_error_action(-1, func, __FILE__, __LINE__, -1); } while (0)

#define MU_iferr_warn | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
if (err) mu_error_action(-1, func, __FILE__, __LINE__, 0); } while (0)

#define MU_iferrn | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
int errn=(err); \
if (errn) mu_error_action(errn, func, __FILE__, __LINE__, 1); } while (0)

#define MU_iferrn_abort | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
int errn=(err); \
if (errn) mu_error_action(errn, func, __FILE__, __LINE__, -1); } while (0)

#define MU_iferrn_warn | ( |  | err,
|  |  | func
| ) |  |

Value:
do { \
int errn=(err); \
if (errn) mu_error_action(errn, func, __FILE__, __LINE__, 0); } while (0)