00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CREATE_H
00016 #define CREATE_H
00017
00018 #define Create(a,b,c) \
00019 if (!((a) = ( b * ) calloc(sizeof( b ), c ) )) \
00020 { printf ("Unable to malloc!\n"); exit(1); }
00021
00022 #define MyReCreate(a,b,c) \
00023 if (!((a) = ( b * ) realloc((void *) a, sizeof( b ) * (c) ) )) \
00024 { printf ("Unable to realloc!\n"); exit(1); }
00025
00026 #define ReCreate(a,b,c) \
00027 if (a) { MyReCreate(a,b,c); } else { Create(a,b,c); }
00028
00029 #define Free(a) if (a) {free(a);a=0;}
00030
00031 #endif