Next: , Previous: bpipe_offset_new_va, Up: Utility Functions


A.4.20 bpipe_proc_def

Process a field definition line.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
BPMatrix *bpipe_proc_def( char *buf, char **name, BPDataType *type );

Parameters

char *buf
the buffer which contains the definition
char **name
the address of a pointer which will point to the name of the variable
BPDataType *type
storage type of parameter
          
          
Possible values for a BPDataType are as follows: BPDType_char, BPDType_double, BPDType_int, BPDType_uint, BPDType_DVector2, BPDType_DVector3, BPDType_IVector2, BPDType_IVector3, BPDType_UIVector2, BPDType_UIVector3, BPDType_DComplex, BPDType_DCVector2, BPDType_DCVector3

Description

This routine takes a header or data packet field definition and determines the name of the field, its type, and its storage requirements. Definitions have the format

<data type>[<white space>]<name>[<matrix definition>]

Blank lines should not be passed to this routine, as they will be flagged as errors. All leading and trailing white space should be removed before calling proc_def.

Returns

It returns a pointer to a BPMatrix structure if a definition was available and parsed correctly, NULL upon error.

Errors

Upon error bpipe_errno is set to one of the following errors:

BPEBADPIPE
the definition was bad in some manner
BPENOMEM
a memory allocation failed