Changeset 7

Show
Ignore:
Timestamp:
12/02/98 14:32:48 (10 years ago)
Author:
warmerda
Message:

Added some new definitions.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/port/gdal_port.h

    r3 r7  
    3939 * 
    4040 * $Log$ 
     41 * Revision 1.2  1998/12/02 19:32:48  warmerda 
     42 * Added some new definitions. 
     43 * 
    4144 * Revision 1.1  1998/10/18 06:15:11  warmerda 
    4245 * Initial implementation. 
     
    6972#include <math.h> 
    7073#include <stdarg.h> 
     74#include <string.h> 
    7175 
    7276/* ==================================================================== */ 
     
    8993#endif 
    9094 
     95#ifndef FALSE 
     96#  define FALSE 0 
     97#endif 
     98 
     99#ifndef TRUE 
     100#  define TRUE  1 
     101#endif 
     102 
     103#ifndef MAX 
     104#  define MIN(a,b)      ((a<b) ? a : b) 
     105#  define MAX(a,b)      ((a>b) ? a : b) 
     106#endif 
     107 
     108#ifndef ABS 
     109#  define ABS(x)        ((x<0) ? (-1*(x)) : x) 
     110#endif 
     111 
     112#ifndef EQUAL 
     113#  define EQUALN(a,b,n)           (strncasecmp(a,b,n)==0) 
     114#  define EQUAL(a,b)              (strcasecmp(a,b)==0) 
     115#endif 
     116 
    91117/* ==================================================================== */ 
    92118/*      Error handling.                                                 */ 
     
    107133GBSErr GDAL_DLL GBSGetError( char ** ); 
    108134 
     135void GDAL_DLL _GBSAssert( const char *, const char *, int ); 
     136 
     137#ifdef DEBUG 
     138#  define GBSAssert(expr)  ((expr) ? (0) : _GBSAssert(#expr,__FILE__,__LINE__)) 
     139#else 
     140#  define GBSAssert(expr) 
     141#endif 
     142 
    109143GDAL_C_END 
    110144