~ubuntu-branches/ubuntu/natty/xbill/natty

« back to all changes in this revision

Viewing changes to util.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2004-09-07 09:52:14 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040907095214-d0m46ojc8f7upuqm
Tags: 2.1-4
maintainer upload of NMU - many thanks Tollef (closes: #268885) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef UTIL_H
 
2
#define UTIL_H
 
3
 
 
4
#include <stdlib.h>
 
5
 
 
6
#ifdef RAND
 
7
#undef RAND
 
8
#endif
 
9
#define RAND(lb, ub) (rand() % ((ub) - (lb) + 1) + (lb))
 
10
 
 
11
#ifdef MAX
 
12
#undef MAX
 
13
#endif
 
14
#define MAX(x, y) ((x) > (y) ? (x) : (y))
 
15
 
 
16
#ifdef MIN
 
17
#undef MIN
 
18
#endif
 
19
#define MIN(x, y) ((x) < (y) ? (x) : (y))
 
20
 
 
21
#ifdef UNUSED
 
22
#undef UNUSED
 
23
#endif
 
24
#define UNUSED(x) (void)(x)
 
25
 
 
26
void *xalloc(int size);
 
27
void fatal(const char *format, ...);
 
28
 
 
29
#endif