acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
to_integer.h
1#pragma once
2
3//CLASS_DECL_ACME int ansi_to_int(const char * sz, const char ** pszEnd, int iBase);
4//CLASS_DECL_ACME int ansi_to_int(const char * sz, const char ** pszEnd);
5//CLASS_DECL_ACME int ansi_to_int(const char * sz, int iOnNull = 0);
6
7//CLASS_DECL_ACME unsigned int ansi_to_unsigned_int(const char * sz, const char ** pszEnd, int iBase);
8//CLASS_DECL_ACME unsigned int ansi_to_unsigned_int(const char * sz, const char ** pszEnd);
9//CLASS_DECL_ACME unsigned int ansi_to_unsigned_int(const char * sz);
10
11//CLASS_DECL_ACME int ansi_count_to_long_long(const char * sz, const char ** pszEnd, int iBase, size_t iLen);
12//CLASS_DECL_ACME int ansi_count_to_long_long(const char * sz, const char ** pszEnd, size_t iLen);
13//CLASS_DECL_ACME int ansi_count_to_long_long(const char * sz, size_t iLen);
14
15
16//#define atoint_dup(...) ansi_to_int(__VA_ARGS__)
17//#define atouint_dup(...) ansi_to_unsigned_int(__VA_ARGS__)
18//#define ntouint_dup(...) ntoui_dup(__VA_ARGS__)
19
20
21
22//CLASS_DECL_ACME int wtoi_dup(const unichar * sz);
23//CLASS_DECL_ACME int nwtoi_dup(const unichar * sz, int iCount);
24
25
26
27//CLASS_DECL_ACME long long ansi_to_long_long(const char * sz, char ** pszEnd);
28//CLASS_DECL_ACME long long ansi_to_long_long(const char * sz);
29
30
31//CLASS_DECL_ACME unsigned long long ansi_to_unsigned_long_long(const char * sz, char ** pszEnd);
32//CLASS_DECL_ACME unsigned long long ansi_to_unsigned_long_long(const char * sz);
33
34
35//CLASS_DECL_ACME long long ansi_count_to_long_long(const char * sz, char ** pszEnd, size_t iLen);
36//CLASS_DECL_ACME long long ansi_count_to_long_long(const char * sz, size_t iLen);
37
38
39#define ansi_to_iptr __END_OSBIT(ansi_to_i)
40#define ansi_to_uptr __END_OSBIT(ansi_to_u)
41#define ansi_count_to_iptr(...) __END_OSBIT(ansi_count_to_i)
42
43
44#define wide_to_iptr __END_OSBIT(wide_to_i)
45#define wide_to_uptr __END_OSBIT(wide_to_u)
46#define wide_count_to_iptr(...) __END_OSBIT(wide_count_to_i)
47
48
49//#if defined(LINUX)
50//
51//#define _strtoi64 ansi_to_long_long
52//
53//#endif
54
55
56//CLASS_DECL_ACME long long wide_to_long_long(const unichar * sz, const unichar ** pszEnd, int iBase);
57//CLASS_DECL_ACME long long wide_to_long_long(const unichar * sz, const unichar ** pszEnd);
58//CLASS_DECL_ACME long long wide_to_long_long(const unichar * sz);
59
60
61#ifdef __cplusplus
62
63inline void ansi_to(unsigned int & u, const ::ansi_character * psz) { u = ansi_to_unsigned_int(psz); }
64inline void ansi_to(unsigned long long & u, const ::ansi_character * psz) { u = ansi_to_unsigned_long_long(psz); }
65//inline void ansi_to(uptr & u, const ::ansi_character * psz) { u = ansi_to_uptr(psz); }
66
67inline void wide_to(unsigned int & u, const ::wide_character * psz) { u = wide_to_unsigned_int(psz); }
68inline void wide_to(unsigned long long & u, const ::wide_character * psz) { u = wide_to_unsigned_long_long(psz); }
69//inline void wide_to(uptr & u, const ::wide_character * psz) { u = wide_to_uptr(psz); }
70
71#endif