.ad 8
.bm 8
.fm 4
.bt $Copyright by   Software AG, 1993$$Page %$
.tm 12
.hm 6
.hs 3
.tt 1 $NME$Project Distributed Database System$vos57uc$
.tt 2 $$$
.tt 3 $R.Roedling$storage management$1997-01-31$
***********************************************************
.nf


    ========== licence begin LGPL
    Copyright (C) 2002 SAP AG

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    ========== licence end

.fo
.nf
.sp
Module  : user storage management
=========
.sp
Purpose :
.CM *-END-* purpose -------------------------------------
.sp
.cp 3
Define  :

.CM *-END-* define --------------------------------------
.sp;.cp 3
Use     :

.CM *-END-* use -----------------------------------------
.sp;.cp 3
Synonym :

.CM *-END-* synonym -------------------------------------
.sp;.cp 3
Author  : R. Roedling
.sp
.cp 3
Created : 8.01.93
.sp
.cp 3
Version :
.sp
.cp 3
Release :  6.2 	 Date : 1997-01-31
.br
.sp
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Specification:

.CM *-END-* specification -------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.fo
.oc _/1
Description:

.CM *-END-* description ---------------------------------
.sp 2
***********************************************************
.sp
.cp 10
.nf
.oc _/1
Structure:

.CM *-END-* structure -----------------------------------
.sp 2
**********************************************************
.sp
.cp 10
.nf
.oc _/1
.CM -lll-
Code    :
/*PRETTY*/
//
// MODULE - Storage Management for the User Part
//


//
// INCLUDE FILES
//


//
//  DEFINES
//

#define MOD__  "VOS57UC : "
#define MF__   MOD__"UNDEFINED"


//
//  MACROS
//


//
//  LOCAL TYPE AND STRUCT DEFINITIONS
//


//
// EXTERNAL VARIABLES
//


//
//  EXPORTED VARIABLES
//


//
// LOCAL VARIABLES
//


//
// LOCAL FUNCTION PROTOTYPES
//


//
// ========================== GLOBAL FUNCTIONS ================================
//


VOID sqlallocat  ( INT4        lSize,
                   UCHAR**     ppucObjPtr,
                   PBOOLEAN    pbOk )
  {
  #undef  MF__
  #define MF__ MOD__"sqlallocat"
  APIRET  rc;


  DBGIN;

  DBG3 (( MF__, "lSize = %ld", lSize ));

  // --- initialize return parameters
  *pbOk = TRUE;


  // --- storage space allocation
  rc = ALLOC_MEM (( PPVOID ) ppucObjPtr, ( ULONG ) lSize );

  if ( rc != NO_ERROR )
    {
    *pbOk = FALSE;

    DBG1  (( MF__, "sqlallocat failed" ));
    DBGOUT;
    return;
    }

  DBGOUT;
  return;
  }


/*------------------------------*/


VOID sqlfree ( UCHAR*  pucObjPtr )
  {
  #undef  MF__
  #define MF__ MOD__"sqlfree"

  APIRET  rc;


  DBGIN;

  rc = FREE_MEM (( PVOID ) pucObjPtr );

  if ( rc  != NO_ERROR )
    {
    DBG1  (( MF__, "sqlfree failed\nObject pointer = 0x%x", pucObjPtr ));
    DBGOUT;
    return;
    }

  DBG3 (( MF__, "Object pointer 0x%x freed", pucObjPtr ));

  DBGOUT;
  return;
  }


/*------------------------------*/


VOID sqlreallocat  ( INT4        lSize,
                     UCHAR**     ppucObjPtr,
                     PBOOLEAN    pbOk )
  {
  #undef  MF__
  #define MF__ MOD__"sqlreallocat"
  APIRET  rc;


  DBGIN;

  DBG3 (( MF__, "lSize = %ld", lSize ));

  // --- initialize return parameters
  *pbOk = TRUE;


  // --- storage space allocation
  rc = sql57c_realloc  (__LINE__,__FILE__,
                        ( PPVOID ) ppucObjPtr, ( ULONG ) lSize);

  if ( rc != NO_ERROR )
    {
    *pbOk = FALSE;

    DBG1  (( MF__, "sqlreallocat failed" ));
    }

  DBGOUT;
  return;
  }


//
// ========================== LOCAL FUNCTIONS =================================
//


//
// =============================== END ========================================
//
.CM *-END-* code ----------------------------------------
.SP 2
***********************************************************
.PA
