home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / src.lha / src / amitcp / api / allocdatabuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-08  |  1.0 KB  |  43 lines

  1. /*
  2.  * allocdatabuffer.h
  3.  *
  4.  *     Copyright (c) 1993 OHT-ATCP Group
  5.  *         All rights reserved
  6.  *
  7.  * Created: Mon Apr 26 11:58:58 1993 too
  8.  * Last modified: Sun Jun 13 01:23:43 1993 too
  9.  *
  10.  * $Id: allocdatabuffer.h,v 1.3 1993/06/12 22:58:57 too Exp $
  11.  *
  12.  * HISTORY
  13.  * $Log: allocdatabuffer.h,v $
  14.  * Revision 1.3  1993/06/12  22:58:57  too
  15.  * Added prototype for freeDataBuffer. Now part of allocDataBuffer is
  16.  * inline function so it is faster.
  17.  *
  18.  * Revision 1.2  1993/06/07  12:37:20  too
  19.  * Changed inet_ntoa, netdatabase functions and WaitSelect() use
  20.  * separate buffers for their dynamic buffers
  21.  *
  22.  * Revision 1.1  1993/04/27  10:24:18  too
  23.  * Initial revision
  24.  *
  25.  *
  26.  */
  27.  
  28. #ifndef ALLOCDATABUFFER_H
  29. #define ALLOCDATABUFFER_H
  30.  
  31. VOID freeDataBuffer(struct DataBuffer * DB);
  32. BOOL doAllocDataBuffer(struct DataBuffer * DB, int size);
  33.  
  34. static inline BOOL allocDataBuffer(struct DataBuffer * DB, int size)
  35. {
  36.   if (DB->db_Size < size)
  37.     return doAllocDataBuffer(DB, size);
  38.   else
  39.     return TRUE;
  40. }
  41.  
  42. #endif /* ALLOCDATABUFFER_H */
  43.