mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
ebee57f4d1
decoding and file i/o have been split to imageio, all that remains is some string routines used for parameter parsing in the examples Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
// Copyright 2012 Google Inc. All Rights Reserved.
|
|
//
|
|
// 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.
|
|
// -----------------------------------------------------------------------------
|
|
//
|
|
// Utility functions used by the example programs.
|
|
//
|
|
|
|
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
|
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
|
|
|
#include "webp/types.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//------------------------------------------------------------------------------
|
|
// 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);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif // WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|