39
39
#include " Basics/Exceptions.h"
40
40
#include " Basics/StringBuffer.h"
41
41
42
- // TODO need to this in another way
43
- #ifndef TRI_HAVE_GLOBAL_TIMEZONE_PROTO
44
- #ifdef GLOBAL_TIMEZONE
45
- extern long GLOBAL_TIMEZONE;
46
- #else
47
- static long GLOBAL_TIMEZONE = 0 ;
48
- #endif
49
- #endif
50
-
51
42
using namespace std ;
52
43
53
44
// -----------------------------------------------------------------------------
@@ -59,57 +50,16 @@ namespace {
59
50
return a == ' ' || a == ' \t ' || a == ' _' ;
60
51
}
61
52
62
-
63
-
64
- int32_t matchInteger (char const * & str, size_t size) {
65
- int32_t result = 0 ;
66
-
67
- for (size_t i = 0 ; i < size; i++, str++) {
68
- if (' 0' <= *str && *str <= ' 9' ) {
69
- result = result * 10 + (*str - ' 0' );
70
- }
71
- else {
72
- std::string message (" cannot parse date, expecting integer, got '" + string (1 , *str) + " '" );
73
- THROW_ARANGO_EXCEPTION_MESSAGE (TRI_ERROR_BAD_PARAMETER, message);
74
- }
75
- }
76
-
77
- return result;
78
- }
79
-
80
-
81
-
82
- int32_t matchInteger (char const * & str) {
83
- int32_t result = 0 ;
84
-
85
- for (; *str; str++) {
86
- if (' 0' <= *str && *str <= ' 9' ) {
87
- result = result * 10 + (*str - ' 0' );
88
- }
89
- else {
90
- return result;
91
- }
92
- }
93
-
94
- return result;
95
- }
96
-
97
-
98
-
99
53
char const * const BASE64_CHARS =
100
54
" ABCDEFGHIJKLMNOPQRSTUVWXYZ"
101
55
" abcdefghijklmnopqrstuvwxyz"
102
56
" 0123456789+/" ;
103
57
104
-
105
-
106
58
char const * const BASE64U_CHARS =
107
59
" ABCDEFGHIJKLMNOPQRSTUVWXYZ"
108
60
" abcdefghijklmnopqrstuvwxyz"
109
61
" 0123456789-_" ;
110
62
111
-
112
-
113
63
unsigned char const BASE64_REVS[256 ] = {
114
64
' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , // 0
115
65
' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , ' \0 ' , // 16
0 commit comments