DC_PARSER_NEW(3)
π NAME π
dc_parser_new, dc_parser_new2 β create a parser for a single dive.
Okay bestie, welcome to dc_parser_new(3) from the libdivecomputer library, living its best life in the Library Functions Manual β¨. This page is literally about making a parser for one single dive β focused, iconic, no extra chaos. π
π¦ LIBRARY π¦
The library is βlibdivecomputerβ β thatβs the library, bestie. π«Ά
β¨ SYNOPSIS β¨
Hereβs the exact shape, no cap:
#include <libdivecomputer/parser.h>
dc_status_t
dc_parser_new(dc_parser_t **parser, dc_device_t *device);
dc_status_t
dc_parser_new2(dc_parser_t **parser, dc_context_t *context,
dc_descriptor_t *descriptor);
πΈ DESCRIPTION πΈ
This creates a parser for a single dive extracted from the dive computer with dc_device_foreach(3). The parser operates on the data extracted: it does not touch the device directly to acquire data. Periodt. π
Because of that, there are two forms of invocation: dc_parser_new extracts the relevant values from the device parameter; and dc_parser_new2 is given device values (model, etc.) directly.
The pointer must later be freed with dc_parser_destroy(3) β donβt ghost it, bestie. π
β RETURN VALUES β
These return DC_STATUS_OK, and fill in the parser pointer on success. Otherwise, an error is returned. Thatβs the whole return-value vibe check. β
π SEE ALSO π
π AUTHORS π
The library βlibdivecomputerβ library was written by Jef Driesen, jef@libdivecomputer.org. The manpages were written by Kristaps Dzonsons, kristaps@bsd.lv. Legends, honestly. π
xoxo π
this page is from Debian, dated January 5, 2017, and its footer tag is DC_PARSER_NEW(3) β bye bestie! π«Ά
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms