1 |
|
/* |
2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
< |
* s_misc.h: A header for the miscellaneous functions. |
2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
* |
4 |
< |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
4 |
> |
* Copyright (c) 1997-2014 ircd-hybrid development team |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
19 |
|
* USA |
20 |
< |
* |
21 |
< |
* $Id$ |
20 |
> |
*/ |
21 |
> |
|
22 |
> |
/*! \file s_misc.h |
23 |
> |
* \brief A header for the miscellaneous functions. |
24 |
> |
* \version $Id$ |
25 |
|
*/ |
26 |
|
|
27 |
|
#ifndef INCLUDED_s_misc_h |
34 |
|
#endif |
35 |
|
|
36 |
|
/* Just blindly define our own MIN/MAX macro */ |
35 |
– |
|
37 |
|
#define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) |
38 |
|
#define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) |
39 |
|
|
44 |
|
(((x) > _1MEG) ? "Megabytes" : "Kilobytes"))) |
45 |
|
#define _GMKv(x) (((x) > _1TER) ? (float)((x)/_1TER) : (((x) > _1GIG) ? \ |
46 |
|
(float)((x)/_1GIG) : (((x) > _1MEG) ? (float)((x)/_1MEG) : \ |
47 |
< |
(float)(x)))) |
47 |
> |
(float)(x)))) |
48 |
|
#endif |