DLTypes.h

Go to the documentation of this file.
00001 #ifndef __DLTYPES_H
00002 #define __DLTYPES_H
00003 
00004 #include <cmath>
00005 #include <cstdio>
00006 using namespace std;
00007 
00008 
00009 // These consts are for Connected Components
00010 typedef unsigned char DL_BYTE;
00011 typedef short DL_SHORT; 
00012 typedef unsigned char DL_UBYTE; 
00013 
00014 
00016 #define dlSetarr(a,n,y,v) { \
00017         y *p; \
00018         for(p=a;p<a+n;p++)*p = v; \
00019 }
00020 
00021 #define dlRealloc(w,x,inc,y,z) \
00022 { \
00023     x = x  + inc;  \
00024     w = (y *)realloc(w,x*sizeof(y)); \
00025     if (w == NULL) { \
00026     printf("Error. Out of memory - %s\n",z); \
00027     exit (0); \
00028     } \
00029 }
00030 
00031 
00032 #endif

DOCLIB is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz | Allen | Hamilton

All Rights Reserved, 2003-2007