(ABS): New macro, defined if not already defined.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-03-30 16:01:43 +00:00
parent 3eb99042d6
commit 5054040415
3 changed files with 21 additions and 0 deletions

View file

@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
_a < _b ? _a : _b; })
#endif
#ifndef ABS
#define ABS(a) \
({typedef _ta = (a); \
_ta _a = (a); \
_a < 0 ? -_a : _a; })
#endif
#ifndef STRINGIFY
#define STRINGIFY(s) XSTRINGIFY(s)
#define XSTRINGIFY(s) #s

View file

@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
_a < _b ? _a : _b; })
#endif
#ifndef ABS
#define ABS(a) \
({typedef _ta = (a); \
_ta _a = (a); \
_a < 0 ? -_a : _a; })
#endif
#ifndef STRINGIFY
#define STRINGIFY(s) XSTRINGIFY(s)
#define XSTRINGIFY(s) #s

View file

@ -103,6 +103,13 @@ LAMBDA(BOOL, (id _o), {if ([_o perform:SELECTOR]) return YES; else return NO;})
_a < _b ? _a : _b; })
#endif
#ifndef ABS
#define ABS(a) \
({typedef _ta = (a); \
_ta _a = (a); \
_a < 0 ? -_a : _a; })
#endif
#ifndef STRINGIFY
#define STRINGIFY(s) XSTRINGIFY(s)
#define XSTRINGIFY(s) #s