annotate lib/swig/swigwin-2.0.11/Lib/inttypes.i @ 1899:b3009adc0e2f

Adding swig, gitignore, hgignore
author Nomad
date Mon, 21 Oct 2013 10:42:27 +0200
parents
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 /* -----------------------------------------------------------------------------
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2 * inttypes.i
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 *
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4 * SWIG library file for ISO C99 types: 7.8 Format conversion of integer types <inttypes.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 * ----------------------------------------------------------------------------- */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 %{
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 #include <inttypes.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 %}
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11 %include <stdint.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 %include <wchar.i>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 #ifdef __cplusplus
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 extern "C" {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18 #ifdef SWIGWORDSIZE64
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 /* We have to define the `uintmax_t' type using `ldiv_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 typedef struct
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 long int quot; /* Quotient. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 long int rem; /* Remainder. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 } imaxdiv_t;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27 #else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 /* We have to define the `uintmax_t' type using `lldiv_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 typedef struct
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 long long int quot; /* Quotient. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 long long int rem; /* Remainder. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 } imaxdiv_t;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 /* Compute absolute value of N. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 extern intmax_t imaxabs (intmax_t n);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 /* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 extern imaxdiv_t imaxdiv (intmax_t numer, intmax_t denom);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 /* Like `strtol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 extern intmax_t strtoimax (const char *nptr, char **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47 /* Like `strtoul' but convert to `uintmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 extern uintmax_t strtoumax (const char *nptr, char ** endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 #ifdef SWIG_WCHAR
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51 /* Like `wcstol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 extern intmax_t wcstoimax (const wchar_t *nptr, wchar_t **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 /* Like `wcstoul' but convert to `uintmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55 extern uintmax_t wcstoumax (const wchar_t *nptr, wchar_t ** endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 #ifdef SWIGWORDSIZE64
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60 /* Like `strtol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 extern intmax_t strtoimax (const char *nptr, char **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 /* Like `strtoul' but convert to `uintmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 extern uintmax_t strtoumax (const char *nptr, char **endptr,int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 #ifdef SWIG_WCHAR
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67 /* Like `wcstol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 extern intmax_t wcstoimax (const wchar_t *nptr, wchar_t **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 /* Like `wcstoul' but convert to `uintmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 extern uintmax_t wcstoumax (const wchar_t *nptr, wchar_t **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 #else /* SWIGWORDSIZE32 */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 /* Like `strtol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 extern intmax_t strtoimax (const char *nptr, char **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 /* Like `strtoul' but convert to `uintmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 extern uintmax_t strtoumax (const char *nptr, char **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 #ifdef SWIG_WCHAR
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 /* Like `wcstol' but convert to `intmax_t'. */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 extern uintmax_t wcstoumax (const wchar_t *nptr, wchar_t **endptr, int base);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 #endif /* SWIGWORDSIZE32 */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 #ifdef __cplusplus
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 }
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 #endif