Subversion Repositories autosfx

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. #ifndef _ZIP_ASSERT_H_  
  3. #define _ZIP_ASSERT_H_
  4. /*
  5.  
  6.   Copyright (c) 1990-2007 Info-ZIP.  All rights reserved.
  7.  
  8.   See the accompanying file LICENSE, version 2007-Mar-4 or later
  9.   (the contents of which are also included in zip.h) for terms of use.
  10.   If, for some reason, all these files are missing, the Info-ZIP license
  11.   also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
  12.  
  13.   parts Copyright (C) 1997 Mike White, Eric W. Engler
  14. ************************************************************************
  15.  Copyright (C) 2009, 2010  by Russell J. Peters, Roger Aelbrecht
  16.  
  17.    This file is part of TZipMaster Version 1.9.
  18.  
  19.     TZipMaster is free software: you can redistribute it and/or modify
  20.     it under the terms of the GNU Lesser General Public License as published by
  21.     the Free Software Foundation, either version 3 of the License, or
  22.     (at your option) any later version.
  23.  
  24.     TZipMaster is distributed in the hope that it will be useful,
  25.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.     GNU Lesser General Public License for more details.
  28.  
  29.     You should have received a copy of the GNU Lesser General Public License
  30.     along with TZipMaster.  If not, see <http://www.gnu.org/licenses/>.
  31.  
  32.     contact: problems@delphizip.org (include ZipMaster in the subject).
  33.     updates: http://www.delphizip.org
  34.     DelphiZip maillist subscribe at http://www.freelists.org/list/delphizip
  35. ************************************************************************/
  36. /* Diagnostic functions */
  37. #ifdef DEBUG
  38. #ifdef MSDOS
  39. #undef stderr
  40. #define stderr  stdout
  41. #endif
  42. #define Assert(cond, msg) \
  43.   {                             \
  44.     if (!(cond))              \
  45.       throw DZException(DZM_Error, msg);         \
  46.   }
  47.  
  48. //            Notify(IERROR, _T("invalid new name %s"), nme);
  49. #define Trace(x)      \
  50.       Notify(DZM_Trace, (x));
  51.  
  52. #define Tracev(x, y) \
  53.   {                     \
  54.     if (Verbose)  Notify(DZM_Trace, (x), (y)); \
  55.   }
  56.  
  57. #define Tracevv(x, y)    \
  58.   {                                         \
  59.     if (Verbose > 1) Notify(DZM_Trace, (x), (y)); \
  60.   }
  61.  
  62. #define Tracec(c, x, y)    \
  63.   {                           \
  64.     if (Verbose && (c))   Notify(DZM_Trace, (x), (y)); \
  65.   }
  66.  
  67. #define Tracecv(c, x, y)       \
  68.   {                               \
  69.     if (Verbose > 1 && (c)) Notify(DZM_Trace, (x), (y)); \
  70.   }
  71.  
  72. #else
  73. #define Assert(cond, msg)
  74. #define Trace(x)
  75. #define Tracev(x, y)
  76. #define Tracevv(x, y)
  77. #define Tracec(c, x, y)
  78. #define Tracecv(c, x, y)
  79. #endif
  80.  
  81. #endif
  82.