Commit graph

4 commits

Author SHA1 Message Date
Pekka Paalanen b383f52d31 gl_renderer: print more GL ES feature flags
This is a human readable replacement for printing out the list of all
available GL extensions that doesn't happen anymore by default.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-05-18 14:18:53 +03:00
Pekka Paalanen bc3c37840c shared: add str_printf()
asprintf() has the problem that it leaves *strp undefined when it
fails. Here is a simple wrapper that ensures NULL if asprintf() fails,
which is much more convenient to use.

This will be useful in future patches, where one needs to return error
messages from maybe failing functions, and more.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-07-22 22:19:17 +00:00
Kylie McClain 5d72bc404d
string-helpers.h: Fix usage on musl libc
On musl, int32_t is defined in stdint.h.

Signed-off-by: Kylie McClain <kylie@somasis.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-24 11:55:58 +02:00
Bryce Harrington 82b9f2baec Add safe_strtoint() helper
Adds a safe strtol helper function, modeled loosely after Wayland
scanner's strtouint.  This encapsulates the various quirks of strtol
behavior, and streamlines the interface to just handling base-10 numbers
with a simple true/false error indicator and a uint32_t return by
reference.

Test cases are loosely derived from an earlier patch by Imran Zaman.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-06 18:19:19 -07:00