equal
deleted
inserted
replaced
33 return aptr; |
33 return aptr; |
34 } |
34 } |
35 |
35 |
36 |
36 |
37 void *Realloc (void *aptr, size_t nbytes) { |
37 void *Realloc (void *aptr, size_t nbytes) { |
38 #ifndef _WIN32 |
|
39 aptr = reallocf(aptr, nbytes); |
|
40 #else |
|
41 aptr = realloc(aptr, nbytes); |
38 aptr = realloc(aptr, nbytes); |
42 #endif |
39 |
43 if (aptr == NULL) { |
40 if (aptr == NULL) { |
44 fprintf(stderr, "ERROR: not enough memory! realloc() failed\n"); |
41 fprintf(stderr, "ERROR: not enough memory! realloc() failed\n"); |
45 #ifdef _WIN32 |
|
46 free(aptr); |
42 free(aptr); |
47 #endif |
|
48 exit(-1); |
43 exit(-1); |
49 } |
44 } |
50 return aptr; |
45 return aptr; |
51 } |
46 } |
52 |
47 |