Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 16. júl 2025

Súbor: [Platon] / libplaton / platon / macros.h (stiahnutie)

Revízia 1.12, Wed Jul 16 16:09:15 2003 UTC (22 years ago) by nepto


Zmeny od 1.11: +2 -2 [lines]

Changed string "Platon software development group"
to "Platon Software Development Group".

/**************************************************************************
 *                                                                        *
 *  Basic macros header file                                              *
 *                                                                        *
 *  Programmed by Ondrej Jombik <nepto@platon.sk>                         *
 *  Copyright (c) 1996-2000 Condy software inc.                           *
 *  Copyright (c) 2001-2003 Platon Software Development Group             *
 *  All rights reserved.                                                  *
 *                                                                        *
 *  Updates: 16.4.2000, 5.10.2001                                         *
 *  14.3.2002 - copyrights updates                                        *
 *            - swap() macro improvements                                 *
 *                                                                        *
 **************************************************************************/

/**
 * Basic C preprocessor macros
 *
 * @file    platon/macros.h
 * @author    Ondrej Jombik <nepto@platon.sk>
 * @version    \$Platon: libplaton/platon/macros.h,v 1.11 2003/04/23 19:28:35 nepto Exp $
 * @date    2000-2003
 */

/**
 * @mainpage
 * @htmlinclude mainpage.html
 */

#ifndef _PLATON_MACROS_H
#define _PLATON_MACROS_H

/** Returns lower from two numbers */
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif

/** Returns higher from two numbers */
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif

/** Swap two numbers without using temporary variable */
#ifndef swap
#define swap(a, b) \
do { \
    (a) += (b); \
        (b) =  (a) - (b); \
        (a) -= (b); \
} while (0)
#endif

#endif /* #ifndef _PLATON_MACROS_H */


Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok