Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8ef66e65
Commit
8ef66e65
authored
Jan 18, 2007
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the unused function mem_strdupq().
parent
19b5b950
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
46 deletions
+0
-46
include/mem0mem.h
include/mem0mem.h
+0
-11
include/mem0mem.ic
include/mem0mem.ic
+0
-35
No files found.
include/mem0mem.h
View file @
8ef66e65
...
...
@@ -279,17 +279,6 @@ mem_strdupl(
const
char
*
str
,
/* in: string to be copied */
ulint
len
);
/* in: length of str, in bytes */
/**************************************************************************
Makes a NUL-terminated quoted copy of a NUL-terminated string. */
UNIV_INLINE
char
*
mem_strdupq
(
/*========*/
/* out, own: a quoted copy of the string,
must be deallocated with mem_free */
const
char
*
str
,
/* in: string to be copied */
char
q
);
/* in: quote character */
/**************************************************************************
Duplicates a NUL-terminated string, allocated from a memory heap. */
...
...
include/mem0mem.ic
View file @
8ef66e65
...
...
@@ -589,41 +589,6 @@ mem_strdupl(
return(memcpy(s, str, len));
}
/**************************************************************************
Makes a NUL-terminated quoted copy of a NUL-terminated string. */
UNIV_INLINE
char*
mem_strdupq(
/*========*/
/* out, own: a quoted copy of the string,
must be deallocated with mem_free */
const char* str, /* in: string to be copied */
char q) /* in: quote character */
{
char* dst;
char* d;
const char* s = str;
size_t len = strlen(str) + 3;
/* calculate the number of quote characters in the string */
while((s = strchr(s, q)) != NULL) {
s++;
len++;
}
/* allocate the quoted string, and copy it */
d = dst = mem_alloc(len);
*d++ = q;
s = str;
while(*s) {
if ((*d++ = *s++) == q) {
*d++ = q;
}
}
*d++ = q;
*d++ = '\0';
ut_ad((ssize_t) len == d - dst);
return(dst);
}
/**************************************************************************
Makes a NUL-terminated copy of a nonterminated string,
allocated from a memory heap. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment