TutBufCreate


Name

TutBufCreate — create a new buffer

Synopsis

T_BUF TutBufCreate(size) 
T_INT4 size; 

Arguments

size — size of the new buffer, in bytes

Return Values

A new T_BUF object if successful, NULL otherwise.

Diagnostics

None

Description

This function creates a new buffer large enough to hold at least size bytes. The buffer can later grow, if necessary, to accommodate more data.

Caution

None

See Also

TutBufDestroy, TutBufCreateStatic

Examples

This example creates a new buffer 128 bytes in size:

T_BUF buf; 
buf = TutBufCreate(128); 
if (buf == NULL) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com