Changeset 7f9df7b9 in mainline for uspace/lib/posix/src/strings.c


Ignore:
Timestamp:
2018-01-22T22:42:57Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a08c70
Parents:
e0f47f5
Message:

Remove unnecessary symbol renaming from libposix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/src/strings.c

    re0f47f5 r7f9df7b9  
    3434 */
    3535
    36 #define LIBPOSIX_INTERNAL
    37 #define __POSIX_DEF__(x) posix_##x
    38 
    3936#include "internal/common.h"
    4037#include "posix/strings.h"
     
    5249 * @return Index of first set bit. Bits are numbered starting at one.
    5350 */
    54 int posix_ffs(int i)
     51int ffs(int i)
    5552{
    5653        if (i == 0) {
     
    9289 *     or 0 if strings have the same content.
    9390 */
    94 int posix_strcasecmp(const char *s1, const char *s2)
     91int strcasecmp(const char *s1, const char *s2)
    9592{
    96         return posix_strncasecmp(s1, s2, STR_NO_LIMIT);
     93        return strncasecmp(s1, s2, STR_NO_LIMIT);
    9794}
    9895
     
    106103 *     or 0 if strings have the same content.
    107104 */
    108 int posix_strncasecmp(const char *s1, const char *s2, size_t n)
     105int strncasecmp(const char *s1, const char *s2, size_t n)
    109106{
    110107        for (size_t i = 0; i < n; ++i) {
     
    131128 *     zero. Otherwise return non-zero.
    132129 */
    133 int posix_bcmp(const void *mem1, const void *mem2, size_t n)
     130int bcmp(const void *mem1, const void *mem2, size_t n)
    134131{
    135132        return memcmp(mem1, mem2, n);
     
    143140 * @param n Number of bytes to copy.
    144141 */
    145 void posix_bcopy(const void *src, void *dest, size_t n)
     142void bcopy(const void *src, void *dest, size_t n)
    146143{
    147144        /* Note that memmove has different order of arguments. */
     
    155152 * @param n Number of bytes to reset.
    156153 */
    157 void posix_bzero(void *mem, size_t n)
     154void bzero(void *mem, size_t n)
    158155{
    159156        memset(mem, 0, n);
     
    168165 *     NULL pointer otherwise.
    169166 */
    170 char *posix_index(const char *s, int c)
     167char *index(const char *s, int c)
    171168{
    172         return posix_strchr(s, c);
     169        return strchr(s, c);
    173170}
    174171
     
    181178 *     NULL pointer otherwise.
    182179 */
    183 char *posix_rindex(const char *s, int c)
     180char *rindex(const char *s, int c)
    184181{
    185         return posix_strrchr(s, c);
     182        return strrchr(s, c);
    186183}
    187184
Note: See TracChangeset for help on using the changeset viewer.