ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ptr2.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 #include "fvar.hpp"
12 #ifdef __ZTC__
13 #include <iostream.hpp>
14 #endif
15 
16 #ifdef __TURBOC__
17 #pragma hdrstop
18 #pragma options -h-
19 #include <iostream.h>
20 #endif
21 #include <stdlib.h>
22 
23 #if defined(__ZTC__)
24  #if defined( __NDPX__) || defined(__SUN__)
25 void * _farptr_fromlong(long int i)
26  #else
27 void * _farptr_fromlong(unsigned long int i)
28  #endif
29 {
30  return( (void *) i);
31 }
32 #endif
33 
38 #ifdef DIAG
39 long int _farptr_tolong(void * ptr)
40 {
41  return( (long int) ptr);
42 }
43 long int farptr_tolong(void * ptr)
44 {
45  return _farptr_tolong(ptr);
46 }
47 #endif
48 
49 #if defined(__ZTC__)
50 
54 void * _farptr_norm(void * ptr)
55 {
56  return(ptr);
57 }
58 #endif
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.