| 93 | } |
| 94 | |
| 95 | static Exiv2::Dictionary stringToDict(const std::string& s) { |
| 96 | Exiv2::Dictionary result; |
| 97 | std::string token; |
| 98 | |
| 99 | size_t i = 0; |
| 100 | while (i < s.length()) { |
| 101 | if (s[i] != ',') { |
| 102 | if (s[i] != ' ') |
| 103 | token += s[i]; |
| 104 | } else { |
| 105 | result[token] = token; |
| 106 | token.clear(); |
| 107 | } |
| 108 | i++; |
| 109 | } |
| 110 | result[token] = token; |
| 111 | return result; |
| 112 | } |
| 113 | |
| 114 | static int makeNonBlocking(int sockfd) { |
| 115 | #if defined(_WIN32) |