somVaBuf_add

From EDM2
Jump to: navigation, search

Adds an argument to the SOM buffer (somVaBuf) for variable arguments.

Syntax

somVaBuf    vb;
char       *arg;
int         type;
long        rc;

rc = somVaBuf_add(vb, arg, type);

Parameters

vb (somVaBuf) 
Value (somVaBuf) returned from somVaBuf_create function.
arg (char *) : Pointer to the argument to be added to the va_list.
type (int) 
Argument type (TCKind).

The following are the supported TCKind types:

  • tk_short
  • tk_ushort
  • tk_long
  • tk_ulong
  • tk_float
  • tk_double
  • tk_char
  • tk_boolean
  • tk_octet
  • tk_Typecode
  • tk_enum
  • tk_string
  • tk_pointer

Return Code

rc (long) 
If successful, a value of one is returned; otherwise, a value of zero is returned.

Remarks

This function adds the argument pointed to by arg to the va_list by using type for the size.

Example Code

See function somVaBuf_create.

Related

Functions