Commit f39b9e04 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

MDEV-7526: TokuDB doesn't build on OS X

Removed unused functions from tokudb_dump.cc.
parent 64149590
...@@ -247,76 +247,6 @@ outputplaintextstring(char* str) ...@@ -247,76 +247,6 @@ outputplaintextstring(char* str)
g.plaintext = old_plaintext; g.plaintext = old_plaintext;
} }
static inline int
hextoint(int ch)
{
if (ch >= '0' && ch <= '9') {
return ch - '0';
}
if (ch >= 'a' && ch <= 'z') {
return ch - 'a' + 10;
}
if (ch >= 'A' && ch <= 'Z') {
return ch - 'A' + 10;
}
return EOF;
}
static inline int
printabletocstring(char* inputstr, char** poutputstr)
{
char highch;
char lowch;
char nextch;
char* cstring;
assert(inputstr);
assert(poutputstr);
assert(*poutputstr == NULL);
cstring = (char*)toku_malloc((strlen(inputstr) + 1) * sizeof(char));
if (cstring == NULL) {
PRINT_ERROR(errno, "printabletocstring");
goto error;
}
for (*poutputstr = cstring; *inputstr != '\0'; inputstr++) {
if (*inputstr == '\\') {
if ((highch = *++inputstr) == '\\') {
*cstring++ = '\\';
continue;
}
if (highch == '\0' || (lowch = *++inputstr) == '\0') {
PRINT_ERROR(0, "unexpected end of input data or key/data pair");
goto error;
}
if (!isxdigit(highch)) {
PRINT_ERROR(0, "Unexpected '%c' (non-hex) input.\n", highch);
goto error;
}
if (!isxdigit(lowch)) {
PRINT_ERROR(0, "Unexpected '%c' (non-hex) input.\n", lowch);
goto error;
}
nextch = (char)((hextoint(highch) << 4) | hextoint(lowch));
if (nextch == '\0') {
/* Database names are c strings, and cannot have extra NULL terminators. */
PRINT_ERROR(0, "Unexpected '\\00' in input.\n");
goto error;
}
*cstring++ = nextch;
}
else *cstring++ = *inputstr;
}
/* Terminate the string. */
*cstring = '\0';
return EXIT_SUCCESS;
error:
PRINT_ERROR(0, "Quitting out due to errors.\n");
return EXIT_FAILURE;
}
static inline int static inline int
verify_library_version(void) verify_library_version(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment