SomVaBuf add: Difference between revisions
Appearance
No edit summary |
mNo edit summary |
||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
somVaBuf vb; | |||
somVaBuf vb; | char *arg; | ||
char *arg; | int type; | ||
int type; | long rc; | ||
long rc; | |||
rc = somVaBuf_add(vb, arg, type); | |||
rc = somVaBuf_add(vb, arg, type); | |||
==Parameters== | ==Parameters== | ||
; vb (somVaBuf) : Value (somVaBuf) returned from somVaBuf_create function. | ;vb (somVaBuf) : Value (somVaBuf) returned from somVaBuf_create function. | ||
:arg (char *) : Pointer to the argument to be added to the va_list. | |||
: 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: | |||
; type (int) : Argument type (TCKind). | * tk_short | ||
The following are the supported TCKind types: | * tk_ushort | ||
* tk_short | * tk_long | ||
* tk_ushort | * tk_ulong | ||
* tk_long | * tk_float | ||
* tk_ulong | * tk_double | ||
* tk_float | * tk_char | ||
* tk_double | * tk_boolean | ||
* tk_char | * tk_octet | ||
* tk_boolean | * tk_Typecode | ||
* tk_octet | * tk_enum | ||
* tk_Typecode | * tk_string | ||
* tk_enum | * tk_pointer | ||
* tk_string | |||
* tk_pointer | |||
==Return Code== | ==Return Code== | ||
; rc (long) : If successful, a value of one is returned; otherwise, a value of zero is returned. | ;rc (long) : If successful, a value of one is returned; otherwise, a value of zero is returned. | ||
==Remarks== | ==Remarks== | ||
This function adds the argument pointed to by arg to the va_list by using type for the size. | This function adds the argument pointed to by arg to the va_list by using type for the size. | ||
==Example Code== | ==Example Code== | ||
Line 43: | Line 39: | ||
==Related== | ==Related== | ||
;Functions | |||
* [[somVaBuf_create]] | * [[somVaBuf_create]] | ||
* [[somVaBuf_get_valist]] | * [[somVaBuf_get_valist]] | ||
* [[somVaBuf_destroy]] | * [[somVaBuf_destroy]] | ||
* [[somvalistGetTarget]] | * [[somvalistGetTarget]] | ||
* [[somvalistSetTarget]] | * [[somvalistSetTarget]] | ||
[[Category:SOM Kernel]] | [[Category:SOM Kernel]] |
Latest revision as of 18:40, 12 October 2022
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