Revision 1895

trunk/src/linad99/gradstrc.cpp (revision 1895)
26 26
  #include <alloc.h>
27 27
#endif
28 28

  
29
#include <stdlib.h>
30

  
29 31
#ifdef __ZTC__
30 32
  #include <iostream.hpp>
31
  #ifndef DOS386
32
    int _cdecl farfree(void _far *ptr);
33
  #endif
33
  int _cdecl farfree(void _far *ptr);
34
  void _far * _cdecl farmalloc(unsigned long size);
34 35
#endif
35 36

  
36

  
37
#include <stdlib.h>
38
#ifdef __ZTC__
39
  #ifndef DOS386
40
    int _cdecl farfree(void _far *ptr);
41
    void _far * _cdecl farmalloc(unsigned long size);
42
  #endif
43
#endif
44

  
45
//void adwait(double);
46

  
47 37
extern ofstream clogf;
48 38
#ifndef __SUNPRO_CC
49 39
typedef int (* fptr) (const char * format, ...) ;
50 40
#endif
51 41

  
42
//void adwait(double);
52 43
fptr ad_printf = printf;
53 44
extern "C"{
54 45
  exitptr ad_exit=&exit;
......
403 394
   }
404 395
 */
405 396

  
406
#if defined(DOS386) || defined (_MSC_VER) || defined (__WAT32__)
407
   if ((temp_ptr = (void *) malloc(ARRAY_MEMBLOCK_SIZE )) == 0)
397
#ifdef __ZTC__
398
   if ((temp_ptr = farmalloc(ARRAY_MEMBLOCK_SIZE)) == 0)
408 399
#else
409
   if ((temp_ptr = farmalloc(ARRAY_MEMBLOCK_SIZE) ) == 0)
400
   if ((temp_ptr = (void*)malloc(ARRAY_MEMBLOCK_SIZE)) == 0)
410 401
#endif
411 402
   {
412 403
     cerr << "insufficient memory to allocate space for ARRAY_MEMBLOCKa\n";

Also available in: Unified diff