home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / db02_src.zip / d_types.cc < prev    next >
C/C++ Source or Header  |  1993-11-05  |  2KB  |  104 lines

  1. /**************************************************************************
  2.  * Source Id :
  3.  *
  4.  * $Id: d_types.cc,v 1.8 1993/06/23 05:21:22 kevinl Exp $
  5.  *-------------------------------------------------------------------------
  6.  * Project Notes :
  7.  *
  8.  *  Diamond Base
  9.  *  ============
  10.  *      A solid database implementation, spurred on by the continuing
  11.  *  Metal (Lead) Base saga.
  12.  *
  13.  *  Project Team :
  14.  *        A. Davison
  15.  *        K. Lentin
  16.  *        D. Platt
  17.  *
  18.  *    Project Commenced : 05-02-1993
  19.  *
  20.  *-------------------------------------------------------------------------
  21.  *  Module Notes :
  22.  *
  23.  *    Diamond Types.
  24.  *        Special type definitions and constant instatiations.
  25.  *
  26.  *
  27.  *
  28.  *  Original Author : Andy
  29.  *
  30.  *-------------------------------------------------------------------------
  31.  * Revision History:
  32.  *
  33.  * $Log: d_types.cc,v $
  34. // Revision 1.8  1993/06/23  05:21:22  kevinl
  35. // Mallocs are now in angular brackets
  36. //
  37. // Revision 1.7  1993/06/20  13:43:05  kevinl
  38. // Fixed multiple mallocs
  39. //
  40. // Revision 1.6  1993/05/26  01:01:39  kevinl
  41. // MALLOC_H_MISSING
  42. //
  43. // Revision 1.5  1993/05/06  04:00:19  kevinl
  44. // SASC define for malloc.h
  45. //
  46. // Revision 1.4  1993/04/15  04:21:52  kevinl
  47. // Moved malloc.h
  48. //
  49. // Revision 1.3  1993/03/29  08:20:09  darrenp
  50. // Added new malloc library support
  51. //
  52. // Revision 1.2  1993/03/21  23:35:07  kevinl
  53. // Changed D_* constant ints to an enum
  54. //
  55. // Revision 1.1  1993/03/15  19:27:48  davison
  56. // Initial revision
  57. //
  58.  **************************************************************************/
  59.  
  60. #ifdef __BORLANDC__
  61. #    include <mem.h>
  62. #endif
  63.  
  64. #include <d_types.h>
  65.  
  66. // This stuff was going to be used to make the db file system independent,
  67. // but has been sidelined for the time being.
  68. /*
  69. d_int::d_int(long val)
  70. {
  71.     data[0] = val&0xff;
  72.     data[1] = val&0xff00;
  73.     data[2] = val&0xff0000;
  74.     data[3] = val&0xff000000;
  75. }
  76.  
  77. d_int::d_int(const d_int& from)
  78. {
  79.     memcpy(data,from.data,4);
  80. }
  81.  
  82. d_int& d_int::operator = (const d_int& from)
  83. {
  84.     memcpy(data,from.data,4);
  85.     return *this;
  86. }
  87.  
  88. d_int& d_int::operator =(const long val)
  89. {
  90.     data[0] = val&0xff;
  91.     data[1] = val&0xff00;
  92.     data[2] = val&0xff0000;
  93.     data[3] = val&0xff000000;
  94.     return *this;
  95. }
  96.  
  97. d_int::operator long() const
  98. {
  99.     return (data[0]) + (data[1]<<8) + (data[2]<<16) + (data[3]<<32);
  100. }
  101.  
  102.  
  103. */
  104.