Go to the SVN repository for this file.
41 char* dst_buf,
size_tdst_len
44 if(!src_buf || !src_len) {
47 if(!dst_buf || !dst_len) {
51 char* dst_ptr = dst_buf;
52 const char* src_ptr = src_buf;
53 const char* src_end = src_buf + src_len;
55 while(src_ptr < src_end) {
56 unsigned long val= 0;
60 for(; bytes < 4 && src_ptr < src_end; ++bytes) {
61 val= (
val<< 8) | (
unsigned char)(*src_ptr++);
65 val<<= (4 - bytes) * 8;
67 if(
val== 0 && bytes == 4) {
68 if(dst_len < 1)
break;
76 for(
int i= 4;
i>= 0; --
i) {
77 out[
i] = (char)((
val% 85) +
'!');
81 intout_len = bytes + 1;
82 if(dst_len < (
size_t)out_len) {
83 _TRACE(
Info<<
"insufficient buffer space provided\n");
86memcpy(dst_ptr,
out, out_len);
92 _TRACE(
Info<<
"insufficient buffer space provided\n");
99 returndst_ptr - dst_buf;
static size_t s_Encode(const char *src_buf, size_t src_len, char *dst_buf, size_t dst_len)
std::ofstream out("events_result.xml")
main entry point for tests
void Info(CExceptionArgs_Base &args)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4