home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
OpenStepConversion
/
IntermediateFrameworks3
/
AppKit.framework
/
Headers
/
chunk.h
< prev
next >
Wrap
Text File
|
1994-11-15
|
1KB
|
31 lines
/*
chunk.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import <Foundation/NSZone.h>
/*
* NXChunks implement variable sized arrays of records. Allocation is by
* the given size (in bytes) --- typically a multiple number of records, say 10.
* The block of memory never shrinks, and the chunk records the current number
* of elements. To use the NXChunks, you declare a struct w/ NXChunk as its
* first field.
*/
typedef struct _NXChunk {
short growby; /* increment to grow by */
int allocated; /* how much is allocated */
int used; /* how much is used */
} NSTextChunk;
extern NSTextChunk *NSChunkMalloc(int growBy, int initUsed);
extern NSTextChunk *NSChunkRealloc(NSTextChunk *pc);
extern NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed);
extern NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc);
extern NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone);
extern NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone);
extern NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone);
extern NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc, NSTextChunk *dpc, NSZone *zone);