GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  STRUCTS_TYPE_STRING (3)

NAME

structs_type_string, structs_type_string_null, - structs types for strings

CONTENTS

Library
Synopsis
Description
See Also
History
Authors

LIBRARY

PDEL Library (libpdel, -lpdel)

SYNOPSIS


.In sys/types.h
.In pdel/structs/structs.h
.In pdel/structs/type/string.h STRUCTS_STRING_TYPE mtype asnull STRUCTS_FIXEDSTRING_TYPE bufsize
.Vt extern const struct structs_type structs_type_string ;
.Vt extern const struct structs_type structs_type_string_null ;

DESCRIPTION

The STRUCTS_STRING_TYPE and STRUCTS_FIXEDSTRING_TYPE macros define a structs(3) type (i.e., a struct structs_type) for describing variable and bounded length strings, respectively.

STRUCTS_STRING_TYPE describes a char * data type which points to a string buffer allocated with typed_mem(3) type mtype. If asnull is non-zero, then an empty string may be represented as a NULL pointer; otherwise, the char * pointer can never be NULL (or else the program may core dump) and so the empty string must always be represented as a pointer to a zero length string.

STRUCTS_FIXEDSTRING_TYPE describes an array of char having length bufsize in which a string having length at most bufsize - 1 is stored. The string is always terminated with a ’\0’ byte.

The structs(3) library supplies two pre-defined variable length string types, structs_type_string and structs_type_string_null. Both types use the typed_mem(3) type STRUCTS_TYPE_STRING_MTYPE, defined in the header file. structs_type_string represents empty strings as pointers to an empty string, while structs_type_string_null represents empty strings as NULL pointers.

SEE ALSO

libpdel(3), structs(3), structs_type(3), typed_mem(3)

HISTORY

The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

AUTHORS


.An Archie Cobbs Aq archie@freebsd.org
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.