Next: , Previous: read_hdr, Up: Internal Functions   [Contents]


A.5.55 write_defn

Write a field definition to an I/O channel.

Synopsis

#include <bpipe/bpipe.h>

static int write_defn(
  IOchannel *channel,
  char *name,
  BPDataType type,
  BPMatrix *matrix
);

Parameters

IOchannel *channel

the iochannel

char *name

the name of the data

BPDataType type

the type of the data


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

BPMatrix *matrix

the matrix

Description

This routine writes a definition (either header field or data packet field) to an I/O channel. It’s kludgy to avoid overrunning strings. one big sprintf would look nicer. maybe a bpipe_iochannel_printf?

Diagnostics

It returns zero upon success, non-zero upon error.