Update docs. Redo MIN,MAX macros

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2982 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1998-09-18 13:51:00 +00:00
parent d785d16a4a
commit cc6591f99e
3 changed files with 7 additions and 43 deletions

View file

@ -1,3 +1,8 @@
Fri Sep 18 10:21:38 1998 Adam Fedor <fedor@ultra.doc.com>
* Source/NSClipView.m (MIN, MAX): Remove.
* Source/NSMatrix.c: Likewise.
Mon Sep 14 1998 Felipe A. Rodriguez <far@ix.netcom.com>
* NSEvent.m extensive optimization.

View file

@ -37,22 +37,6 @@
[a release]; \
a = b;
#ifdef MIN
# undef MIN
#endif
#define MIN(a, b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a < _b ? _a : _b; })
#ifdef MAX
# undef MAX
#endif
#define MAX(a, b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a > _b ? _a : _b; })
@implementation NSClipView
- init

View file

@ -52,34 +52,9 @@
[a release]; \
a = b;
#ifdef MIN
# undef MIN
#endif
#define MIN(a, b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a < _b ? _a : _b; })
#ifdef MAX
# undef MAX
#endif
#define MAX(a, b) \
({typedef _ta = (a), _tb = (b); \
_ta _a = (a); _tb _b = (b); \
_a > _b ? _a : _b; })
#ifdef ABS
# undef ABS
#endif
#define ABS(x) \
({typedef _tx = (x); \
_tx _x = (x); \
_x >= 0 ? _x : -_x; })
#define SIGN(x) \
({typedef _tx = (x); \
_tx _x = (x); \
_x > 0 ? 1 : (_x == 0 ? 0 : -1); })
({typeof(x) _SIGN_x = (x); \
_SIGN_x > 0 ? 1 : (_SIGN_x == 0 ? 0 : -1); })
#define FREE(p) do { if (p) free (p); } while (0)