GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DC_DESCRIPTOR_ITERATOR(3) FreeBSD Library Functions Manual DC_DESCRIPTOR_ITERATOR(3)

dc_descriptor_iteratorget all supported dive computers

library “libdivecomputer”

#include <libdivecomputer/descriptor.h>

dc_status_t
dc_descriptor_iterator(dc_iterator_t **iterator);

Gets all descriptors available to library “libdivecomputer”. It must be matched with dc_iterator_free(3) if the return value is DC_STATUS_SUCCESS. The dc_iterator_next(3) function must be used to iterate over the iterator. You must use dc_descriptor_free(3) on the returned descriptor value.

This returns DC_STATUS_SUCCESS and fills in the iterator pointer on success.

The following iterates over all descriptors, printing the vendor, then frees the iterator. It does no error checking.

dc_descriptor_iterator(&iter));
while (dc_iterator_next(iter, &desc) == DC_STATUS_SUCCESS) {
	printf("%s\n", dc_descriptor_get_vendor(desc));
	dc_descriptor_free(desc);
}
dc_iterator_free(iter);

dc_descriptor_free(3), dc_iterator_free(3), dc_iterator_next(3)

The library “libdivecomputer” library was written by Jef Driesen, jef@libdivecomputer.org. The manpages were written by
Kristaps Dzonsons, kristaps@bsd.lv.

January 5, 2017 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.