'\" t .\" Title: waffle_attrib_list .\" Author: Chad Versace .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 10/19/2017 .\" Manual: Waffle Manual .\" Source: waffle .\" Language: English .\" .TH "WAFFLE_ATTRIB_LIST" "3" "10/19/2017" "waffle" "Waffle Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" waffle_attrib_list, waffle_attrib_list_length, waffle_attrib_list_get, waffle_attrib_list_get_with_default, waffle_attrib_list_update \- Utilities for attribute lists .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'bool\ waffle_attrib_list_length('u .BI "bool waffle_attrib_list_length(const\ int32_t\ " "attrib_list" "[]);" .HP \w'bool\ waffle_attrib_list_get('u .BI "bool waffle_attrib_list_get(const\ int32_t\ " "attrib_list" "[], int32_t\ " "key" ", int32_t\ *" "value" ");" .HP \w'bool\ waffle_attrib_list_get_with_default('u .BI "bool waffle_attrib_list_get_with_default(const\ int32_t\ " "attrib_list" "[], int32_t\ " "key" ", int32_t\ *" "value" ", int32_t\ " "default_value" ");" .HP \w'bool\ waffle_attrib_list_update('u .BI "bool waffle_attrib_list_update(int32_t\ " "attrib_list" "[], int32_t\ " "key" ", int32_t\ *" "value" ");" .SH "DESCRIPTION" .PP An attribute list is a zero\-terminated list of \fBint32_t\fR key/value pairs or a null pointer\&. A null pointer is interpreted as an empty list, whose only member is the terminal zero\&. For concrete examples of attribute lists, see the "Examples" section in \fBwaffle_config\fR(3)\&. .PP All attribute list functions can be called before waffle has been successfully initialized with \fBwaffle_init\fR(3)\&. .PP \fBwaffle_attrib_list_length()\fR .RS 4 Return the number of key/value pairs in the list\&. .RE .PP \fBwaffle_attrib_list_get()\fR .RS 4 Get the \fIvalue\fR associated with \fIkey\fR\&. If the list does not contain the \fIkey\fR, then \fIvalue\fR is not dereferenced\&. Return true if and only if the list contains the \fIkey\fR\&. .RE .PP \fBwaffle_attrib_list_get_with_default()\fR .RS 4 Equivalent to \fBwaffle_attrib_list_get()\fR except that if the list does not contain the \fIkey\fR then \fIvalue\fR is set to a \fIdefault_value\fR\&. .RE .PP \fBwaffle_attrib_list_update()\fR .RS 4 Update the \fIvalue\fR associated with \fIkey\fR\&. If the list does not contain the \fIkey\fR then the list is not modified\&. Return true if and only if the list contains the \fIkey\fR\&. .RE .SH "ERRORS" .PP All attribute list functions set the error code to \fBWAFFLE_NO_ERROR\fR and can be called before waffle has been successfully initialized with \fBwaffle_init\fR(3)\&. .PP See \fBwaffle_error\fR(3) for the complete list of waffle\*(Aqs error codes\&. .SH "ISSUES" .PP Please report bugs or and feature requests to \m[blue]\fB\%https://github.com/waffle-gl/waffle/issues\fR\m[]\&. .SH "SEE ALSO" .PP \fBwaffle\fR(7) .SH "AUTHOR" .PP \fBChad Versace\fR <\&chad\&.versace@linux\&.intel\&.com\&> .RS 4 Maintainer .RE .SH "COPYRIGHT" .br Copyright \(co 2013 Intel .br .PP This manual page is licensed under the Creative Commons Attribution\-ShareAlike 3\&.0 United States License (CC BY\-SA 3\&.0)\&. To view a copy of this license, visit \m[blue]\fB\%http://creativecommons.org.license/by-sa/3.0/us\fR\m[]\&. .sp