
//
// AT_DEFS.H -- basic types for Architech projects
//

#ifndef AT_DEFS_H
#define AT_DEFS_H

// all common data types used in all ATSI projects AV
#include "at_types.h"

#if defined BLD_ATRETRIEVE || \
    defined BLD_ATAPPL     || \
    defined BLD_ATDDP      || \
    defined BLD_AUTHOR

   // control export and import of DLL components
#  ifdef BLD_ATRETRIEVE  // building AT_RETRIEVE.DLL
#    define SEARCH_DECL __declspec(dllexport)
#  else
#    define SEARCH_DECL __declspec(dllimport)

#    ifdef BLD_ATAPPL    // building AT_APPL.DLL
#      define APPL_DECL __declspec(dllexport)
#    else
#      define APPL_DECL __declspec(dllimport)
#    endif

#  endif

#else
   // not building DLLs
#  define SEARCH_DECL
#  define SEARCH_DECL
#  define SEARCH_DECL
#  define APPL_DECL

#endif


#define CHECKHEAP_ERR

template <typename T>
inline 
T pow10(int p)
{
  T multiplier = 1;
  while (p--)
    multiplier *= 10;
  return multiplier;
}

// PS: ?
enum { MAXPATH = 100 };

#endif
