2012-05-12 01:00:57 +02:00
|
|
|
// Copyright 2012 Google Inc. All Rights Reserved.
|
|
|
|
//
|
2013-06-07 08:05:58 +02:00
|
|
|
// Use of this source code is governed by a BSD-style license
|
|
|
|
// that can be found in the COPYING file in the root of the source
|
|
|
|
// tree. An additional intellectual property rights grant can be found
|
|
|
|
// in the file PATENTS. All contributing project authors may
|
|
|
|
// be found in the AUTHORS file in the root of the source tree.
|
2012-05-12 01:00:57 +02:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// Utility functions used by the example programs.
|
|
|
|
//
|
|
|
|
|
2016-07-22 01:10:05 +02:00
|
|
|
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
|
|
|
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
2012-05-12 01:00:57 +02:00
|
|
|
|
2016-07-21 03:25:00 +02:00
|
|
|
#include "webp/types.h"
|
2012-05-12 01:00:57 +02:00
|
|
|
|
2013-11-25 23:43:12 +01:00
|
|
|
#ifdef __cplusplus
|
2012-05-12 01:00:57 +02:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-09-11 08:35:48 +02:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
// String parsing
|
|
|
|
|
|
|
|
// Parses 'v' using strto(ul|l|d)(). If error is non-NULL, '*error' is set to
|
|
|
|
// true on failure while on success it is left unmodified to allow chaining of
|
|
|
|
// calls. An error is only printed on the first occurrence.
|
|
|
|
uint32_t ExUtilGetUInt(const char* const v, int base, int* const error);
|
|
|
|
int ExUtilGetInt(const char* const v, int base, int* const error);
|
|
|
|
float ExUtilGetFloat(const char* const v, int* const error);
|
|
|
|
|
2013-11-25 23:43:12 +01:00
|
|
|
#ifdef __cplusplus
|
2012-05-12 01:00:57 +02:00
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2016-07-22 01:10:05 +02:00
|
|
|
#endif // WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|