OMparse_buffer


Synopsis


int  OMparse_buffer (
OMobj_id  object,
const char *buffer,
0   );

Description

OMparse_buffer reads and parses an input string consisting of V statements, V commands, and V comments. OMparse_buffer returns when it encounters a NULL termination character in the buffer.

The Object Manager interprets the statements and commands in the context of the object identified by object . Any new objects defined in the buffer are created as subobjects of the object argument.

Error messages are sent to stderr.

Arguments

object

The id of an object.

buffer

A pointer to a NULL-terminated string consisting of V commands.

0

The third parameter must be 0.

Returned value

The status code (see Return Status ). a 0 return status indicates that syntax errors were encountered parsing the buffer.

xample

Given the id of a group object defined in V as


group myobj;

you can add a subobject to this object with


status = OMparse_buffer(myobj_id, "int subobj[3][2];", 0);

The resulting definition of myobj is


group myobj {
int subobj[3][2];
};