You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/08/05 23:01:27 UTC
git commit: TS-2097 Remove ink_string_find_dotted_extension()
Updated Branches:
refs/heads/master 17ec6c208 -> 54ea3f7be
TS-2097 Remove ink_string_find_dotted_extension()
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/54ea3f7b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/54ea3f7b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/54ea3f7b
Branch: refs/heads/master
Commit: 54ea3f7be55f5375774bd48dac01eec9feb5fb37
Parents: 17ec6c2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Aug 5 15:01:09 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Aug 5 15:01:09 2013 -0600
----------------------------------------------------------------------
lib/ts/ink_string.cc | 33 ---------------------------------
lib/ts/ink_string.h | 1 -
2 files changed, 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/54ea3f7b/lib/ts/ink_string.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.cc b/lib/ts/ink_string.cc
index 4968676..d38f0e8 100644
--- a/lib/ts/ink_string.cc
+++ b/lib/ts/ink_string.cc
@@ -212,39 +212,6 @@ ink_string_append(char *dest, char *src, int n)
} /* End ink_string_append */
-/*---------------------------------------------------------------------------*
-
- char *ink_string_find_dotted_extension(char *str, char *ext, int max_ext_len)
-
- This routine takes a string <str>, copies the period-separated extension to
- <ext> (up to <max_ext_len - 1> characters) NUL terminates <ext>, and
- returns a pointer into the string <str> where the '.' of the extension
- begins, or NULL if there is no extension.
-
- *---------------------------------------------------------------------------*/
-
-char *
-ink_string_find_dotted_extension(char *str, char *ext, int max_ext_len)
-{
- char *p = NULL;
-
- if (ext) {
- *ext = '\0';
- if (str) {
- for (p = (str + strlen(str)) - 1; p >= str; p--)
- if (*p == '.')
- break;
-
- if (p <= str)
- return (NULL);
-
- ink_strlcpy(ext, (p + 1), max_ext_len);
- }
- }
- return (p);
-} /* End ink_string_find_dotted_extension */
-
-
#if !HAVE_STRLCPY
size_t
ink_strlcpy(char *dst, const char *src, size_t siz)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/54ea3f7b/lib/ts/ink_string.h
----------------------------------------------------------------------
diff --git a/lib/ts/ink_string.h b/lib/ts/ink_string.h
index 8351fbe..c553a3e 100644
--- a/lib/ts/ink_string.h
+++ b/lib/ts/ink_string.h
@@ -55,7 +55,6 @@ inkcoreapi char *ink_strncat(char *dest, const char *src, int n);
inkcoreapi char *ink_string_concatenate_strings(char *dest, ...);
inkcoreapi char *ink_string_concatenate_strings_n(char *dest, int n, ...);
inkcoreapi char *ink_string_append(char *dest, char *src, int n);
-inkcoreapi char *ink_string_find_dotted_extension(char *str, char *ext, int max_ext_len);
/*
* Copy src to string dst of size siz. At most siz-1 characters