Linus Torvalds af2249a7c5 Add generic field cache and string field infrastructure
This adds the infrastructure for the "field cache", which is just
various helpers for the dc_get_field() interface.

This includes the 'dc_field_cache_t' structure that a libdivecomputer
backend can just add to its parser data structure, and a few macros to
make it very easy to initialize the fields and then return them in the
'get_field()' callback.

And part of it is the infrastructure support for the 'dc_field_string_t'
type, which adds the support for string fields.  That will be used to
return various string-formatted data from the dive computer, like deco
models, serial numbers, etc.

And no, a serial number is most definitely not a "number". It's a string.

Right now there are no users of this yet, that comes next.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-05-07 15:05:30 -07:00
..
2019-06-21 16:13:27 +02:00
2019-06-21 16:13:27 +02:00
2018-12-05 10:21:09 +01:00
2018-12-17 16:44:48 +01:00
2012-06-21 21:39:24 +02:00
2018-12-06 08:34:29 +01:00
2017-08-18 23:26:45 +02:00
2017-08-18 23:26:45 +02:00
2020-02-04 08:41:55 +01:00
2019-11-21 11:07:07 +01:00
2014-03-14 09:44:10 +01:00
2013-08-22 09:15:55 +02:00
2018-01-30 22:00:41 +01:00
2017-08-18 23:26:45 +02:00
2020-01-06 13:44:07 +01:00
2019-11-21 11:07:07 +01:00
2018-02-04 21:21:42 +01:00
2014-03-19 09:16:07 +01:00
2014-03-19 09:16:07 +01:00
2019-04-13 11:37:15 +02:00
2017-08-18 23:26:45 +02:00
2018-06-22 23:21:51 +02:00
2018-03-05 08:44:14 +01:00