blob: d8ab9ecab409d1214ff9ea2dd189d12dd000e787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/*
Copyright (C) 2014-2020, Dirk Krause
SPDX-License-Identifier: BSD-3-Clause
*/
/*
WARNING: This file was generated by the dkct program (see
http://dktools.sourceforge.net/ for details).
Changes you make here will be lost if dkct is run again!
You should modify the original source and run dkct on it.
Original source: dk3masts.ctr
*/
#ifndef DK3MASTS_H_INCLUDED
/** Avoid multiple inclusions. */
#define DK3MASTS_H_INCLUDED 1
#line 10 "dk3masts.ctr"
/** @file dk3masts.h Retrieve size_t from dkChar text.
*/
#ifdef __cplusplus
extern "C" {
#endif
/** Convert string to size_t. The string can optionally contain an
``k'', ``K'', ``m'', ``M'', ``g'', or ``G'' suffix.
@param rp Pointer to result variable.
@param src Source text to convert.
@param ec Pointer to error code variable, may be NULL.
Set to DK3_ERROR_INVALID_ARGS if rp and/or src is NULL or
the string is too long for the internal buffer,
DK3_ERROR_SYNTAX if unacceptable characters found,
DK3_ERROR_MATH_OVERFLOW on numeric overflow.
@return 1 on success, 0 on error (see ec).
*/
int
dk3ma_sz_from_string(size_t *rp, dkChar const *src, int *ec);
#ifdef __cplusplus
}
#endif
#endif
|