Changeset 925a21e in mainline for uspace/lib/posix/strings.h


Ignore:
Timestamp:
2011-09-24T14:20:29Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5bf76c1
Parents:
867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/strings.h

    r867e2555 r925a21e  
    11/*
    2  * Copyright (c) 2009 Jiri Svoboda
     2 * Copyright (c) 2011 Jiri Zarevucky
     3 * Copyright (c) 2011 Petr Koupy
    34 * All rights reserved.
    45 *
     
    2728 */
    2829
    29 /** @addtogroup libc
     30/** @addtogroup libposix
    3031 * @{
    3132 */
    32 /** @file
     33/** @file Additional string manipulation.
    3334 */
    3435
    35 #ifndef LIBC_DEVMAP_H_
    36 #define LIBC_DEVMAP_H_
     36#ifndef POSIX_STRINGS_H_
     37#define POSIX_STRINGS_H_
    3738
    38 #include <ipc/devmap.h>
    39 #include <async.h>
    40 #include <bool.h>
     39/* Search Functions */
     40#ifndef POSIX_STRING_H_
     41extern int posix_ffs(int i);
     42#endif
    4143
    42 extern async_exch_t *devmap_exchange_begin_blocking(devmap_interface_t);
    43 extern async_exch_t *devmap_exchange_begin(devmap_interface_t);
    44 extern void devmap_exchange_end(async_exch_t *);
     44/* String/Array Comparison */
     45#ifndef POSIX_STRING_H_
     46extern int posix_strcasecmp(const char *s1, const char *s2);
     47extern int posix_strncasecmp(const char *s1, const char *s2, size_t n);
     48#endif
    4549
    46 extern int devmap_driver_register(const char *, async_client_conn_t);
    47 extern int devmap_device_register(const char *, devmap_handle_t *);
    48 extern int devmap_device_register_with_iface(const char *, devmap_handle_t *,
    49     sysarg_t);
     50/* TODO: not implemented due to missing locale support
     51 *
     52 * int strcasecmp_l(const char *, const char *, locale_t);
     53 * int strncasecmp_l(const char *, const char *, size_t, locale_t);
     54 */
    5055
    51 extern int devmap_device_get_handle(const char *, devmap_handle_t *,
    52     unsigned int);
    53 extern int devmap_namespace_get_handle(const char *, devmap_handle_t *,
    54     unsigned int);
    55 extern devmap_handle_type_t devmap_handle_probe(devmap_handle_t);
     56/* Legacy Functions */
     57extern int posix_bcmp(const void *mem1, const void *mem2, size_t n);
     58extern void posix_bcopy(const void *src, void *dest, size_t n);
     59extern void posix_bzero(void *mem, size_t n);
     60extern char *posix_index(const char *s, int c);
     61extern char *posix_rindex(const char *s, int c);
    5662
    57 extern async_sess_t *devmap_device_connect(exch_mgmt_t, devmap_handle_t,
    58     unsigned int);
     63#ifndef LIBPOSIX_INTERNAL
     64        #define ffs posix_ffs
    5965
    60 extern int devmap_null_create(void);
    61 extern void devmap_null_destroy(int);
     66        #define strcasecmp posix_strcasecmp
     67        #define strncasecmp posix_strncasecmp
    6268
    63 extern size_t devmap_count_namespaces(void);
    64 extern size_t devmap_count_devices(devmap_handle_t);
     69        #define bcmp posix_bcmp
     70        #define bcopy posix_bcopy
     71        #undef bzero
     72        #define bzero posix_bzero
     73        #define index posix_index
     74        #define rindex posix_rindex
     75#endif
    6576
    66 extern size_t devmap_get_namespaces(dev_desc_t **);
    67 extern size_t devmap_get_devices(devmap_handle_t, dev_desc_t **);
    68 
    69 #endif
     77#endif  // POSIX_STRINGS_H_
    7078
    7179/** @}
Note: See TracChangeset for help on using the changeset viewer.