summaryrefslogtreecommitdiffstats
path: root/Objects/uniops.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2011-10-31 07:40:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2011-10-31 07:40:56 (GMT)
commit0d3072e98d9be9cfcdccefd60dbaca2c19e8d889 (patch)
tree51242c3dae4a06b7351d8a4413dfc786a29fff7c /Objects/uniops.h
parenta72e78b3b137f0ba811761b70dec9637e3d2f37d (diff)
downloadcpython-0d3072e98d9be9cfcdccefd60dbaca2c19e8d889.zip
cpython-0d3072e98d9be9cfcdccefd60dbaca2c19e8d889.tar.gz
cpython-0d3072e98d9be9cfcdccefd60dbaca2c19e8d889.tar.bz2
Drop Py_UCS4_ functions. Closes #13246.
Diffstat (limited to 'Objects/uniops.h')
-rw-r--r--Objects/uniops.h91
1 files changed, 0 insertions, 91 deletions
diff --git a/Objects/uniops.h b/Objects/uniops.h
deleted file mode 100644
index 06a0b4e..0000000
--- a/Objects/uniops.h
+++ /dev/null
@@ -1,91 +0,0 @@
-
-size_t
-UNIOP(strlen)(const UNIOP_t *u)
-{
- int res = 0;
- while(*u++)
- res++;
- return res;
-}
-
-UNIOP_t*
-UNIOP(strcpy)(UNIOP_t *s1, const UNIOP_t *s2)
-{
- UNIOP_t *u = s1;
- while ((*u++ = *s2++));
- return s1;
-}
-
-UNIOP_t*
-UNIOP(strncpy)(UNIOP_t *s1, const UNIOP_t *s2, size_t n)
-{
- UNIOP_t *u = s1;
- while ((*u++ = *s2++))
- if (n-- == 0)
- break;
- return s1;
-}
-
-UNIOP_t*
-UNIOP(strcat)(UNIOP_t *s1, const UNIOP_t *s2)
-{
- UNIOP_t *u1 = s1;
- u1 += UNIOP(strlen(u1));
- UNIOP(strcpy(u1, s2));
- return s1;
-}
-
-int
-UNIOP(strcmp)(const UNIOP_t *s1, const UNIOP_t *s2)
-{
- while (*s1 && *s2 && *s1 == *s2)
- s1++, s2++;
- if (*s1 && *s2)
- return (*s1 < *s2) ? -1 : +1;
- if (*s1)
- return 1;
- if (*s2)
- return -1;
- return 0;
-}
-
-int
-UNIOP(strncmp)(const UNIOP_t *s1, const UNIOP_t *s2, size_t n)
-{
- register UNIOP_t u1, u2;
- for (; n != 0; n--) {
- u1 = *s1;
- u2 = *s2;
- if (u1 != u2)
- return (u1 < u2) ? -1 : +1;
- if (u1 == '\0')
- return 0;
- s1++;
- s2++;
- }
- return 0;
-}
-
-UNIOP_t*
-UNIOP(strchr)(const UNIOP_t *s, UNIOP_t c)
-{
- const UNIOP_t *p;
- for (p = s; *p; p++)
- if (*p == c)
- return (UNIOP_t*)p;
- return NULL;
-}
-
-UNIOP_t*
-UNIOP(strrchr)(const UNIOP_t *s, UNIOP_t c)
-{
- const UNIOP_t *p;
- p = s + UNIOP(strlen)(s);
- while (p != s) {
- p--;
- if (*p == c)
- return (UNIOP_t*)p;
- }
- return NULL;
-}
-