home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / chunk.h < prev    next >
Text File  |  1994-11-15  |  1KB  |  31 lines

  1. /*
  2.     chunk.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <Foundation/NSZone.h>
  8. /*
  9.  *  NXChunks implement variable sized arrays of records.  Allocation is by
  10.  *  the given size (in bytes) --- typically a multiple number of records, say 10.
  11.  *  The block of memory never shrinks, and the chunk records the current number
  12.  *  of elements.  To use the NXChunks, you declare a struct w/ NXChunk as its
  13.  *  first field.
  14.  */
  15.  
  16. typedef struct _NXChunk {
  17.     short           growby;    /* increment to grow by */
  18.     int             allocated;    /* how much is allocated */
  19.     int             used;    /* how much is used */
  20. } NSTextChunk;
  21.  
  22. extern NSTextChunk *NSChunkMalloc(int growBy, int initUsed);
  23. extern NSTextChunk *NSChunkRealloc(NSTextChunk *pc);
  24. extern NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed);
  25. extern NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc);
  26.  
  27. extern NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone);
  28. extern NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone);
  29. extern NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone);
  30. extern NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc, NSTextChunk *dpc, NSZone *zone);
  31.